When paramatma can control souls why does he need various weapons?

Question: When paramatma can control his own souls why does he fight with weapons ?
Comment: Weapons are just symbols you need to decipher the meaning of the weapons Hindusim is cryptic.. The same scripture mean different thing to different people. If you need to understand a bit you need to learn upanishad, mahabrata, ramayana, all the 18 puranas, after this skisha, vakhyarana, niruktha, kalpa, joythisaa and chandas all this are essiential part to decipher the meaning in vedas, otherwise it will be like maze leading you to opposite way.. if you read it from the surface level understanding it may be devastating
Comment: Even though the weapons symbolise something they fight with asuras with these weapons.Why does he need to fight for thousands of years and get tired as described in some puranas and not simply takeback the soul which is an insignificant part of himself ?
Comment: that right fighting asura mean what it meant you only you need to fight your tendencies of going astray day in and day out this innate tendencies are due to your past action.. this is what is meant now in the surface 1000 of years fighting,, this seems to but joke for god what is not possible will he tired fighting at all what happens if he sleeps.. all this if you think you will understand.. that god cannot be tired need not fight than what does it convey
Comment: many people cannot understand abstract concepts. people understand the power of weapons and a person who can wield these weapons easily. it is meant to convey this idea to us who have difficulty with more abstract concepts.
Answer: The concept of God is Abstract.
However, different people understood it differently, and expressed their expressions according to their perceptions.
When Arjuna asked Sri Krishna to show his Divine form - द्रष्टुमिच्छामि ते रूपमैश्वरं पुरुषोत्तम, Sri Krishna says as follows:

इहैकस्थं जगत्कृत्स्नं पश्याद्य सचराचरम्।
मम देहे गुडाकेश यच्चान्यद्द्रष्टुमिच्छसि।।11.7।।
Now behold, O Arjuna, in this, My body, the whole universe centred in one including the moving and the unmoving and whatever else thou desirest to see.

And, what did Arjuna see?  He describes the Viswavupa as possessed of numerous arms, bellies, mouths and eyes; as having infinite forms all around.

किरीटिनं गदिनं चक्रिणं च
तेजोराशिं सर्वतोदीप्तिमन्तम्।
पश्यामि त्वां दुर्निरीक्ष्यं समन्ता
द्दीप्तानलार्कद्युतिमप्रमेयम्।।11.17।।
I see You as wearing a diadem, wielding a mace, and holding a disc; a mass of brilliance glowing all around, difficult to look at from all sides, possessed of the radiance of the blazing fire and sun, and immeasurable.

The secret of Vishwarupa lies in the above Sloka, wherein Sri Krishna said -यच्चान्यद्द्रष्टुमिच्छसि   - whatever else thou desirest to see.
Sri Krishna never said that I am showing the Vishwarupa to you and that these all comprise my Vishwarupa.
He simply said that "See whatever you want to see - यच्चान्यद्द्रष्टुमिच्छसि ".
So whatever Arjuna saw during Viswarupa Sandarsana, it was his own mind's projections and imaginations.
Similarly, attributing different weapons, vehicles to the God, is according to one's own perception.
We hear from the scriptures that the God is All powerful.  So does the God need to carry weapons to achieve anything?
Did Sri Krishna go the assembly of Kauravas with weapons?
Comment: "The secret of Vishwarupa lies in the above Sloka, wherein Sri Krishna said -यच्चान्यद्द्रष्टुमिच्छसि - whatever else thou desirest to see."  - Wonderful observation! Gives a completely different perspective.
Comment: Sir you mean to say vishwa roopa darshana is mere preception of Arjuna.. is it not real.. wow..@srimannarayana k v
Comment: @PrasannaR:: It did not say Vishwa Roopa darshana is mere perception of Arjuna.  What I said was, Sri Krishna did give opportunity to Arjuna to see the Divine form.  However, Vishwa Roopa will be according to one's own maturity in SPIRITUAL line. Arjuna was undoubtedly one of the greatest warriors of his time, but as far as SPIRITUALITY is concerned, his maturity had been at lower level.  That was why he had the vision of Vishwa Roopa according to his understanding. Many saints said in the past that when they merged in the ABSOLUTE BLISS there will be no words to explain.
Comment: Actually I had so many questions about Viswarupa. Now I dont need to ask them because यच्चान्यद्द्रष्टुमिच्छसि answers everything. Thanks for highlighting this.


Custom 404 page

Question: I am having trouble with custom 404 page,
So I have been trying to get the custom 404 page to work but I have problem making it work right. All the methods that are described everywhere :

make custom 404 page,
add it to menu
copy error.php from system and set it up.

Does NOT work as it should, it returns code 200 instead of 404 with the page (as it found the page) which is bad for SEO as google thinks that any possible page of the website is good (code 200).
I purchased the plugin called Rapi custom 404 (link) however it doesn't work.
Tech support from Rapi provided me with new custom error.php page containing:
<?php
defined ('_JEXEC') or die();

$plugin = JPluginHelper::getPlugin('system', 'rapi_custom_404_page');
$params = new JRegistry($plugin->params);
$page_title = $params->get('error_title', "404 - Page Not Found");
$heading_text = $params->get('heading_text', "OOPS! Page Not Found");
$description_text = $params->get('description_text', "The page you are looking for doesn't exist");
$home_button_text = $params->get('home_button_text', "Go Home");
$theme = $params->get('theme', '1');
include "plugins/system/rapi_custom_404_page/themes/theme{$theme}.php";
?>

And it still doesn't work, now I think the error comes from the .htaccess file. I have been toying with it, and at the moment I am having this:
##
# @package    Joomla
# @copyright  Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
# @license    GNU General Public License version 2 or later; see LICENSE.txt
##

##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
# It is required for the use of mod_rewrite, but it may have already been set by your
# server administrator in a way that disallows changing it in this .htaccess file.
# If using it causes your site to produce an error, comment it out (add # to the
# beginning of the line), reload your site in your browser and test your sef urls. If
# they work, then it has been set by your server administrator and you do not need to
# set it here.
##

## No directory listings
<IfModule autoindex>
  IndexIgnore *
</IfModule>

## Can be commented out if causes errors, see notes above.
Options +FollowSymlinks
Options -Indexes

## Mod_rewrite in use.

RewriteEngine On
ErrorDocument 404 /templates/e4jdrivers/error.php

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a

Custom 404 page


References to learn continuous-time dynamic programming

Question: Does anyone know of good references to learn continuous-time dynamic programming? The references don't have to be books. They could be links to online resources as well. Links to clear, concise discussions of even just the basics would be helpful.
Comment: Sorry. Both would be helpful, but I actually do have stochastic in mind. Thanks!
Comment: deterministic, stochastic, or both? depends quite a bit on which.
Comment: Just thought I'd mention that if we are going to do these types of questions, we should keep with the [decided convention](http://meta.economics.stackexchange.com/questions/169/consensus-on-list-questions/171#171) of providing 1 recommendation per answer.
Answer: For continuous-time stochastic dynamic programming, the small, nontechnical Art of Smooth Pasting by Dixit is a wonderful option. It does a very effective job of conveying the basic intuition.
Stokey's more recent The Economics of Inaction is also decent, but for a practical-minded person it probably underperforms Dixit - its much greater length and somewhat heavier notation do not yield commensurate rewards.

If the underlying stochastic processes are not Itō diffusions, then I'm not sure what the best reference is. The most common such case I've seen (and that I use myself) is the case of discretely many exogenous states, where if we are currently in state $s$ there is some constant hazard rate $\lambda_{s,s'}$ of a switch to state $s'$. Fortunately, this is a pretty simple case in practice: one can just modify the HJB equation to account for the flow probability of switching from $V(\cdot,s)$ to $V(\cdot,s')$. (You can see this, for instance, in equations (1)-(5) in this Acemoglu and Akcigit paper. Conceptually it's no different from setting up the HJB equation when we have an Itō diffusion as the driving process, except that it's simpler because we just get a system of linear equations and we don't need to think about Itō's lemma, etc.)
Of course, maybe there is a good textbook reference for this too - but unlike the potentially much more complicated cases involving stochastic calculus, this is straightforward enough that a text has never seemed necessary to me.
Comment: *The Economics of Inaction* looks great. I looked a little at it. Given your description of *The Art of Smooth Pasting*, I'd really like to check it out, but it seems a little hard to get a hold of. Thanks for the recommendations!
Answer: Dynamic Programming & Optimal Control by Bertsekas
Introduction to Modern Economic Growth by Acemoglu
The Acemoglu book, even though it specializes in growth theory, does a very good job presenting continuous time dynamic programming.
Answer: I think Kamien and Schwartz's Dynamic Optimization: The Calculus of Variations and Optimal Control in Economics and Management is pretty well known.
Comment: It is a very good but note that the book is not really an introduction book for dynamic optimization.
Answer: Controlled Markov Processes and Viscosity Solutions by Fleming and Soner includes a number of applications to Finance and Differential Games.
Answer: A really nice methodology for approximating the HJB is the upwind scheme, which I learnt quite quickly using Ben Moll et al's notes and codes
The examples are continuous time versions of familiar heterogenous agents economies models such as Hugget and Aiyagari.
Answer:  Applied Intertemporal Optimization by Klaus Wälde is a very very nice book, even for those who are not really familiar with mathematics.
The book treats deterministic and stochastic models, both in discrete and continuous time.
I would really say for this book "Dynamic Optimization for dummies". I was not familiar at all with dynamic optimization but this book let me to get through.
Comment: Happy that it helps! I learned so much from this book :)
Comment: This book looks fantastic. I love the organization. The tables at the beginning really illustrate how thorough it is. The book covers most cases of interest and provides many examples. (Apologies for the 4 year delay in responding... :) )


Did I Make a mistake by sharing my salary to my future employer?

Question: I am planning to leave my current job and therefore I have interviewed with a company a couple of days back. At the end of the day of my interview, during a discussion with the HR of the company, I unexpectedly answered her question about my current salary. I gave honestly correct figure of my salary to the HR. It looks like I might get an offer letter soon from that company. But now I am feeling bad that I might have missed a chance to negotiate a good salary. What should I do if I won't get a satisfactory offer letter? How to deal with this? Please tell me.
Comment: Figure out what salary you'd be satisfied with (you can refer to [this answer](http://workplace.stackexchange.com/a/11305/7945)), and just don't accept if it's under that number. If you are going to accept the job regardless of the salary, then you weren't really in a position to negotiate for a higher salary anyway. Point is, don't worry about it too much.
Comment: If you feel you get a low offer, make sure you state that you want to change job because you currently feel underpaied. Otherwise, you can possibly argue that the new job has more responsibility than your current. Anyway, not sure where you live but that info is public from the authorities where I live so its not really any secret.
Comment: Was your salary a reason for leaving your previous employer?
Comment: @kkp: It's a very close cousin. // Besides, I can spare you the suspense. Several Workplace.SE members will insist on 100% honesty because they feel that worker bees owe fealty to a future employer. Other, more experienced, professional Workplace.SE members will tell you that you owe no such fealty to your future employer and that the choice is yours.
Comment: possible duplicate of http://workplace.stackexchange.com/q/183/437
Comment: @JimG. I voted to not close this as a duplicate because although those are similar questions, they're not the same scenario, as evidenced by the current top voted answer about answering honestly and how lies can affect your chance at getting a job.
Comment: Next time, respond by asking the salary of the person who last fulfilled the now vacant postion, or ask for the salary range of equivalently experienced employees. Never give away information for free in a negotiation.
Comment: @acolyte: No. I like the projects at the new company.
Comment: possible duplicate of [Can I refuse to reveal the salary for my last position if it was a bit low?](http://workplace.stackexchange.com/questions/1941/can-i-refuse-to-reveal-the-salary-for-my-last-position-if-it-was-a-bit-low)
Comment: @jim: I don't think that it is a duplicate of that question.
Answer: No, you did the right thing.
If you are asked your current salary, and you feel that you must answer, the right thing to do is to answer honestly. Make sure to include any bonus received. If you are expecting a raise soon, and/or a bonus soon, you want to mention that as well.
What you don't want to do is lie about it. There's a chance you might get away with a lie, but there's also a good chance that you will be caught (eventually if not immediately). And lies during the interview can be cause for immediate termination (at least in my part of the world).
This doesn't compromise your ability to negotiate! Sure, they know what you make now, but you can always make a case for why you were underpaid and deserve lots more, should it come down to that.
Once you receive an offer, or once you are asked what salary you are seeking, that's when the real negotiations can begin. Fight for what you feel you need and be ready to decline if your needs aren't met. And of course be realistic when you contemplate what you really need in salary. Don't forget to consider the entire package - the salary, benefits, etc, but also the company culture, the commute, the chance for advancement, the opportunity to learn, etc.
Don't sweat it - what you did was fine!  Good luck!
Comment: Agree with Joe, here and add that the working environment is a big part of the package, if the new job is more demanding in other area's you are justified in asking for more money.
Comment: There is literally no way for the company to find out his previous salary unless he volunteers documents he really shouldn't in this situation, like his paysheet or (partial)annual income report (what would be a CUD here in Italy). In the past I lied more than once when prospective employers asked my current salary because it's none of their business and they shouldn't even be asking in the first place. Nowadays I tell the real figure because it's high enough to scare off 99% of the companies who would lowball me anyway.
Comment: @Demonblack, In Brazil we have an 'Employment record book'.https://en.wikipedia.org/wiki/Employment_record_book
Comment: @RodrigoMenezes Italy had something similar (as your link says), but it never contained financial information, it just had a record of where you worked when and what you did there. I'd be very surprised if yours does. Your financial records are confidential.
Comment: @Demonblack In Brazil they record your salary and salaries updates.
Answer: You never owe details that you hold personally.  I would typically suggest evading the question, and saying what salary you will work for.  Someone has to start with a quote for the salary, and it's not unusual for the candidate to be the first to offer information.
Having given your current salary - I really don't think it's the drop dead serious issue that other people often do.  The really important number is what you're willing to work for.  Neither you, nor your potential employer should assume that that is the same figure as your current salary - it's not the same job.
Don't stress out.  Wait for the offer and review the whole offer.  Health care, education benefits, your commute - anything you care about and anything the company offers that might help you.  Figure out overall whether this improves your life, or not.  If not - ask for more.  And ask for it in light of that total package.
Different companies will use "current salary" differently. At the very least, it's a ballpark telling them approximately what salary you'll work for.  Presumably someone who can bill for $100,000 isn't going to take a job for $50,000, and would likely be happy with a job at $110,000.  Would you have done better if with a current salary of $100,000 you quoted $110,000 or said "I won't tell you".  Maybe.  Maybe not.  There's a lot of ways to interpret it - go too high, and they may say "not worth it".
But all things are open for negotiation.  Your current job and this job are not the same, and where they differ you will either:

Have to pay money from your salary to fix the difference in total compensation - in other words - covering elements of health care that aren't covered, paying more in gas and mileage for a longer commute, paying for educational expenses that aren't covered to stay current in your field
Have to demand more money to make up for a disincentive that affects your work/life balance.  More overtime = less family time - reasonable if the pay makes up for it.  Weird hours = family disruption - doable, but what compensates you when you could also take a job with normal hours?

Either way, you have reasons to go back and ask for more.
Comment: Notice, I'm not saying "don't answer", I'm saying give a number you're willing to give - "I'm looking for a position in the range of X, and I'm currently receiving similar compensation".
Comment: @JoeStrazzere out of curiousity, what locale is that?
Comment: In my experience, recruiters typically ask what you're currently making and companies typically ask what salary you're looking for.  For reference, I'm in Eastern Massachusetts.
Answer: Yes.
But, given that you've already revelealed the salary you can't go back and change the past. Use this as your learning experience to not do this again in the future.
There are two reasons why you don't want to name the last salary:
1) You may be breaching confidential company information by disclosing it. That information is between you and your previous employer. It can be used to gain a competative advantage over them by other companies. You can always (and perhaps should always) say that you can't disclose it.
2) In all negotiations the first person who gives information tends to be in a worse off position in subsequent offer exchanges. Imagine that instead of being asked how much you make now, you asked them how much the salary fork is for - would that make it easier for you to estimate how much more you can/should ask for? It sure would.
Comment: Yes. Although I respect Joe's answer, I find that most of the time when a recruiter or company ask for salary information it's so they can use it as a base for pay negotiations. Some cheeky ones will just try to match instead of advance you. So if your current salary is below the range they had slated to pay, you may be opening yourself to lose some ground. But while being the first to give a number isn't advisable, it isn't necessarily a harbinger of doom. If your salary is higher, they may say you're "overqualified" (saving you both time); they may also recognize they'll have to pay more.


Castle set identification (photo from 1993)

Question: Is this photo an actual set ? If yes which one, and if not, any idea what it's based upon ?
(if it's not a canon set, my own research suggest that's it's made from 6085 but I'm not sure).
Comment: Sure, I added the year to the title :-)
Comment: Would you mind to add some more info regarding the photo, like the year taken? Possibly anything to add context to make the title more unique :)
Answer: I have identified a unique part, to help with search - Panel 2 x 5 x 6 Wall with Window with Window Stones Light Gray Pattern which has been used here.

It has been used in just two sets listed seen below, none of which look like your model
Black Monarch's Castle (6085) from 1988:

Black Knight's Castle (6086) from 1992:

So it seems like someone made a great MOC back in the days!
Answer: This is pretty clearly a MOC created by combining elements from multiple Castle sets. None of the castle sets were nearly this large for one thing. The only pieces that are distinctive are the shields and the black castle window panel pieces which are from the Black Knights sub-theme. From the size of it, I'd say this is 3 or 4 castles put together.
Comment: I agree. Going by the amount of grey bricks alone you need at least 3, probably 4 castle sets together to have that many. The black bricks need also at least 2 or 3 sets.


Microdata & JSON-LD Conflict on the same page or not?

Question: For Wordpress website used Rich-Snippet Plugin, that added schema for pages using Microdata. I also applied Sitelink Search Box, Product schema, Article Schema For the Same site in different pages using JSON-LD language. is it conflict or not? or Harmful for any site.  I want know the actual reason behind it. Please let me know?
Answer: Gary said by using JSON-LD and Microdata on same page does not create any problem.
Google search console will display both markup, but Google may be merge it or will prefer JSON-LD markup over microdata if it is available.
Answer: If you do not have microdata and json-ld on the same pages, you will not have an issue.
If you have it on the same page, according to this quora post, you will not have an issue if the microdata and json-ld are referencing different entities you will not have an issue.
The problem will be when you are referencing the same entity with the microdata and the json-ld data. When the two referencing the same entity, google or other search engines could mis-interpret the information on the page.
Answer: I think that you can mark up different things in different vocabularies/syntaxes with no issue. But you can cause conflict if you mark up the same thing multiple times. Google will typically pick one and ignore the others.
Another issue is that systems like Google need to determine what markup represents the pages content. If you separately mark up the page as an Article as well as a Product, then you are sending conflicting signals on what the page is about.
Best practice: a single entity can be multiple types


Team Foundation Server Install

Question: I am looking to upgrade our current TFS. The original install was done by one of our QA guys. He says that the install was a pain. What are some resources I can read up on? Secondly, I understand that TFS runs on Sharepoint, my organization doesn't use sharepoint right now but from my perspective looks like we may go that route. How should I upgrade TFS since the base sharepoint is already installed?
Comment: What do you mean by "upgrade"? From what? To what?
Answer: There is a help file that covers the various install/upgrade options for TFS on Microsoft Downloads. This is updated more frequently than the install so grab the latest.
TFS 2005 install was a pain, 2008 made it much simpler. But the upgrade process is different. I just did a little planning (read the instructions so I had everything I needed) and it all went pretty smoothly. Note that it does change the database, so if you have a large database (TB scale) you may need to allow a block of time for the process.

Team Foundation Server Install


What is a substitute/complement in terms of mixed partial derivatives?

Question: I am trying to understand how substitutability relates to mixed partial derivatives. I thought the change in marginal utility with respect to a change in the amount of $x$ would correspond to $$\frac{\partial U}{\partial x}$$ so I got confused when I take the partial of that with respect to $y$. Does this measure the rate MU changes wrt $x$ as we change $y$? How is that related to being a substitute?
Comment: If we start at the basics: If $y$ is complementary to $x $ then $ \frac{dy_d}{dp_x} < 0 $. Right?
Answer: It is very important here to note that there are multiple, mutually inconsistent, possibilities for how to define a substitute/complement.
One way is to say that $x$ and $y$ are complements if an increase in $y$ raises the marginal utility of $x$ (or, given symmetry of mixed partials, vice versa):
$$\frac{\partial^2 U}{\partial x\partial y}>0\tag{1}$$This is the suggestion in foobar's answer.
Another way is to say that $x$ and $y$ are complements if a decrease in the price of $y$ raises the Hicksian (aka compensated) demand for $x$. Since Hicksian demand is the derivative of the cost (aka expenditure) function by Shephard's lemma, this can also be expressed as a condition on mixed partials:
$$\frac{\partial^2 C}{\partial p_x\partial p_y}<0\tag{2}$$
This is the suggestion in snoram's comment, and it is the notion more commonly taught in micro classes.
These definitions are not equivalent! Indeed, in any case with only two goods, those two goods must be substitutes according to (2), regardless of whether the cross-partial of $U$ in (1) is positive or not.
One can give fruitful labels to these concepts (though these labels are more common in the case of production rather than utility functions). Following Hicks, we can call complements by definition (1) q-complements: if $x$ and $y$ are q-complements, an increase in the quantity of $y$ leads to an increase in the marginal value of $x$. Meanwhile, we can call complements by definition (2) p-complements: if $x$ and $y$ are p-complements, a decrease in the price of $y$ leads to an increase in the demand for $x$. See, for instance, Seidman (1989) for a brief overview.
Both concepts are useful in different situations - it depends on what you're interested in!

More technical note: you might notice that (1) and (2) do not seem very similar to each other: (2) is a compensated concept, keeping us on the same indifference curve, while (1) is not. This is a valid criticism, and indeed there is an alternative notion of "q-complements" that is compensated, and a notion of "p-complements" that is not.
The compensated notion of q-complements, which is probably more relevant for most consumer theory applications than (1), asks whether the marginal return to $x$ increases as we increase $y$, while staying on the same indifference curve. (It's more relevant for consumer theory because it doesn't depend on the inherently ambiguous cardinality of $U$. Indeed, apparently Hicks introduced this as the consumer-theory definition of "q-complements" in his 1956 Revision of Demand Theory, though I don't have a copy of it myself.) This notion also has a mixed partial characterization, in terms of something called the distance function, which is a cool micro theory tool that no one learns anymore; the matrix of mixed partials of the distance function is called the Antonelli matrix, and it is a generalized inverse of the beloved Slutsky matrix.
If we wanted to think about other versions of p-complements, there are several options. One way is to hold income constant, and say that $x$ and $y$ are complementary if a decrease in the price of $y$ increases Marshallian demand for $x$. This is a valid notion (called "gross" complementarity rather than "net"), but it's not very nice because it's not symmetric (due to income effects) and hence doesn't have a mixed partial characterization.
Another, nicer way is to hold marginal utility of wealth constant (this is called "Frisch" demand, and is the consumer theory analog of profit maximization, which holds price of output constant), and then ask whether a decrease in the price of $y$ leads to an increase in the demand for $x$. This depends on entries in the inverse of the Hessian matrix of mixed partials of $U$, revealing an inverse relationship with (1) (which depends on the Hessian matrix itself) that parallels the inverse relationship noted above between the Antonelli and Slutsky matrices.
Comment: Can you clarify why equation 2 implies they must be substitutes?
Comment: inequality (2) implies that they are complements in the "p-complements" sense because we can write $\frac{\partial^2 C}{\partial p_x \partial p_y} = \frac{\partial(\partial C / \partial p_x)}{\partial p_y} = \frac{\partial h_x}{\partial p_y}$, where $h_x$ is Hicksian demand for $x$ (and the third equality follows from Shepard's lemma). Is this the part that was ambiguous?
Comment: Yes, but that made it clear. Thanks again for another awesome answer.
Answer: Think about two goods that should be independent. Say, $x = $ shoes and $y = $ computer games.
Complements imply complementarity: You can enjoy $y$ more, when you have more $x$. Hence a positive cross derivative.
One way to phrase that is with non-separable utility: $U(x, 0) + U(0, y) < U(x,y)$. An alternative is what you specified: At the margin, having $x$ allows you to enjoy $y$ more.
With our shoes and computer games, certainly the cross derivative is 0. With ice cream and spoons, it most likely is positive: Having a spoon increases the marginal benefit you're getting from ice cream, hence a positive cross correlation.
Finally, think about chocolate and ice-cream. One could argue that they work as substitutes (think about desert, for example): You either want the one or the other. If you get them for free, sure, it doesn't hurt having both of them. But if you have to pay fair prices, you prefer to pay the price for one of the choices and stick to that.
Comment: What about the issue of "symmetry" of mixed partials? Does it hold for the examples you gave? Does that matter? By symmetry I mean $U_{xy} = U_{yx}$.


What is the max ethereum allowed in a private network for the whole network?

Question: When I build a private chain setup, what is the maximum Geth ethereum I can have for the life of the network.  Another way of asking the question would be: What is the maximum ethereum one account can have?  What is the maximum ethereum all accounts collectively can have? On the same note, what is the maximum number of blocks I can have?
Answer: Just tested with parity ethereum client 2.5.10: maximum possible value was
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

being 64 hexadecimal signs -> 256 bit long. Anything exceeding it leads to a node panic
Answer: This is an interesting question! Let's look at each question in particular:
Max number of blocks
Theoretically there should be no upper limit since the chain of blocks must be able to continually grow over time. However, since the block number is stored as a finite integer, there is a limit to how high this number can be. See the full discussion in this related question.
Max number of ETH
I ran a little experiment using ganache-cli locally, which is a good proxy for geth since it is governed by the same rules of the game. See what was allowed by ganache:
ganache-cli --defaultBalanceEther 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

And it can go on like this for a long time. You can query the balance of the accounts with web3 for example:
> web3.eth.getBalance(web3.eth.accounts[0])
BigNumber { s: 1, e: 619, c: [ 1000 ] }

BigNumber can get you a long way. But I'm curious to know what the Ethereum protocol itself specifies for maximum balance / transaction amount.


How much material AND energy are needed to protect a spacecraft from radiation as well as the Earth does?

Question: There's enough atmosphere to produce 1 bar of pressure at sea level, and I believe from playing Universe Sandbox, a .320 Gauss magnetic field on the Earth.  Maybe some portion of that would be enough to really protect space travelers well.  How much material would you need to equal the atmosphere and how much power/electricity would you need to produce a similar magnetic field for space travel?
Comment: @Uwe but the question only asked about it being of similar intensity. Using magnetic fields to deflect cosmic rays from spaceships has actually been examined. See this answer to [Radiation shielding magnetic or mass, which is more efficient?](http://space.stackexchange.com/a/862/4660). (By the way, if you got 4 more points by doing 2 edits on answers with spelling or grammar mistakes, you would have enough points to make comments, instead of posting things as answers when they aren't and the mods converting them to comments.)
Comment: Look here how big the Van Allen belts of the earth are:
https://en.wikipedia.org/wiki/Van_Allen_radiation_belt It is impossible to build a magnetic field of similar size and intensity around a spaced ship.
Answer: As well as Earth at sea level would be 14.7 lbs per square inch of a low-Z material. (You don't need the magnetic field.) E.g. a 34-foot thick shield of plastic.
Comment: @ Mark Adler. How much could be reduced the thickness of the shield in case that another material which has a better protection against radiation would be used? What would be the minimum of thickness by using the best option?
Comment: I don't know that you can do much better in terms of density. You want a low-Z material to not produce hazardous secondary radiation, and their density tends to be about 1 g/cc. What you would want to do is figure out what level of health effects you are willing to tolerate, and then find the minimum thickness of low-Z material needed to meet that level. That is probably much less than 31 feet. Your spacecraft requirement would never be "as well as Earth does".
Comment: Does that then mean that a material like Lead will get zipped by particles and produce secondary radiation?
Comment: Well personally, I would want way more speed, some kind of centrifuge, and the most radiation protection reasonable.  Those 3 things are, to me, a reason why human spaceflight hasn't left orbit in near 50 years  (also producing those 3 things is mega expensive I'm sure).  Maybe two modules of plastic could be launched and hooked up to block the Sun during your trip (like Mr Burns).
Comment: I don't know what "zipped" is (other than data compression), but yes, lead is bad idea since the secondaries produced in the lead can be more biologically damaging than with no shielding at all.


SSL versus EV SSL

Question: As I understand it, SSL certificates verify the connection between the host and the browser, preventing MITM attacks. Is it true that EV SSL verifies the host itself, thus preventing (in theory) phishing attacks? Are there any other differences between EV SSL and regular SSL?
Answer: SSL certificates are used for setting up an encrypted connection between client and server.  The identity verification part is in theory done by the certificate issuer before issuing the certificate.
But the SSL market is a bit of a scam, really. Many SSL certificates are issued with an absolute minimum of verification of identity. You can easily find SSL certificates for less than 20 USD, and how much detective work can you get for 20 USD... And mind you, these are not self-signed certificates, but certificates with the same root as the expensive ones from Comodo, Thawte etc.
Extended Validation (EV) certificates are only different in one aspect, but it's an important one: There are clear minimum standards for the verification of identity before issuing the certificate. Based on this, all modern browsers give EV certificates a much more prominent treatment in the user interface -- the 'green bar'.
So the big question for site owners is "Do EV certificates reduce abandonment rate?". Predictably the certificate issuers have released whitepapers stating that they do work, and are worth their much higher price tags. I'm not so sure. I have looked for independent proof of this, and I haven't seen any yet.
Getting a regular SSL certificate is easy, getting an EV one is much harder. You'll generally have to jump through more hoops to establish your identity for EV certs.

Is it true that EV SSL verifies the host itself, thus preventing (in theory) phishing attacks?

They help, but they do not prevent phishing attacks. A phishing attack is someone else impersonating you, in any media from websites to the telephone or fax. If your users look for the EV green bar with your company name, then a EV cert offers some protection against phishing on the web. But how many users really pay attention to this? I'm guessing it's a minority.
Comment: I wouldn't be surprised if social engineering was a more effective way of getting someone's login details - in which case an EV SSL won't help you one little bit.
Answer:
Is it true that EV SSL verifies the
  host itself, thus preventing (in
  theory) phishing attacks?

Correct, that's the theory, and after having gone through an EV application, I can report that they are incredibly stingent. Our company address was oh-so-slightly different in our application as to what was listed in some company register they were referring to, and our application was rejected multiple times until we got all of the details sorted out.
Answer: Many of the current phishing techniques rely on driving customers to spoofed Web sites to capture personal information. Technology such as Secure Sockets Layer (SSL) and Extended Validation (EV) SSL are critical in fighting phishing and other forms of cyber crime by encrypting sensitive information and helping customers authenticate your site.
To help prevent phishing attacks from being successful and to build customer trust, companies also need a way to show customers that they are a legitimate business. Extended Validation (EV) SSL Certificates are the answer, offering the highest level of authentication available with an SSL Certificate and providing tangible proof to online users that the site is indeed a legitimate business.
EV Certificates gives Web site visitors an easy and reliable way to establish trust online by triggering high security Web browsers to display a green address bar with the name of the organization that owns the SSL Certificate and the name of the Certificate Authority that issued it.

SSL versus EV SSL


Functional as a first language

Question: What are some pros and cons to learning functional programming before other paradigms?
Comment: I first learned how to program in Scheme and right afterwards learned C. The sharpest contrast and lesson was about how shared state makes everything difficult to grasp and debug, and how hard it is to have to learn about recursion right at the beginning - though arguably an essential concept to learn. I feel I am more aware how harmful shared state can be than my colleagues who started with PASCAL or C.
Answer: One major problem is that if you start with a language like Haskell everything else will seem just substandard.
Honestly I think starting with a language like Haskell or scheme would be a great idea.
(I admit I am  functional language addict)
EDIT:
OK what I like about both languages:
Scheme takes a very simple language and build out of it a wonderfully robust
language for development. Also SICP is written about scheme which makes it worth learning right there. Scheme is about the simplest thing you could imagine that could be a complete language.
Haskell  What is really growing on me is the type system. So many of the bugs I see in other languages are due to the wrong type showing up somewhere. In Haskell that is almost imposible. Also the idea of a lazy language just has some cool things fall out of it. For example you can create infinite data structures in Haskell and then only create the part that you need.
Comment: I know--I am suggesting this as a good reason _for_ learning FP first. It's a trend that's been making me really happy for a while.
Comment: To be fair, a whole bunch of languages are incorporating more and more functional aspects, so life isn't as bad as it used to be.
Comment: True, and for someone who loves FP this is nothing but a good thing
Comment: Doesn't really say much to answer the question, though -- _why_ do you like Haskell (or Scheme)?  Would they be good as first languages for learning?  Why?
Comment: Added some comments about both languages
Comment: @Zachary K: If you think Scheme is simple, you should learn unlambda. It gets rid of all of those useless data structures and values, and leaves you with only functions. :)
Answer: The biggest plus of learning a functional language before learning an OOP lang is that your programming skills get developed first and then you can easily grasp the OOP concepts. If you direclty start with an OOP language you will have to learn two things simultaenously: "to think about the code" and "to think about the OOD". It can get distracting. First practice with a functional language and develop your programming skills. Then learn OOP and other paradigms. Since OOP was desinged to make up for the shortfalls in structural programming it will be easier to understand why.  That is the reason CS courses start with C and then go on to C++.
Comment: At my university, we first started with a functional language, Standard ML and learned what side-effects are. After that we learned C but we never learned C++.
Comment: @Jonas. I guess different countries/universities have very different course structctures. In my university, C followed by C++ is a standard for Comuter Science Engg courses but for other engineering streams, only C is taught.
Comment: At my university we start with Java, and then just use the language appropriate for the courses after that. For example, C/C++ is used for systems programming, C# for UI, various assembly languages for computer organization and I think whatever you want for games programming
Comment: At my university, we started by learning Scheme (with SICP). The first few weeks were entirely functional; OOP was introduced well into the course. I thought it was all laid out very well and rather liked the course.
Answer: On the question of how to learn programming by starting with functional programming, two classic recommendations:

The first, and obvious one is the classic Structure and Interpretation of Computer Programs, by Abelson and Sussman, which remains one of the best introductions to CS out there, and is taught from a functional perspective, using Scheme.  It's available in full online.  If you don't start here, you should get here as some point.
A more recent text covering most of the same ground at a gentler pace, and with a stronger focus on software engineering is How to Design Programs, by Matthew Felleisen and a bunch of others from the Racket/PLT team, which uses the Racket dialect of Scheme.  It's also available online, as is the in-progress second edition.  This book has the advantage that it's designed to be used with the DrRacket programming environment, which provides a very friendly interface for beginner and expert alike to experiment with code.

On the question of why start with functional programming, I'd like to point at Bob Harper's Blog.  Carnegie Mellon has recently retooled their CS curriculum to teach functional programming first, and Harper has been covering their progress blow-by-blow on his blog.  As one of the guys behind the definition of Standard ML, it's obvious that he's for this move, and he argues the reasons for it well.
Finally, I'd caution against learning Haskell first, though others may disagree.  While Haskell's pure approach to FP will certainly breed good habits, the language's focus on lazy computation isn't necessarily a good match for the beginner; one of the first, and most important things you will need to learn to do as a programmer is to reason about exactly what your program is doing by looking at the source, and about the relative cost of different approaches to the same problem.  I'ts my experience that Haskell's laziness makes both of these activities somewhat of a challenge for even experienced programmers, though Your Mileage May Vary.
Answer: The main advantage (or, non-disadvantage) of starting out with FP is that most concepts can apply to imperative programming as well.  Realm of Racket uses video game analogies to teach both functional and imperative concepts, and dedicated students are left with not only a functional game (n.p.i.), but a solid understanding of conditionals, recursion, loops, ADTs, and event-driven design.  These concepts are practically ubiquitous in modern programming and are used constantly.
Even more important, though, is learning how to encode abstractions, something in which FP excels, with the use of higher-order functions and data types.  How to Design Programs takes a unique approach to this by teaching through induction.  For example, students learn how fold works by looking at the code for taking both the sum and the product of a list, finding what they have in common, and deriving the implementation themselves.
The OOP equivalent of the above would likely involve one or more of the following: interfaces, abstract classes, generics, functors, or (if you're doing it wrong) singletons.  While these are perfectly acceptable design patterns in Java, IMHO they do not belong in an introductory curriculum and only serve to obfuscate the underlying principles.  Even as someone who was introduced to FP languages "late", I can say that navigating the ever-shifting sea of OOP has been made vastly easier by having a strong functional anchor.
Comment: I hadn't heard of Realm of Racket, but from the title immediately knew what it was, because the title is a reference to it's older brother, Land of Lisp.
Comment: Almost forgot: if you want to buy Realm of Racket, try this coupon: `RACKETEERS`.  Not sure when it expires, sorry.
Comment: +1 for mentioning higher-order functions - I was ready to post my own answer about them.  Half my co-workers struggle with the concept, and the rest who do get them don't think of them when it would be the simplest solution.
Answer: Functional programming makes things a lot easier. In OOP languages, you have to deal with managing state across multiple threads without ruining that state. In functional languages, when the majority of the work being done is being done by pure functions, you don't have to worry about it.
In terms of speed/performance, I'm not a real performance jockey, but being functional doesn't mean being slow, and the structure of functional languages has little to do with their speed. The syntax of functional languages vary greatly such as the differences between Clojure and Haskell. Clojure is very fast as-is, and can reach (and sometimes exceed) the speeds of Java with after-the-fact optimization.
So it all really depends what you are looking for
Answer: I think the availability of learning material, some good code samples, and mentors are very important when learning programming languages. Depending on your situation, you may have a mentor that can teach you, etc. but I think functional language resources are very few compared to the mainstream languages. It means you will progress slower compared to learning mainstream languages. But if you are not in a hurry, then this is not a problem.
Comment: I think your assumptions are wrong. There *are* good tutorials, books, papers etc. about functional stuff. Moreover, there are lots of papers out there that deal with special things like type system, implementation, virtual machines, lambda calculus and so on.
Answer: Perhaps the most important reason to consider learning functional programming languages is the understanding of algebraic data-types. The mental mapping will help in modelling OO class relations and even database design.
The focus on multi-core/multi-processor systems stress the use of parallel algorithms which can be expressed clearer and more concisely in FP. The lambda branch of languages will likely see a strong increase in use in the next one to two decades.
But there are also some common pitfalls. To believe FP is simpler is a big mistake, since calculating the space and time complexity as well as delivering proofs of halting can be much more challenging in lambda calculus, especially in languages which support lazy evaluation.
So, learn both! Or perhaps better: first learn a language which embraces both, such as Scala. If you don't mind tie-die t-shirts and a slight dutch accent, perhaps you'll find the FP lectures by Dr. Erik Meijer useful, which are on MSDN.

Functional as a first language


Before computers, how did cartographers draw roads with perfectly parallel sides?

Question: If you're drawing a road on a map, and that road happens to be straight, it's easy to draw its two sides parallel: you just move the ruler. But most roads twist and turn, and drawing their sides perfectly parallel cannot be done with a ruler. And yet even before computers came along, no matter how windy their roads, cartographers appear to have had no difficulty drawing both sides of their roads perfectly parallel (or I should probably say equidistant). I cannot begin to imagine a mechanical way to do this. Can anyone tell me?
Comment: I'm betting a sufficiently skilled draftsman could draw lines that are indistinguishable from equidistant simply by eye.
Comment: The term we use for this in cartography is "line casing" or "cased lines".
Answer: Parallel Pens with special split nibs or something similar. Sorta like using two pens taped together into one pen with two tips
An example can be found on the Scribblers calligraphy website:
Comment: @phresnel I expect there will always be some penmanship skill required for this, regardless of the tool used.
Comment: @Gusdor I was going to make the same comment.  Just because the nib points are a fixed width apart doesn't mean that the lines end up the way you want them.  If you don't turn evenly, you won't end up with equidistant edges.
Comment: Attribution needed indeed. Would be nice if you also add information on how to keep it right-angled inside corners.
Comment: I never even thought of this solution. It would require a vey steady hand, but in principle it's just about feasible, especially for a low budget solution. It would be difficult turning it around corners. But I never even thought of this solution at all. Thank you!
Comment: Good answer .. in addition to [Ruling Pens](http://www.paulshawletterdesign.com/wp-content/uploads/2013/02/cropped9494.jpg)
Comment: There's an [on-going discussion](http://meta.stackexchange.com/q/268334/189165) related to this answer. Crediting the image author / owner is obligatory and you answer author refuses to add it, this great answer might get flagged and eventually removed. That would be pity.
Answer:
Airphotos have been the source materials for a lot of maps for a long time. To result in a nice exact machine made look they would use dials to help draw the lines on transparent mylar sheets.  The reason those maps had roads that were nice and parallel was the machines and skilled operators. Parallel Pens and parallel ruler are useful for other map making methods.
Comment: "Just draw maps"? Maps are one of the primary pillars of human culture.
Comment: "Airphotos have been the source materials for a lot of maps for a long time" For a pretty short time as a fraction of the period for which human beings have been making maps!
Comment: Thank you for such a gorgeous photo! Did people really invent all that just to draw maps? Now I begin to get some little insight into what goes (or used to go) into some of those aesthetically beautiful old maps, such as Philip's atlases. Thank you for finding that, it's an amazing photo.
Comment: Not to mention, that "Mapmaking" is one of the first scientific discoveries (technical advances) found, when you play any Civilization game! :>
Comment: It was invented to make maps.   A google search for Analog photogrammetry or analog stereoplotter will bring up a number of images of different machines.  There is a pretty good variety of designs.
Comment: Hi exploregis, I should have thanked you years ago for your Oct 25, 2015 comment, which is highly relevant as it includes the names of this type of machine, which I would never have been able to guess. I'm still staggered and awestruck every time I look at this photo.
Answer:
There is always the parallel ruler for lines that are further apart.
A more modern version would be those with rollers but that is not as good in accuracy as a fixed mechanical design.
Comment: Your answer doesn't account for "But most roads twist and turn, and drawing their sides perfectly parallel cannot be done with a ruler", but a +1 for effort.
Answer: Two other methods:

Engineering drawings (e.g. highway plans) usually use curves with defined radii, so drawing those is mostly a matter of using a compass and creating the geometry from the same instructions for both sides.
(Edit: I say "same instructions" because roads are first defined by their centerline path, then parallel stuff is based off of that. So for a highway with a 200-foot right-of-way, you'd copy the straight sections on each side, 100 feet away from the center. For curves you would add 100 feet to the radius when drawing the outside of the curve, and you'd subtract 100 feet from the centerline to do the inside of the curves.)

(Edit: as pointed out in the comments, the following method gives 2 identical curves rather than 2 parallel curves.)

There's another method using the Lesbian rule (named after the island of Lesbos, where they originally got the material), aka the flexible curve. Descriptions of both are on Wikipedia (here and here respectively). This isn't as handy for small squigglies, but it's great if you can form a gentle/large curve, trace one side, move the rule, and trace the other side.
Comment: If you want to draw to curved lines at constant distance from each other, they must have different radii. You can't "use the same instructions for both sides."
Comment: Hmm, I never thought of a Lesbian rule. It wouldn't be perfect but it sounds like a good solution if you're on a low budget, or if the quality doesn't have to be exact. What I mean is, in theory, on the outside of a bend the radius would have to be slightly increased, and on the inside of a bend it would have to be slightly reduced. That would be a fiddly process. And any imperfections would not be very obvious. And it would be vastly cheaper than buying a machine like the one  in the eye-popping photo and hiring someone who can operate it.
Comment: Why trace and move? That won't work (compare writing with a broad nib--wide in parts of the curve and narrow in others).  Surely the idea is to leave the rule in place and trace along both sides. You just have to get one that is the right width.
Comment: I searched  "Lebsian rule" on google but the results wasn't what I was expecting for -_-
Answer: The answer that @AMontpetit provides shows the pen and ink drawing tools used to draw parallel lines. There are also scribing tools that will draw these lines. The tools have a pivot built into them, allowing you to keep an equal distance between the lines when going around curves. The tools could have a single blade or multiple blades for parallel lines. I used these tools in my first cartographic jobs a few decades ago...
See this video for an example: https://youtu.be/Ovu513papoc?t=1365
Comment: I would think another approach would be to use one width of brush or marker to draw a wider line, and then a narrower brush to paint the middle with a lighter opaque color.   On a lot of maps, the way lines join would be consistent with producing them that way, though I have no idea if that's how they were actually done.  What would your experience suggest?
Comment: That video of those ingenious scribing tools (https://youtu.be/Ovu513papoc?t=1365) shared by kenbuja on Oct 21 at 13:37 is gorgeous. Thank you so much. The man seems to be dragging a tiny cutter, almost like pulling a miniature trolley. I suppose this naturally keeps the cutter perpendicular to the direction of travel, and therefore the width of the stroke is always constant, which is the object of the exercise. And mounting the little magnifying glass on the trolley (so you don't have to wear it) is such a good idea too. And then all of that ingenuity was swept away by computers.
Answer: Sometimes it's hard to imagine doing things without computers.  Especially if you were born into a year when computers were ubiquitous.  But somehow, some-way...people got around before them.
As fantasmagorical as it may seem...before computers, cartographers and graphic artists had ADEPTNESS and FACILITY with their hand tools.  My own personal experience, for example, in this exact frame:  I used an 000 rapidograph with a flexible rule to draw pseudo-parallel lines on town maps in the '80s.  Sometimes it took several attempts before a "keeper" was arrived at.  The lines would not be strictly parallel, but "parallel enough."


Was the word 男朋友 borrowed from English (or maybe the opposite)?

Question: 男朋友 and 女朋友 have the same thought process as their English counterparts, as in both words are compounded of (the gender) + ("friend"), even though they're actually used to refer to a romantic partner of said gender. Are there any linguistic reasons for that? Did English and Chinese-speaking nations have any contact in the past or have these 2 isolated and totally different nations had the same logic for this word specifically?
Answer: Yes.
The English words boyfriend/girlfriend are modern; their usage to refer to romantic, unmarried relations dates to around 1922. This is also where other terms like "dating" arose.
Similarly, in Chinese, 男朋友/女朋友 do not exist in pre-modern times. Other terms like 佳人 would be used.
The Republican Era saw big changes in Chinese culture and adoption of Western culture and language. It would be easy to conclude, therefore, that the words 男朋友/女朋友 were borrowed from English during this time.
Answer: I think in English we say boy/girl friend for friendship and boyfriend/girlfirend for relationship. In Chinese, the counterpart is 男性(Xing )朋友/女性(Xing )朋友 for friendship. 男朋友/女朋友 indicates relationship in general.


Air conditioner blowing hot air one day after adding Freon

Question: I added Freon to my 2007 Chrysler Town and Country van, but the air stayed cold only 1 day.....now what?
What can I expect the costs to be for repairs, replacement of parts, etc.?
As a woman, can I get free written estimates?
How can I prevent someone from misleading me?
Comment: I sure hope you didn't purchase Freon (R13) but instead used R134a refrigerant. R13 Freon hasn't been used in US production cars since 1994.  Your repair could be to replace a cut O ring (a $50 repair) or a leak in the evaporator core (a very expensive repair involving removing the instrument panel). That could cost well over $1000.  Nobody will be able to give you even a rough estimate until they first conduct a refrigerant leak test on your car.
Comment: I wouldn't add anything more yourself.  Those cans of quick-fix refrigerant can help, but if they don't help, or if you do it wrong, you run the risk of damaging your system even more.  Someone I knew didn't read the instructions and way over-filled his system and damaged the compressor.
Comment: I bet you did not add "freon" unless you had it in the back of your garage for 25 years.
Comment: @zipzit, you mean R12?
Answer: You obviously have a leak in your ac system.  As far as a free estimate, you may get a free estimate for the cost to find a leak. (Proper diagnosis).  If I was to guess, the first place I'd look is underneath at the rear of the vehicle where the AC lines go into the rear evaporator.  This could get costly, and know that there are kits to just eliminate the rear without replacing the lines and/or the rear evaporator if it is indeed the source of your leak.  The downside of this is your passengers in the rear may feel like 2nd class citizens, sweating profusely in the back, while those up front need to turn the AC down because they are getting too chilled.
Answer: It really depends on how willing you are to get your hands dirty. Based on your description its almost certainly a leak but the basic system appears to be functioning, hence why you got cold air for 1 day. A lot of the consumer-grade refrigerants have UV dye in them -- It will highlight the location of a leak. Sometimes you can see it with your naked eye but they have UV flashlights that really make the dye pop out, these lights are readily available and not expensive at any auto parts store. Specific to your vehicle I don't know what the common failure points are but follow the AC lines from the compressor to each component as best you can, with any luck the leak will be obvious if it only took one day for it to leak out.
If the refrigerant you already added didn't have UV dye, then buy a can that does and let it leak out, and look for it.
I assume the air blows warm all of the time, if it blows warm only when the vehicle is stationary (but blows cold while moving) then it's your cooling fan and has nothing to do with your air conditioner.
If you're not comfortable doing this you're unfortunately at a mechanic's mercy. However I would be wary if they recommend something like a new compressor (which is probably not needed unless that's the source of the leak). Ask them to show you the leak. Also note that R-134a refrigerant is very inexpensive to a commercial garage - You can get 30 lb containers on Amazon for $162 shipped (or about $5.40 per lb, your vehicle probably takes 2-3 lbs) and it will be even cheaper for a commercial business. I find that less than honest establishments will grossly overcharge for refrigerant. (For my home air conditioner I was charged $300 for 2 lbs of R-410a refrigerant - almost 30x their actual cost. Needless to say, I used a different vendor next time.)
Personally I have had good luck with AAA Auto centers and they seem to be consistently decent if you happen to have one nearby.


How do you make tomato paste?

Question: I have a garden every year and would prefer to use my own tomatoes for all my cooking.  I can them and make sauces, but haven't found a good recipe that describes the technique for tomato paste.  I need it to be thick like you buy at the store - I use this for sauce dishes, etc that I don't like to be too runny.  How would a home cook go about making tomato paste?
Comment: @boxed-dinners: I suspect that most commercially-produced tomato paste is NOT made this way. But you're spot-on with how the old-fashioned method went.
Comment: Isn't this a recipe request?
Comment: tomato paste is made by working tomato puree in the sun until much of the moisture is removed by evaporation, or soaked into the wooden boards that its worked on.  pretty hard to make a short-cut.
Comment: @Neil, I don't think so. I think this is a basic technique question.
Answer: Tomato paste is just tomatoes with the water removed, essentially.  I'd slice the tomatoes in half and roast them (cut side up) at 350 degrees F for an hour (this will concentrate the flavour nicely and you can add s&p/olive oil/herbs/garlic if you want).  Then mash them through a sieve or food mill to get a smooth consistency.  Then put that tomato puree in a pot and just boil them down until it's as thick as you want.  As it gets thicker, you'll need to stir it regularly to prevent it sticking to the bottom of the pot and burning.
Comment: @mouviciel - The sieve/food mill step will remove the skin and seeds, so that's why I don't bother to peel the tomatoes before roasting (also, if the skin sticks to the roasting pan, it's not a loss since it would be sieved out anyhow).
Comment: This is basically the same recipe I use. My first step is to peel off tomatoes, either with boiling water or with a special italian tool: a passapomodoro (see e.g. http://www.pastorinocasa.com/passapomodori-c-27.html).
Answer: I worked in a restaurant that made its own tomato paste at the end of every summer. Each week we would purchase 14 cases of vine rippened tomatoes picked in the morning from the farmer at the farmers market. Each day we would process two cases through the William Sonoma Tomato Press, add a couple table spoons olive oil and slowly simmer until the water has evaporated and the tomatoes are now a paste. We would just freeze the result and have homemade tomato paste through the winter.
Answer: I haven't tried this, so look at it as a thought experiment.
I'd take a tomato puree and cook it down to thicken somewhat, then spread it in a shallow sheet pan and cook it slowly in the oven at maybe 250-275F. I'd sort of stir/turn/re-spread it every 5 minutes to start, then do it more frequently as things start to thicken up. I'm totally guessing on the times, though.
The idea is to get as much moisture gone as possible without risking browning the tomato paste too much. The sheet pan gives you lots of surface area so you clear off a lot of water quickly, and makes it easy to handle. Low oven temps reduce the risk of burning.
Comment: A slow roast like that might give you some pretty good flavor, too.
Comment: This is a great idea, I will definitely try this myself. It reminds me of drying membrillo in the oven:  http://www.cooklocal.com/?p=2396
Comment: @Allison: If you get fruit leather, you're cooking it too long. The skin can be dealt with by stirring frequently (as bikeboy says), and also simply by making the layer thin enough.
Comment: I think this is more likely to result in something the texture of fruit leather, rather than a paste.  You'd probably need to stir quite frequently to prevent an unpleasant "skin" from forming on top.
Answer: As Italian I prepare my Tomatoes sauce every year, here are the steps.
Choose good pear like tomatoes, in Italy we have the San Marzano's tomatoes that have just a little bit of water (are the best IMHO).
You cut them and then you mesh them with vegetable mill or a mixer.
Be aware, here you have the greatest secret ever.
Take an old, clean cotton made cushion cover (or just a cotton bag), fill it with your sauce and hang it on a broom handle between two chairs (keep a container under the bag to avoid to loose water)
Keep it some hours till the sauce will loose all the water (you can help pushing with your hands).
Cook the sauce with just basil (no salt, never!)
Then you can sterilize the jar, but this may be another question ;-)
Answer: This is how I usually get a nice thick sauce home :

Blanch the tomatoes and peel off the skin
Mash the tomatoes into a puree (Either squish them using a wooden spoon, or use a blender, depending on the recipe you want to use it in. For eg., I sometimes like a good, smooth, blended sause for a sphagetti dish, but prefer a roughly mashed-up pulpy sauce for some vegetable curries)
Put it on stove-top and bring to boil on a low flame. Stir occasionally to avoid burning.
I also add sugar and salt at this point and continue to boil. (Seasoning is optional of course)
Take cornflour in a small bowl and mix with a bit of water to make a smooth paste.
Add the corn paste slowly to the boiling puree, keep stirring to avoid lumps. Gradually the puree thickens. The quantity of cornpaste depends on how much tomato puree you have, and how thick you want your sauce to get. You can try making a paste with two teaspoons of cornflour, but only add a little of it at a time.Continue adding till you get the right consistency.
Once the paste reaches the desired consistency you can take it off the stove top and use it in recipes.
Comment: -1. Sorry, but this is just a sauce thickened with corn flour, not a tomato paste. IMHO, the whole point of tomate paste is the concentration of flavour, not the consistency in itself.

How do you make tomato paste?


How can one create a file shortcut inside the Android file system?

Question: I don't want to create a file shortcut on the desktop, I want to create a shortcut inside the Pictures folder to the DCIM folder. My mom is able to handle tech stuff, she used to work for HP. But she's getting forgetful and keeps forgetting that I have told her multiple times that her photos are under DCIM and not Pictures. If I have to root her phone to make this work, that's not an issue, I have plenty of experience with that, and have already researched how to root her particular model of phone. I believe the version of Android on the phone (AT&T LG V20) is 7.0 Nougat. Thanks for any help you can offer!
Comment: As a workaround, I suggested you introduce her to the gallery, there she can find all the pictures, and the file is called camera instead of dcim
Comment: The gallery works, but IMO it can be a rather convoluted mess and hard to find things in. On my phone for instance, I have tons of music on my micro SD card along with album cover jpegs. Gallery sees all those thumbs and absolutely pollutes my gallery with them. I have to scroll through hundreds of things just to find the download folder.
Comment: @Braden'sPC's There are many gallery apps that can exclude such images. You can even pin important folders like Camera. Downloads to the top so you don't have to scroll down everytime. If your favourite gallery app does not have this feature, just create an empty file named `.nomedia` and Android will exclude that folder by default in every gallery app.
Comment: Ooooh. Learning something new everyday. Thanks!
Comment: It's those little things in Android that you never hear about until you do lol
Answer: What you are looking for is called symbolic linking
ln -s command is your friend. Now depending on your device and the file manager you use, this process can differ. I don't think you'll need root for this, but if your device doesn't come with symbolic linking by default, you'll need root to add this.
And like the other comment said, it's better to use a Gallery app for photos rather than doing this.


Exchange 2010 Mail Enabled Public Folder Unable to Recieve External (anon) e-mail

Question: I am having issues with my "Public Folders" mail enabled folders receiving e-mails from external senders.
The folder is setup with three Accepted Domains (names changed for privacy reasons):
1 - domain1.com (primary & Authoritative)
2 - domain2.com (Authoritative)
3 - domain3.com (Authoritative)
When someone attempts to send an e-mail to firstname.lastname@example.com from inside the organization, the e-mail is received and placed in the appropriate folder.  However, when someone tries to send an e-mail from outside the organization (such as a gmail account), the following error message is received:
"Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 554 554 Recipient address rejected: User unknown (state 14)."
When I try to send an e-mail to the same folder, using the same e-mail address above (email@example.com), but with domain2.com instead of domain3.com, it works as intended (both internal & external).
I have checked, double checked, and triple checked my DNS settings comparing those from domain2 & domain3 with them both appearing identical.
I have tried recreating the folders in question with the same results.
I have also ran Get-PublicFolderClientPermission "\Web Programs\folder" with the following results for user anonymous:
RunspaceId   : 5ff99653-a8c3-4619-8eeb-abc723dc908b
Identity     : \Web Programs\folder
User         : Anonymous
AccessRights : {CreateItems}
Domain2.com & Domain3.com are duplicates of each other, but only domain2.com works as intended.  All other exchange functions are functioning properly.
If anyone out there has any suggestions, I would love to hear them.  I've just hit a brick wall.
Answer: Turned out it was a setting buried in our spam filter.  Problem resolved.


Document Library permission issue

Question: I'm having the following issue in terms of using a Document Library.
The company that I work for issues loans to customers and they want to store all that loan customer information in a SharePoint Document Library. There are probably 100,000 customers and up to 1 million documents. They are trying to create a Document Management System (DMS), and they have a requirement where only certain people in certain layer can see a certain document (because some of the documents are confidential depending on some level). Other people can request access to certain documents and they can get a permission from the user that already has access to that document. So he/she can "share" that document with the requestor.
The key thing is that, they don't really wanna put a permission/sharing on each individual document, because there are too many documents and they might eventually lose track of what documents are shared with whom. They are trying to put a filtering Web Part so only through that people can search the document and the Web Part will filter who can see what document, but the issue is that in Document Library people can just type the URL of the document and get a direct access to the document. Since there are no document level permission, we have to give everyone a permission to see all the files in the Document Library.
So my question is, is there any way to disable Document Library direct browser URL access to a document like "http://sharepoint/sites/site1/LoanInformation/Loaninfo12.doc"? Right now we have to set all the documents permission for all users as "Contribute", but they shouldn't see all the documents, because they are suppose to go through the Web Part that filters the document by a secondary list that we come up with? Is there any way to disable direct URL access to a document, but not necessarily giving specific permission to each file?
We are basically trying to trick the user thinking the Web Part search page is the only access to the documents, and you really shouldn't go to "Site Contents -> Document Library" to see all the documents (which everyone has permission to).
What is the best way to accomplish all this?
Answer: I don't know if this can help you, but here's anyway:

You can hide the document library from "Site Contents" by editing the list properties using sharepoint designer.
The "Read" permission is the way to avoid unwanted manipulation of your list items (You can set the "Contribute" level only to some people, and "Read" for the rest.)
You can modify too the "Contribute" level (View, add, update, and delete list items and documents) to not allow deletion.

Document Library permission issue


How can the required wing area for climb be calculated, given aspect ratio?

Question:
I'm currently working on problem 3.20 from the picture above. In order to find the rate of climb, I'm using the formula Rate of Climb= (Power available - power required)/weight. Doing this, I need to find the power required, which the formula I'm using is Pr=sqrt((2*W^3*Cd^2)/(densitywing areaCl^2)). Now I have everything but the wing area needed for this climb. Given the aspect ratio of 12 and a Cd of .01, how do I calculate this. Also, please let me know if there is a simpler way of going about this problem. Thanks
Comment: You get the wing area from solving 3.19.
Comment: It's a human powered aircraft. The text even mentions the Gossamer Condor. Isn't the propulsion system obvious?
Comment: I didn't realize, but from problem 3.19 what type of propulsion system should I use for calculations?
Comment: That was my mistake. But I am still having a hard time finding the wing area from problem 3.19 because the cruising flight velocity formula involves wing area and required wing area for climb requires a velocity? What formula can I use with the given variables?
Comment: Could you edit question and add references of that book ? Might be of some interest for many people here.
Answer: Let's start with 3.19, since you need the result for 3.20. The parameters given suggest that we should calculate drag $D$ with the parabolic formula $$D = \frac{\rho}{2}\cdot v^2\cdot S\cdot\left(c_{D0} + \frac{c_L^2}{\pi\cdot AR\cdot e} \right)$$
I haven't seen the symbol $R_A$ before, but its magnitude suggests it is the aspect ratio (normally $AR$ in the US, $\Lambda$ elsewhere). Since the whole is an optimisation problem (we look for flight with minimum power consumption), we can determine the lift coefficient $c_L$ already. For propeller aircraft the point of minimum power is when the lift coefficient is $$c_L = \sqrt{3 \cdot \pi \cdot AR \cdot e\cdot c_{D0}}$$
Hey, you know all terms already! This allows you to proceed to the wing area once the needed lift is known. My next heroic assumption is that $W$ actually denotes a mass (the unit seems to say it is pound-force). The power plant should weigh 100 - 150 lbs already, so 200 lbs for the whole aircraft seems reasonable. So you can proceed:
$$L = 200 lbs \cdot g = \frac{\rho}{2}\cdot v^2\cdot S\cdot c_L$$
Plug in what we know, use sea level density ($\rho = 1.225 \frac{kg}{m^3}$) and the previously calculated lift coefficient:
$$S\cdot v^2 = 1527 \frac{m^4}{s^2}$$
This gives you pairs of wing area and speed squared which together fulfil the requirement. Some pairs, though, make more sense than others. Generally, the biggest wing will need the lowest power but will become increasingly fragile as wing area increases.
But there is still one requirement left: We cannot use more power than those 0.33HP:
$$P = 0.33\cdot0.7 HP = 172 W = D\cdot v = S\cdot v^3\cdot\frac{\rho}{2}\cdot0.04$$
$$\rightarrow S\cdot v^3 = 7094.8 \frac{m^5}{s^3}$$
Both conditions can be fulfilled when the flight speed $v$ is 4.646 m/s. This makes the wing area $S$ = 70.735 m².
Solving this for Denver, CO and finding the climb speed with 0.6 HP of power should be easy now. Just calculate the SEP and you know the climb speed.
Answer: I believe what you are missing here is the fact that this kind of an aircraft would cruse at best $L/D$ ratio.

Solve for $CL$ which gives best $L/D$ from the given $Cd_0$ and $Cl_0$ (parabolic drag model)
with this $CL$ solve for velocity and wing area.
Power required $(D*V)$  and Rate of Climb can also be found from the same drag model.

Hope this helps.
Comment: Best L/D is the point of lowest drag. I would prefer to fly at the point of lowest power consumption.


What is the difference between HSV and CIE-Lab color space?

Question: When do we (or should we) use HSV color space and when do we use CIE-Lab color space?
Comment: While CIE-Lab is a perceptual color space, certainly the most popular and well known, it's not the only one. See e.g. [CIE_CAM02](https://en.wikipedia.org/wiki/CIECAM02).
Answer: A perceptual uniform color space ensures that the difference between two colors (as perceived by the human eye). It is proportional to the Euclidian distance within the given color space.
You may think that the lightness component of the HSL color system or the value component of HSV will solve this problem, It's wrong.
The L component of the HSL and the V component of HSV describe the brightness of a color relative to a base color. If this base color is blue you will get a darker color than if this base color is yellow, HSL and HSV are very useful if you need to create a lighter or darker version of a color but aren't very useful if you want to know how bright a color is.
But, the relative perceptual differences between any two colors in Lab* can be approximated by treating each color as a point in a three-dimensional space (with three components: L*, a*, b*) and taking the Euclidean distance between them. Lab was created to satisfy the perceptual uniformity property.
Comment: great answer for me, thanks
Answer: Both have their usage:

HSV / HSL colour models offer a quite useful separation of hue and saturation which is really important for creative operations such as colour correction and colour picking for instance (as a matter of fact most colour pickers offer a way of adjusting / defining your colour through a HSV colour model). However the way those models compute Brightness / Lightness is incorrect and yields non uniformity: http://www.poynton.com/notes/colour_and_gamma/GammaFAQ.html#HSI

CIE Lab is a perceptually uniform colourspace where the Lightness Y is properly computed thus will result in accurate colour transformations if you perform them in this colourspace which is important in colour science, and probably less in creative applications where it is almost impossible to do anything with the opponent a and b axis.
Answer: The history of HSV/HSL was that it had a low CPU overhead and was a 'good enough' approximation at the time.  Essentially it was the stop gap used in the industry until there was enough CPU power to enable a Lab workflow.
So the answer is Lab is the way to go.  Though there are plenty of ways to mimic some of the Lab behaviours using the blending modes in RGB.  But definitely of HSV/Lab then it should be Lab every time.
Comment: Do you have a reference for this statement: "The history of HSV/HSL was that it had a low CPU overhead and was a 'good enough' approximation at the time."? I've never heard that claim before, so I'm really curious about it.
Comment: I would have done at the time, but it was over 2 years ago.  Since the question is relating to `Lab` then it was probably paraphrasing the words of Dan Margulis, who was well connected to Adobe Photoshop engineers from an early stage and one of the earliest adopters of digital workflows (pre-PhotoShop).  My guess would be a mailing list entry (many are achived so just do a web search for it.)


Stuck with nvidia boot screen instead of login

Question: I'm new to Linux and today my computer froze while watching youtube. I had to reset using the power button and after the elementary logo when you expect to get the login screen I got stuck with the following nvidia logo-screen:
(https://i.stack.imgur.com/tMZYq.jpg)
I've tried to format my computer, install the drivers from a run package from the official site. But also nvidia-375 and nvidia-381 from the ppa.
The only way not to get stuck on this screen (that i've found) is to uninstall the nvidia drivers using the grub recovery mode > root shell prompt. Then boot the OS by adding nomodeset in front of quiet splash in the Linux line in grub and then boot. This is ofcourse not a solution, so what should I do? It feels like I've tried everything.
I have a gtx 570 GPU
Answer: Try this,
Ctrl + Alt + F2 to switch to a console mode
<code>sudo prime-select intel
</code>
Ctrl + Alt + F7 to switch to graphics mode
Enter password try to login, and it will show you login screen again, type you password again and voila


Is BQP equal to BPP with access to an Abelian hidden subgroup oracle?

Question: Is BQP equal to BPP with access to an Abelian hidden subgroup oracle?
Comment: Actually there is a fair amount of work on non-Abelian hidden subgroup problems in quantum algorithms research, so I certainly hope this is not the case!
Comment: @Joe: I thought most of the work on non-Abelian HSPs was for groups that are somehow "close to Abelian" -- but please correct me if I'm wrong, as I'm no expert in the area.  But if that is indeed the case, then a positive answer to the question might not contradict the works you refer to.
Answer: Like many complexity-class separations, our best guess is that the answer is that BPP^{HSP} != BQP, but we can only prove this rigorously relative to oracles.  This separation was observed by Scott Aaronson in this blog post
where he observed that the welded-tree speedup of Childs, Cleve, Deotto, Farhi, Gutmann and Spielman was not contained in SZK.
On the other hand, BPP^{HSP} is contained in SZK, at least if the goal is to determine the size of the hidden subgroup.  This includes even the abelian HSP, although I'm not sure how exactly to find the generators of an arbitrary hidden subgroup in SZK.  The reason we can decide the size of the hidden subgroup is that if f:G->S has hidden subgroup H, and we choose g uniformly at random from G, then f(g) is uniformly random over a set of size |G|/|H|. In particular, f(g) has entropy log|G| - log|H|.  And entropy estimation is in SZK.
Comment: I knew I had seen a blog post about this somewhere!
Answer: I have no idea how one would disprove a claim like that, but I doubt that it's true. We do have other exponential speedups by quantum algorithms that don't rely on the Abelian HSP. Moreover, Abelian HSP is not known to be BQP-complete.
On the other hand, problems which are known to be BQP-complete are problems like computing Knot invariants, other manifold invariants, partition functions and doing Hamiltonian simulation. With an oracle for any of these problems, BPP would be as powerful as BQP.
Finally, I'm sure one can construct an oracle separation between the two classes you mention, but that would not be a fair way to compare them since one class can make quantum queries and the other cannot, so the separation would merely reflect this fact.
Comment: The quantum algorithms zoo (http://www.its.caltech.edu/~sjordan/zoo.html) has a large list of algorithms and references for each.
Comment: @Joshua: Those oracle separations are fine, because they're trying to exhibit the power of quantum queries. Let me give an example of what I mean. If there were a polytime algorithm for 3SAT, and let this algorithm be called X. Clearly P^X contains NP. Yet, we can construct an oracle separation between P^X and NP, because in the first case only the P machine can access the oracle, and the separation merely reflects the fact that non-deterministic queries are better than deterministic queries. Similarly, even if BPP^AHSP contained BQP, we could separate them with an oracle quite easily.
Comment: Thanks for all the answers. In particular, thanks for reminding me about the Jones and HOMFLY polynomials, which have nothing to do with HSPs. Evaluating the Jones polynomial exactly at fifth roots of unity is #P-hard, but approximating them up to some fraction epsilon with some probabilistic accuracy is in BQP.
Comment: what are the references on problems with superpolynomial speedups that don't rely on the Abelian HSP?
Comment: a more precise question is "what are the references on problems with superpolynomial speedups that don't rely on the HSP at all?"
Comment: @Robin: I'm not sure I understand why you say an oracle separation would be "unfair" in this setting.  What is it that makes this setting different from, say, comparing BQP to P^NP, SZK, or PH by oracle results (or do you also think those results are unfair)?
Comment: @Robin: Thanks for the clarification.  In a sense, both examples are really about giving a machine oracle access to an object that either does not or that we don't allow to relativize (in the first case, the object is a classical TM deciding unrelativized 3SAT, and in the second case AHSP).
Answer: I have to agree with Robin that this is not necessarily an easy claim to disprove, though it is almost certainly false. An immediate reason that makes me doubt it is that post selected quantum computation is equal to PP, and this would seem to hint that the statistics would be difficult to recreate. Scott Aaronson has a paper at STOC showing that there is an oracle relation problem which is solvable in BQP but not PH.
Additionally, Scott also seems to have a result showing that efficient classical sampling of the output of boson scattering would imply $BPP^{NP} = P^{\#P}$ (latex won't allow # here), which seems incredibly unlikely. I would think that you will get a similar result even if you allow an Abelian hidden subgroup oracle. Of course this also implies a barrier to deciding your question, since if the Abelian hidden subgroup problem was in P, then an affirmative answer would imply the collapse of the polynomial hierarchy.
Comment: P^{#P} = P^{PP}, so you could use that instead.
Comment: Yes, that would have been the smart thing to do!


How can I delete all the gdb related windows/buffers after `q` in gdb CLI window

Question: I use (setq gdb-many-windows t) and (setq gdb-show-main t) configurations in my init.el, so after executing M-x gdb, there will be six windows in the frame, after typing q in the main gdb cli window to finish debugging, how can I quit/delete all the gdb related windows/buffers (including the current gdb CLI, locals, breakpoints, stack frames...) and just leave the source code buffer open at the same time.
Answer: After googling around and tweaking the code snippets from the internet, I got this solution and it works as expected:
(defvar all-gud-modes
  '(gud-mode comint-mode gdb-locals-mode gdb-frames-mode  gdb-breakpoints-mode)
  "A list of modes when using gdb")
(defun kill-all-gud-buffers ()
  "Kill all gud buffers including Debugger, Locals, Frames, Breakpoints.
Do this after `q` in Debugger buffer."
  (interactive)
  (save-excursion
        (let ((count 0))
          (dolist (buffer (buffer-list))
                (set-buffer buffer)
                (when (member major-mode all-gud-modes)
                  (setq count (1+ count))
                  (kill-buffer buffer)
                  (delete-other-windows))) ;; fix the remaining two windows issue
          (message "Killed %i buffer(s)." count))))

You can bind the kill-all-gud-buffers to a key or defalias it to a short name or even change the function name so you can type it easily.
Comment: In realgud, the situation is both more complicated and simpler. There can be many debug sessions going on. But the command buffer for a single debug session has a list of the source code buffers associated with it.  If you want to write the corresponding function for realgud, you would use field srcbuf-list of the buffer-local variable realgud-cmdbuf-info, I'd consider adding this to the code base.


What instrument gives the sound of artillery?

Question: I am in the midst of composing a piece in which I want the sound of artillery. What musical instrument can give this sound? (I am excluding actual artillery pieces and recordings of shots)
Comment: I composed a piece once that needed machine gun fire, artillery and a helicopter and I was able to do it all on acoustic guitar using harmonics, muting, sliding and other less common effects involving striking muted strings at certain places and sometimes letting the resulting sound resonated by removing the damping finger after striking the string.  If you have an interest in hearing the result and learning exactly how I did it ,  I can post an answer (when I have time) including a sound file so you can hear the result - as well as detailed instructions on how I played each sound.
Comment: "I am excluding actual artillery pieces and recordings of shots" - alas, I wanted to suggest the Tchaikovsky approach.
Comment: @RockinCowboy  BT Reminds me of Hendrix at woodstock https://www.youtube.com/watch?v=MKvnQYFhGCc Watching this now he makes some very convincing warplane sounds, but murders the national anthem. Of course in the political climate of the day, that was precisely his intention.
Comment: @RockinCowboy I don't play the guitar, so it wouldn't work for me.
Comment: @RockinCowboy post it anyway. It sounds interesting to me.
Comment: @steveverrill - It would probably be best for me to record a video and post on YouTube and link to the video.  What I do on the war song I wrote is all done on acoustic guitar.  I can hear the bombs bursting in air in the youtube vid of Hendrix Star Spangled Banner rendition.  Interestingly, the song I wrote incorporates taps too (like Hendrix did in the vid).
Answer: Traditionally one uses tympani. Another solution I have seen was to fire a blank round into a tympani with the head removed. I would guess that any large drum would be ok.
I've also heard 105mm howitzers firing blank rounds; that's pretty effective.
Comment: It's tricky to get the tension right, but a very cool way to get this from timpani is to use a bungee cord attached tightly to both sides of the drum across the head. Lift the bungee up as high as you can and then suddenly let go.
Answer: I don't think I'm allowed to do this on this SE. There is a piece by Tchaikovsky which is. Called Overtures 1812. In this incidental piece there is artillery written in the music. In performance there were a few which did use live artillery but most didn't. He ( Tchaikovsky ) himself never conducted the 1812 with live artillery. My advice to you is first look up for this overture in wikipedia I'll bring it down by copy paste "^ In the sections that contain cannon shots, actual cannon are sometimes replaced by recorded cannon or played on a piece of staging, usually with a large wooden mallet or sledgehammer. The bass drum and tam-tam are also regularly used in indoor performances." There is another. Place that discusses ways to duplicate artillery  but I don't remember it right now.
Comment: You can post excerpts of other web pages in here as long as it is just an excerpt, and you give a reference/link back to the original site. You can use the quote tool in the post editor to show it is a quote
Comment: It  was quite along  time a go, I remember it was a detailed discussion what instruments to use together  to blend. Together it will sound so and so etc. I need to remember it was years ago when  actually wrote down the overture so I did some research.
Answer: You can use a "stick shot" on a snare drum.  Hold one stick on the drum (tip on the drum head, shaft of the stick on the rim), then hit it really hard with the other stick.  Or if you want machine gun-like fire, an open snare roll on an appropriate snare has been used historically in classical music for this sound.  Or you can experiment with other drums or surfaces using this same technique.
I wouldn't recommend the timpani suggestion.  It's unlikely you'll find a timpanist who would be willing to do that to their timpani.  The roundness of the shells, quality of the head and shells are important to the intonation.  So timpanists are sometimes hesitant to try anything extreme. But you can ask a timpanist what they would be willing to do to get a similar effect.  A bass drum would probably be better, they're not fragile and percussionists are less scared to beat the crap out of them.
If you know a percussionist schedule a time to hang out and hit stuff!  See what sounds like the kind of artillery you're looking for
Answer: There is a gunshot sound in the General MIDI percussion bank. So any sound bank or tone generator providing GM sounds will have something to offer.
You could notate it with a comment gunshot sfx, perhaps with an X-shaped note-head so you can indicate the rhythm. Or you could use the note which produces that sound in the GM percussion bank and explicitly require that (+ a note explaining that this note in this portion of the piece indicates the gunshot sound-effect). The choice here might depend upon whether you choose to give the responsibility for this sound to the keyboardist or the percussionist.
Or for showmanship, you could take a few paper cap-gun caps and smack 'em with a hammer. Choose carefully the surface upon which you do this. Something like an old metal wash tub might make some evil reverberations.
Comment: That might depend on the specific kind of MIDI sound module. Many use synthesis instead of a bank of recorded sounds.
Comment: The MIDI suggestion seems to go against the "no pre recorded sounds" requirement.  I do like that cap gun caps suggestion, though they may need to be amplified to make it have an artillery feel rather than a distant fireworks feel.
Answer: I've performed the 1812 Overture and for the cannon sounds we used open metal dustbins with explosive charges in them. If you go the explosives route, get someone who knows what they're doing...
Answer: For heavy artillery: consider a combined strike of the lowest timpan and the base drum; the attack of the timpan and the sustain of the base drum get close (although such timing is tricky to realize during a performance)