Can we describe Quantum Mechanics using filters and matrices?

Question: Can mathematical filters or ultrafilters be used to predict quantum physics 'events' as accurately as using matrices like Schrodinger did? Is there a way to explain some of the predictive power of quantum mechanics with matrices on an amateur level?
Comment: what is a "mathematical filter"?
Comment: There are aspects of quantum mechanics that can be explained (roughly) without all the mathematical jargon. What specifically would you like to know?
Comment: How does using non-commutative matrices aid with quantum mechanics prediction ability? Can such use of matrices explain the uncertainty principle?
Comment: I think there is a book in the Bata Library at Trent University in Ontario describing how to use Filters and Ultrafilters to explain some of Q.M.
Answer: To quickly answer your question about the non-commutativity of matrices (and more generally operators): The uncertainty relation is entirely a consequence of non-commutativity. The uncertainty relation that you are talking about is a consequence of a much more general statement. It goes something like this...
Let $A,B$ be operators (thinking of the as matrices is fine) and let $AB - BA = C$ (operators, in general, do not commute, so this is usually nonzero). Then after a little bit of work one can find
$$ \Delta A \Delta B \geq \frac{1}{2} | \langle C \rangle | $$
where $\Delta A = \sqrt{ \langle A^2 \rangle - \langle A \rangle^2 }$. This follows from a famous inequality, Cauchy-Schwarz Inequality.
The uncertainty relation that you are familiar with $ \Delta x \Delta p \geq \frac{ \hbar }{ 2 } $ is because $ \hat{x} \hat{p}_x - \hat{p}_x \hat{x} = i \hbar  $ (the hats distinguish operators from numbers).
On a final note, the argument in the previous answer about calculus being a fundamental basis for exploring quantum is wildly incorrect. The best language for understanding quantum mechanics and discovering deeper truths would be Geometric Algebra (and, more generally, abstract algebra). Geometric algebra's are a extremely powerful language for doing quantum theory (and physics for that matter). I am talking about Clifford algebras, Jordan algebras, Lie algebras, and so on. There has been a massive paradigm shift in the past few decades in the setting theoretical physicists do quantum mechanics. This shift is entirely motivated by Geometric algebras. There is, arguably, new physics lying within these algebraic structures, waiting to be unpackaged by the clever physicist who realizes the correct way to apply them. This is not to say calculus is not important. It will always play a role, but it is not the proper setting for understanding quantum theory and beyond.
I could go much further with this argument, but it would rapidly get to mathematically sophisticated. Since you are just looking for a little insight, there is no need to walk that path.
Edit: It has been a while since I wrote this and I would like to add something based on the other answers here. The fact that a quantum particle has a associated wave-function is not a fundamental tenet of quantum mechanics. The postulates of quantum mechanics are as follows

States of a quantum system are described by normalized vectors in the associated Hilbert space $H$.
For any classical observable $A$ there is a corresponding Hermitian operator  $\hat{A}$ acting in $H$. Conversely, any Hermitian operator corresponds to some observable.
A measurement of A yields one of the eigenvalues of the corresponding operator $\hat{A}$.
A measurement of $A$ on many identical copies of the system, all in the state $\left| \psi \rangle \right.$, produces random results. The probability to find the eigenvalue $a$ of $\hat{A}$ is $\langle \psi \left| \hat{\mathbb{I}}_a \right| \psi \rangle$, where $\hat{\mathbb{I}}_a$ is the projector onto the subspace generated by the eigenvectors associated with $a$. Equivalently, the probability density of $A$ can be written as $P(A) = \sum_a P(a) \delta (A - a) = \langle \psi \left| \delta ( A \hat{\mathbb{I}}_a - \hat{A} ) \right| \psi \rangle$.
A measurement affects the state of the system (this is often referred to as the wave function collapse): right after the measurement the system is in the state $\left| \psi_a \rangle \right. \propto \hat{\mathbb{I}}_a \left| \psi \rangle \right.$, a normalized eigenvector of $\hat{A}$ corresponding to the eigenvalue $a$ found in the measurement.
Between the measurements, the state of the system evolves according to the Schrodinger equation $$ i \hbar \frac{d}{dt} \left| \psi \rangle \right. = \hat{H} \left| \psi \rangle \right. $$ where $\hat{H}$ is the Hamiltonian operator of the corresponding physical system.

That is it. All non-relativistic quantum theory stems from these axoims or, if you prefer, postulates. Further I must add that calculus is NOT what is needed to probe deeper into quantum theory. If this was true physicists would have been finished as soon as they started. The entire reason quantum mechanics is so difficult to comprehend both physically and mathematically is because the the foundation of the theory is built on mathematics that is far more sophisticated that Newton's/Leibniz's calculus. Today, most theories in modern physics do not stand on the shoulders of simple calculus, not even modern day classical mechanics! For example, the mathematical model of the Standard Model of Particle physics is group theory (extremely important, start learning it), and we know that it is even limiting us! There is an even more sophisticated foundation for the standard model called the Clifford Algebraic Standard Model, and the current hopes is that it can be the path way that help us understand the new physics scales neutrino masses are going to introduce. Now of course you we will always use calculus, but my point is that it is old news. We are far far beyond this. If you want more examples of what I am talking about look up what things like Lie theory have done for nuclear physics, what differential geometry and topology has done for General Relativity and Gravity, even look up how we formulate classical mechanics today!
Answer: There is always a level of mathematical understanding. The trick is to be honest with yourself on where you can understand the articulation. The most basic introductory text that describes quantum fields with mathematics( and eventually matrix formulations) that I have encountered is Griffiths - Introduction to Quantum Mechanics. It assumes some knowledge of calculus and linear algebra but that is about it.
The fundamental tenant of a quantum particle is that it behaves as a wavefunction. For this moment, just think of this wavefunction as some function on a graph like $f(x) = \cos{x}$. We can represent a quantum particle in a state $\alpha$ and a representation $q$. Usually these representations are position, momentum but they can also be more abstract concepts like energy level or spin. For example, we write $\psi_\alpha (x)$ as a wavefunction in a state $\alpha$ and at a position $x$. What we actually see are not the wavefunctions themselves but squares of the wavefunctions, namely their probability densities. We sum these wavefunctions over the particular representation in order to the find a probability of finding this particle between the a and b.
$$P_{ab} = \int\limits_a^b dx |\psi (x) |^2$$
Note that $|\psi(x)|^2 = \psi^*(x) \psi(x)$ where $\psi^*$ denotes the complex conjugate. If we want to talk about the matrix mechanics of the quantum realm we will talk about things that are now known as vectors.
That same wavefunction that I have written above? I can also write it like
$$\psi_\alpha(x) = \langle \alpha | x \rangle $$
This is the inner product of two "vectors" $\langle \alpha |$ and $| x \rangle$. You can think of $\langle \alpha | x \rangle$ as a contraction of two vectors as a dot product into a scalar valued function.
$$\underbrace{{\boldsymbol v} \cdot {\boldsymbol u}}_{\mathrm{contracting\,\,\, two\,\,\,vectors}} = \underbrace{u_1 v_1 + u_2 v_2 + ...}_{\mathrm{scalar \,\,\,valued}}$$
This is very much the basis of the matrix formulation of quantum mechanics. Note that in reality we usually deal with infinitely dimensional vector spaces so that these arguments are just serving as an intermediate stepping stone to more abstract concepts. Most of the quantum books are not suitable for an amateur with no multivariable calculus or linear algebra background but there are some texts, like the aforementioned, that start off slow and convey important framework first.
Comment: Can Q.M. be partly explained without complex integration?
Comment: There are many books/movies/tvshows that can talk about quantum mechanics and the applications thereof. But when you specifically ask for the mathematics I believe you need to talk about quantum mechanics with integration. Calculus is the fundamental mathematical theory that brought classical mechanics to the world so it must be used to dive deeper into the quantum world (where classical mechanics breaks down)
Comment: Is there a discete analog to complex integration that can be used with Q.M.?
Comment: Absolutely. Remember that all integrals can be represented as summation, $\sum\limits_{k} f(x_k) \approx \int\limits f(x) dx$ if the distance between each $x_k$ is small. See Riemann summation.
Comment: I read in the A.M.M that Descartes thought of a method to calculate derivatives without using limits, a 'double tangent point' method(I'm not sure about the name). Is there a way of extending this to integration?
Comment: @user128932 You could ask that on the mathematics site.


How to adjust the font size in Ubuntu browser?

Question: Before you flag my question as already answered, please note that I am try to see the text in "Ubuntu Browser," not Chrome or Firefox, etc. Ubuntu Browser has a desktop icon that is a blue map of the world with a compass needle overlay. I intalled it from Ubuntu Software.
The text in Ubuntu Browser is too small for me to see using a 24 inch monitor.  I can adjust the font in Chromium and Firefox and on the Ubuntu desktop and system.
I can not find a way to adjust the font in the web browser named "Ubuntu Browser." Ubuntu Browser may be a newer app for Ubuntu 16.04.
Thanks for you help!
Answer: I don't think the Ubuntu browser zooms at this point.
Its a version of very lightweight browser called Oxide (https://launchpad.net/webbrowser-app) and this issue is a known bug in Oxide (https://bugs.launchpad.net/oxide/+bug/1447395).
There are tweaks and hacks for zooming/magnifying the screen (Zoom desktop tool for Ubuntu 14) but I doubt these will satisfy you.
Comment: Thank you very much for taking your time to share your insight! I never would have been able to switch to Ubuntu from Windows without you and others helping me.
Comment: You're welcome. Whenever someone helps don't forget to check that their answer is helpful.  It marks the question as answered.


Does Nautilus Support Undo/Redo for Basic File Operations

Question: I was wondering if Nautilus has undo/redo features for basic file operations. To be specific, I want to be able to undo moving, renaming or deleting a file.
Comment: It is the file manager's (which is Nautilus) job to undo or redo file operations and not Unity.
Answer: That's something that would be handled by Nautilus. I don't have it installed so I can't check (currently running Xubuntu) but I don't believe they have implemented it yet.  They are working on adding that feature, and I believe Nautilus Elementary already has it. You could also use another file manager like 4pane that already has undo/redo
Dolphin also has undo/redo
Comment: I can confirm that Nautilus Elementary has it, but I had no idea that regular Nautilus doesn't come with these options.
Answer: Nautilus just recently got this feature to undo changes in GNOME 3.4. You can read about this feature in this bug report which discussed the feature before implementing it.
But, what this means is that you can only undo your changes if you are using 12.04 as the Nautilus in older versions do not have this feature.
Answer: Tried searching for undo option with an out-of-the box 11.04 Unity, seems like if you keep it stock, there is no option to undo changes.


Kitchenette vs. kitchen electrical circuits

Question: I am living in a mother-in-law suite in the lower level of a 2003 home.   I just had a 6ft. kitchenette installed.  I will use a small fridge, a toaster oven, and a coffee pot.   The electrician installed one circuit that covers 3 wall plugs, only one of which (on top of counter, not fridge) has test/reset buttons (not sure what those are called).   Is this single circuit installation up to code?  Kitchens require 2 circuits, but what about a small kitchenette?
Comment: Also the single GFCI (plug with buttons) may be protecting the other ouletets.  Try this, press the Test button (not reset just yet tho, only test)... No plug something into each of the three outlets.  My prediction is they will all be off.  Now press Reset and they will all be back on again.
Comment: A kitchen is defined as: An area with a sink and permanent provisions for food preparation and cooking. if there is a installed oven or cook top this would meet the definition and would require 2 circuits. Many electricians will run a multi wire branch circuit to provide the 2 required circuits. If no permanent fixtures are installed your install could be legal unless local codes require the additional circuit.
Comment: Does the kitchenette have a sink plumbed?
Answer: It called a Gfi outlet as long as the gfi is in the first outlet in the line from breaker it will trip before it gets to breaker box even if the last outlet shorts out our gets wet that is code in most states you are good and safe with that type of install
Comment: GFIs don't generally trip on a short circuit, at least that's not their purpose. In fact it should not trip if the short is line to neutral. You may want to read up on how GFIs work. Also, try writing in sentences, your stuff is hard to read. Also, as stated above, kitchens require two circuits, which is what the OP is asking about.


Is there a OpenID provider in Europe?

Question: Does anybody know a Europe-based provider for OpenID?
I am not using one of the well-known bigger services (Yahoo,..).
Answer: I have developed one myself, LoginBuzz. It is primarily Danish and I have first translated many parts of it the last week, but it should be fully functional.
It supports simple registration, attribute exchange and PAPE. I have also implemented CardSpace support and text messaging (only available in Denmark at the moment) for a more secure authentication process. In a near future it should get support for client certificates as well.
My main goal is keeping it simple and fast. What you really want is to go back to the site that requested the authentication, not to spend time on the provider´s site.
I am very interested in feedback for making it a better service.
Comment: Has that provider moved elsewhere?
Answer: And of course, there is the Clavid OpenID provider supporting many secure authentication mechanisms.

Is there a OpenID provider in Europe?


Being made to move offices often

Question: I have been with my current company for 4 years and have had to move offices 11 times. It is getting to the point where I don't unpack anything anymore. The reasons for the moves vary from simply the whim of my superiors to "we would like you closer to this or that" or "You shouldn't be in an office all by yourself so we will move you over here." They are gearing up to ask me to move again and I want to politely decline. How do I tell them I'm tired of switching so often?
Comment: Not an answer, so just a comment : it's standard in the corporate setting. There is not much you can do. Just, learn to move. You already began(by not even unpacking) to learn.
Comment: If you decline and they say move or you are fired what would you do?
Comment: Are you the only person who's being asked to move so regularly?
Comment: Is this moving within a building(s) or moving between different city locations?
Comment: Sounds like [Office Space](https://youtu.be/Vsayg_S4pJg)
Comment: Welcome to the modern workplace. Many of us don't officially have desks at all; supposedly we're just working at whatever desk is available. (In practice people still try to gather with their own department, in most cases.)
Comment: @keshlam - hotdesking was a popular thing about a decade ago - most organisations have realised its a provisioning nightmare and much better to have more permanent arrangements.
Comment: Unfortunately, not all. My site is supposedly run that way. In reality all it means is that the space and furniture battles are unofficial. And, perhaps, that nobody can complain if the area turns into a maze on April 1st.
Answer: Be honest, but polite. It's better to ask not to move rather than refusing to move outright, since this is still management you're talking to. I would ask to make this your last move rather than asking to stay in your current location (unless you really like where you are now). It's easier to prevent future decisions than to stop already planned actions, and it shows that you're willing to work with them on the issue.

Boss, would it be possible to find me a permanent desk? I've switched
  offices 11 times in the past 4 years, and having to move every 4
  months is really disruptive for me. I'm willing to move again this
  time, but I would really like us to find me a location that works in the long-term.

Be prepared that the answer might be no. It's not clear what your manager's reasons are for moving you so often, and they may not be willing to negotiate that.
Comment: at my previous employer we used to call this "expediency therapy", it was frequently used  to "motivate" employees to seek an other employment option. The union was aware but unfortunately did little to dissuade the practice as it technically was not illegal. Immoral, yes.
Answer: Honestly, you have no leg to stand on. They can move you every day if they want to (some offices actually don't have assigned desks). It is after all their office space containing their desks. Complaining about it just marks you as a whiner. Office space is highly political and managers have ended up spending a ridiculous amount of time on rearranging for various reasons. Just because you don't want to move is no reason not to move you because no one wants to move unless they are the people getting the better space. It may be that John needs to be moved away from Mary due to an HR issue or that team A has 4 new members and everyone has to move to accommodate them or a new manager is being hired and so someone must move out of an office because he is senior.
Comment: @SiXandSeven8ths: every place I have worked in my career, business or government, has had people who would cheerily slit your throat for a better-situated cube or a private office.  And don't get me started on parking...
Comment: There are seriously businesses out there that expend this kind of energy on Musical Chairs?  I've never heard of such things.  Maybe we just do things more efficiently around here.

Being made to move offices often


How do I check if a file is a symbolic link to a directory?

Question: I can check, if a file exists and is a symbolic link with -L
for file in *; do
    if [[ -L "$file" ]]; then echo "$file is a symlink"; else echo "$file is not a symlink"; fi
done

and if it is a directory with -d:
for file in *; do
    if [[ -d "$file" ]]; then echo "$file is a directory"; else echo "$file is a regular file"; fi
done

But how can I test for only links to directories?

I simulated all cases in a test folder:
/tmp/test# ls
a  b  c/  d@  e@  f@

/tmp/test# file *
a: ASCII text
b: ASCII text
c: directory
d: symbolic link to `c'
e: symbolic link to `a'
f: broken symbolic link to `nofile'

Answer: Just combine the two tests with &&:
if [[ -L "$file" && -d "$file" ]]
then
    echo "$file is a symlink to a directory"
fi

Or, for POSIX compliant-syntax, use:
if [ -L "$file" ] && [ -d "$file" ]
...

Note: the first syntax using [[ expr1 && expr2 ]] is valid, but only works in certain shells such as ksh (where it comes from), bash or zsh. The second syntax using [ expr1 ] && [ expr2 ] is POSIX-compliant and even Bourne-compatible, meaning it will work in all modern sh and sh-like shells
Comment: If you want to check hidden files and directories too preceed this before: `shopt -s dotglob`
Answer: Here is a single command which will recursively list symlinks whose target is a directory (starting in the current directory):
find . -type l -xtype d
Reference: http://www.commandlinefu.com/commands/view/6105/find-all-symlinks-that-link-to-directories
Answer: A solution with find and using a function:
dosomething () {
    echo "doing something with $1";
}
find -L -path './*' -prune -type d| while read file; do
    if [[ -L "$file" && -d "$file" ]];
        then dosomething "$file";
    fi;
done

Comment: Find is really useful if you search only for certain files
Comment: Using `find` and a `while read` for that is kinda overkill...


Wordpress vps memory allocation

Question: I have a VPS sever for a wordpress site, which has an 8g ram and 4 cores cpu, however the site is really slow, I feel like the site is not using all resources, my question is, how much memory should the PHP sever limit be and how exactly can I do it? the server is in centos7.
Answer: First, I have to tell you that this all depends on the server size and the amount of resources your WordPress site uses. That being said, I set my php memory limit to between 256 and 512 MB.
WordPress sites can be slow for a large variety of reasons. Performance often improves by tweaking database settings (and checking for slow queries), configuring page and object caching, using a separate object cache like Redis or Memcache, adding Varnish in front of your site or using external edge cache like Cloudflare or Cloudfront, etc.

Wordpress vps memory allocation


In-house deployment of Windows Phone 8 applications

Question: Is there something similar to the iOS Developer Enterprise Program for Windows Phone 8 apps?
Answer: Yes, you can join the enterprise program by signing up for a Company account in the Windows Phone Dev Center. The process is called Company App Distribution.
In a nutshell, once your company account has been verified, you'll receive an ID that you'll provide to Symantec, who will generate an Enterprise Mobile Code Signing Certificate. You'll use this certificate to generate a token (that devices use to identify themselves with your enterprise) and to sign applications. The token and the apps can be distributed via e-mail, browser, MDM, or Company Hub.
E-mail and browser distribution are straight-forward, MDM occurs through a device management system such as Windows InTune. Company Hub is an on-device application that your organization develops for in-house application discovery, installation, and launch.
See the Windows Phone 8: Enterprise Development talk from the //Build/ conference for more information.
Answer: There is a feature for this explicitly added in WP8. It's called company hubs.
Expect more details to be available shortly as the SDK has only been available for a few hours and documentation is slowly being distributed/updated online.
Answer: This is something that I've been interested in myself, here's the official blog entry about this from Microsoft's side:
http://blogs.msdn.com/b/windowsstore/archive/2012/04/25/deploying-metro-style-apps-to-businesses.aspx
It all sounds great, but then you get to this:
http://social.technet.microsoft.com/Forums/en-US/w8itproinstall/thread/3092a681-b9cc-473b-83aa-b492ea7f3946
It doesn't appear to have actually been implemented yet.
Good luck!
Comment: Here's another link with more concrete information:
http://technet.microsoft.com/en-us/library/hh852635.aspx#SideloadingRequirements
Answer: It's possible to develop private WP8 apps for your company only and distribute them directly, not via Windows Phone Store.
You should start by downloading the SDK, the web documentation should be available soon.
http://www.microsoft.com/en-us/download/details.aspx?id=35471


How to make a smooth mesh

Question:  Im making a twisted iron bar. I have added array modifier and with the help of empty i have twisted. After adding array modifier the edges been seen. How can i remove that edges of the array to look a continious mesh. After adding the sub division modifier the mesh look odd. How can i make a smooth mesh and plz suggest me is this method right or can i go with other method
Comment: Couldn't you use a straight cylinder mesh and another using a screw modifier to add the twisted surface bars around it?
Comment: can u have a example for it plz
Answer: You need to delete all faces that are going to be hidden by the Array modifier (selected on the screenshot, delete them on both sides of the object). Then enable the "merge" option in the modifier settings.
Normally, this is the way I'd be going for. Sadly, I can't tell you why the subsurf modifier messes up in this mesh. But if you put a fairly high Crease amount on most of the edges (except those that should be smoothed) it works fine.
If you are looking from your object from a distance, the Edge split modifier will do the trick. If you have some spare render time, go for a Subsurf and eventually then a Bevel modifier.
Answer: Atek, I try here to describe what you could do as an altenative.
1) I suppose you have 7 revolving bars around your cylinder, so in front view I add a 28 vertex simple circle, then I take a 2 vertex segment, duplicate and separate it. Then I extrude it along normal Z (press ZZ), here I extruded using 0.2 value.
Then I also added to the extruded "square" a screw modifier, with the settings below.

In the picture above I also extruded the original 28 vertex circle to get the cylinder: you can obviously smooth/subdivide/bevel the cylinder as you want to make it look "perfect". To smooth/subdivide/bevel the "bar", though, you could need "real geometry", so you could need to apply the screw modifier first.
2) then, to get the other "bars", set the pivot for rotating/scaling around the cursor, put the cursor at circle center, activate snapping to vertices, as you see below, then duplicate the first "bar", and rotate it around the circle centre, and snap it to the fourth vertices you have clockwise on the circle.

As you see in the picture, your "bar" is duplicated and fits nicely around the "cylinder".
3) to get all the bars, you need to repeat the "bar duplication" step other 5 times, to get this:

This is what I had in mind, I hope it is explained simply enough, and gives you another idea.
Comment: Thanks for ur reply i have done with ur method but the problem is the joint or the array finish and start of the new mesh between that there is edge seen. From a distance the edge cannot bee seen and when we zoom or near its seen there are section or copies. To the single mesh there are no edges. But when we add array modifier they are seen
Comment: I do not understand your comment above... there is no array at all in my method... and using subsurf modifier you can smooth the resulting mesh completely. Don't use arrays, use screw modifier and apply it, then you can also subsurf (with some edge creasing) and bevel, if you wish... the resulting mesh is completely smooth, no "joint" can be seen, because it's simpy not there (no arrays).
Comment: After making a mesh part i have used the array modifier to elongate. The basic or single mesh i have made with ur method but to elongate i have used the array. And how to elongate to make it long rod.
Comment: The best is to use screw modifier options to create a desired loop and iterate it as long as you wish. I would do that. More roughly, you can also duplicate the whole "base" shape and merge them along the bar axis Y, although some manual rotation on Y can be necessary, if the different revolving rods are not aligned...

How to make a smooth mesh


Can a Hunter learn and use tactics by himself?

Question: I'm about to play a game where there are several other players, but they play other creatures like Vampires and Demons making me the only Hunter. Is it possible for me to use tactics without the help of any other hunter?
Answer: One would assume no, based on the basic description I found on Hunter Tactics & Teamwork.
However there is nothing stopping you from developing "tactics" that incorporate your fellow monsters, it would require some hacking of the system however, but would lead to some cool narrative and story around your character having to adapt to being a lonely hunter with only monsters to help.
Answer: RAW I believe nothing too severe should happen if your supernatural allies learn tactics. Tactics started because humans alone wont be enough to succeed in certain scenarios. But nobody says that your Kindred friend cant help you probably even better than any Hunter could. Only problem is gonna be if during the hunt you get injured and friend Vampire is already hungry...
But that just brings more drama so go for it.


How many digits are there in $2^{100}$?

Question: This question was similarly answered at How many digits does $2^{1000}$ contain? . I saw in a book asking to do the same for $2^{100}$ without taking logaritms. There is a hit as following: " $2^{10}=1024$ and note that if $0<r<b<a$ then $\frac{a}{b}<\frac{a-r}{b-r}$ ". Honestly, I couldn't use this hint to solve the problem. Thanks.
Comment: Which book was that?
Comment: which book? why wouldn't you provide a reference to this :/
Answer: Note that $2^{10} = 1024$ so $1000^{10} < 2^{100} = 1024^{10} < 1100^{10} = 1.1^{10}\cdot 1000^{10}$.  We can estimate
\begin{equation*}
1.1^{10} = 1.21^5 < 1.3^5 = 1.69^{2.5} < 2^3 = 8,
\end{equation*}
so $10^{30}<2^{100}<8\cdot 10^{30}$ and $2^{100}$ has 31 digits.  On the other hand this doesn't use the given hint and the chain of equalities amounts to showing that $\log_{10}(1.1)<0.1$, so in some sense logarithms are involved.
Answer: Write $2^{100}=(10^3+24)^{10}=10^{30}(1+0.024)^{10}$.
Consider $f(x)=x^{10}$. By the mean value theorem, $f(1+h)=f(1)+f'(\xi)h$, for some $\xi\in(1,1+h)$. Let $u=(1+h)^{10}$. Then $u=1+10\xi^9h<1+10(1+h)^9h=1+10\dfrac{u}{1+h}h$ and so $u<\dfrac{1+h}{1-9h}$.
When $h=0.024$, we get $u<\dfrac{1.024}{0.784}<10$, which implies that $10^{30}<2^{100}=10^{30}u<10^{31}$.
This means that $2^{100}$ has 31 digits. (By computing $\dfrac{1.024}{0.784}$, we get $2^{100}<1.31\cdot 10^{30}$.)
Answer: Consider $\frac{2^{100}}{10^{30}} = \left( \frac{1024}{1000} \right)^{10}$.
Use your hint with $a=1024$, $b=1000$ and $r=500$, then
$$\frac{1024}{1000} < \frac{524}{500} = 1 + \frac{6}{125}$$
Now, use $1+a < \mathrm{e}^a$,
$$\frac{2^{100}}{10^{30}} < \left(1+\frac{6}{125}\right)^{10} < \exp\left(\frac{60}{125}\right) < \sqrt{\mathrm{e}} < 2$$
Comment: It doesn't seem like the hint is buying you anything: if you skip it the $6$ changes to a $3$ and the rest of the argument still works.
Comment: @NoahStein Quite true!
Answer: right now it is been some times that I not on maths rails but I will suggest it with a simple log function:
$$
\log_{10}2^{100} = 100*log_{10}2 = 31
$$
where 10 is our decimal digit base. Maybe I am wrong?
Sorry Just saw not without taking logaritms
Comment: OK. Your help was Welcome. :-)
Answer: Answer should be $334$
By hand-multiplication to find different powers of $2$, starting from $1$ and continuing in this way by keeping on multiplying $2$,
we can observe that every time for increasing the power of $2$ by $3$, the number of digits increase by $1$.
So to reach $1000th $ power of $2$ we need to add the power by $999$. So, the occurrence of power increasing by $3$ is occurring $333$ times,  thus we have $333$ more digits. $2$ is a single digit number. Therefore, we have $334$ digits in total.
Comment: The question is 'how many digits does $2^{100}$ has', not $2^{1000}$. Don't worry, you don't need to change that much to your answer.

How many digits are there in $2^{100}$?


The server may be running out of resources in aggregate functiond

Question: I try to copy this code and to deploy this function to my server. When I try to create the function I get the message below. It's very strange to me because I don't use any unsafe resource.
I tried to run this with execute as 'dbo', and it's not helped me. I also tried to set AUTHORIZATION to ON.

An error occurred in the Microsoft .NET Framework while trying to load
  assembly id 65958.   The server may be running out of resources, or
  the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS
  or UNSAFE.   Run the query again, or check documentation to see how
  to solve the assembly trust issues.   For more information about this
  error:
System.IO.FileLoadException: Could not load file or assembly
  'exampleaggfunction, Version=0.0.0.0, Culture=neutral,
  PublicKeyToken=null' or one of its dependencies. The given assembly
  name or codebase was invalid. (Exception from HRESULT: 0x80131047)
  System.IO.FileLoadException:
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName,
  String codeBase, Evidence assemblySecurity, RuntimeAssembly
  locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound,
  Boolean forIntrospection, Boolean suppressSecurityChecks)
at
  System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName
  assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark,
  Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String
  assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark,
  Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
Answer: I have solved same problem.
Look's for solution here:
http://blogs.msdn.com/b/psssql/archive/2010/03/23/unable-to-load-clr-assembly-intermittently.aspx

Change the database's owner to sa which is gauranteed to match.
USE your_db_name;
ALTER AUTHORIZATION ON DATABASE::your_db_name TO SA;
GO
Ensure that the db_owner's SID on from every database matches sys.server_principals and sys.databases:
SELECT *
FROM [master].[sys].[server_principals] -- here are SID of users
SELECT *
FROM [master].[sys].[databases] -- here information about databases

It helped me. May be it will be useful for you.


Open source tools for Oracle schema compares

Question: I'm looking for an open source tool to generate DDL scripts.  Many tools call these synchronization scripts.  We essentially want to compare schema of different environments (ie: DEV to QA, QA to PROD) to manage object migrations/deployments a little easier.  Do open source tools exist like this for Oracle?
Answer: You might want to have a look at Liquibase - according to the Liquibase documentation, it can perform diffs (I'm not 100% sure whether this requires using Liquibase to version your schemas, though).
Comment: Liquibase diff does not require the database to be under version control.
Answer: Try SchemaCrawler. It's open source and available on SourceForge.
I've got some simple instructions to demonstrate it in my blog
https://gilesey.wordpress.com/2012/11/15/a-lightweight-schema-diff-or-dump-from-oracle/
Answer: Not open source, but free to use is Oracle SQL Developer.
At least since version 3.2 Oracle SQL developer contains tools to export a DDL (Database Export) and also to compare databases (Database Diff).
Latest version can be downloaded here: Oracle SQL Developer
Comment: Apparently, this requires the Oracle Change Management license, even though the tool is free to use.
Answer: Disclaimer: I work for Red Gate.
Another tool that you may want to consider is Red Gate's Schema Compare for Oracle, which you can use to see a side-by-side view of schema differences and generate upgrade scripts. You can also carry out these tasks via the command line.
It's worth noting that Schema Compare for Oracle has been designed specifically for this task and we focus on making the tool fast, easy to use and accurate. But please don't just take my word for it: Schema Compare for Oracle reviews.
Comment: I tested the tools from the answers and this one seems the best to use.


Can I develop constant force (pressure) from piezoelectric crystal?

Question: Can I develop constant force (pressure) from piezoelectric crystal applying constant voltage?
Comment: What did your research show? What formulas did you find? What terms in the formulas indicated that force might not be sustained? Put all the info in your question - not scattered through the comments.
Comment: Unfortunately I didn't find any information for this use case. But this question bothers me for a long time. There is plenty of information about oscillating motion and AC voltage. Theoretically if we put a charge into crystal it will expand (contract) and remain in this state (as it is dielectric). So it can develop pressure on some object until we remove the charge from it. However I didn't find any implementation or theoretical basis to prove this.
Comment: Where is the theory you suggest that says a crystal will change? Ie do you have a source?
Comment: You need to specify a specific crystal and a specific force on a specific axis. Your question got flagged as LQ due to lack of details that can help you get an answer.
Comment: I read the following "Can piezo transducers be used as static and dynamic force sensors?  Piezo transducers are not suitable for static force measurements because of charge leakage. They can be used effectively for transient force measurements lasting less than 0.1 second."  which implies that static use is not practical. www.piezo.com/tech3faq.html
Comment: @KalleMP. I am asking exactly the opposite. Can I apply voltage to a crystal to develop pressure. I'm aware that movement will be extremely small and voltage and pressure should not exceed maximum values. And as the answers suggest that's doable.
Comment: @Sparky256. This is a purely theoretical question about piezoelectric crystal as a material.
Comment: The servers automatically flag short questions and answers. That was just a heads-up.
Answer: Yes, you can, however there is some change (call it creep or drift or relaxation) in the motion, logarithmically decreasing with time adding up to perhaps several perecent over hours. Here is the response to a 60\$\mu\text m\$ motion:

To get macroscopic motion from piezo elements there are a few techniques- such as stacking large number of elements, using mechanical amplification (as in benders) and "walking" or other motor techniques. The latter type of technique does not depend on the piezo to hold position so it will not have the same drift characteristic. Also it's common in high precision applications to close the loop with a feedback sensor.
Answer: Obviously you want to know, if the crystal deformation under constant DC voltage stays constant, Of course it's possible that the crystal breaks down with high enough voltage or with high enough external force.
There are some applications which need long time deformation. Examples:

gas lasers are fine tuned (=the distance between the mirrors is adjusted) for precision measuring purposes by moving a mirror with a piezocrystal.
mirror tilters for optical systems

Here's a datasheet of a mirror tilter.
http://www.piezo.com/catalog7C.pdf%20files/Cat7C.14&15.pdf
The specified frequency range starts from zero Hz, so the deformation can be constant.
Answer: I know little about the application of piezo electric sensor and actuators other than their common uses as phono record needles, tweeters, beepers and that I have used them on commercially built ultrasonic cutting presses. They also appear to be used as motors / actuators in camera focusing systems and binocular image stabilisation (where, on my Canon binoculars) they do a super job eliminating hand shake from the image.
Introduction to Piezoelectric Actuators Kenji Uchino, International Center for Actuators and Transducers, Penn State University, may be of some interest to you.
I found the link on Wikipedia's Amplified piezoelectric actuator and this makes the interesting statement:

As classical piezoelectric materials have a strain of 0.1%, it is practically impossible to reach significant stroke without displacement amplification (1 mm displacement would require 1 meter of piezoelectric material). The solution to reach middle range stroke is to use an amplification system.
Comment: There are research projects using piezo actuators to relieve stress in the vertical stabilisers of fast jets; the stress during high g manouevres is enormous and causes deformation that subtly changes aerodynamic characteristics. For aircraft with electronic flight controls, that can cause issues.


How do I create webapps in elementaryOS?

Question: I'd like to add O365 shortcuts to my dock. I can do this in Chrome but it just opens regular chrome. I'm sure I was previously able to open a contained webapp once upon a time without the location bar and other "general" web browsing stuff.
Answer: It's no longer supported since Elementary switched from a system Epiphany to a flatpak version of Epiphany, which has never supported web apps. Sorry.
There is good news: there is some work in progress to add web app support for the flatpaked Epiphany. So it should hopefully be possible again in the future.
Comment: Thanks for the explanation. Yet another reason web support isn't where it needs to be on eOS. I guess I'll switch to chrome...again.
Answer: I just remove flatpack version of epiphany:
flatpak remove epiphany

and install the repository version with:
apt install epiphany-browser

Now I have again web apps. Also my gtk theme is now recognized, that is a big plus :)
Thanks to @MichaelC answer, I now understand why some apps don't take my personal gtk theme.
Answer: If the flatpak application does not apply your theme, you can create a ".themes" folder in the "home" folder. Move your theme there)
Answer: Although it is not in AppCenter anymore, Webpin can still be installed in elementaryOS 6.1 (and mostly likely 7.x, too), using the build instructions from the GitHub project page.
You will probably want to install elementary-sdk from the system package manager, so that you're sure to have all the build toolchain stuff you need to build it from source.
I myself use Webpin to wrap Google Calendar, Outlook mail, and a half-dozen other sites and services, and it works fine. As someone who has used Fluid.app on macOS for years, and has tried every "site-specific browser" option on Linux since Prism, I'm happy to say Webpin is one that pretty much gets it right.
The only downside is it (currently) lacks the ability to clear cookies and other site-specific storage on demand, and its cookie store is shared among all instances. This means that you can't, for example, have personal and uni/work Outlook accounts pinned as separate apps.


Will connecting a photoresistor module affect a mains relay in anyway?

Question: I have a raspberry pi connected to a mains relay, which is connected to an ac lamp and outlet onto a breadboard. I want to add a photoresistor module to the raspberry pi/breadboard but I'm afraid it will affect the relay somehow? The raspberry Pi is going to be used as a switch for the lamp, I'm pretty new to working with mains so I'm being very cautious.
Comment: You're right to be cautious, breadboards are not supposed to be used with voltages above 30-40V. Actually, the best suggestion I have is to only experiment with mains when your device is inside a closed box. If it blows up, all you'll have to deal with will be a minor fire. If you do it on a breadboard, you may get that blown up stuff in your face, or touch something inadvertently and get zapped.
Comment: Add a photo of your existing wiring and describe what your going to connect the photoresistor to.
Answer: Yes, please be careful working with mains voltages as they can be lethal ! Ideally, all of your mains wiring to the relay should be in a separate enclosure that's properly grounded. If you're unsure about how to do this, please do your homework or ask questions here.
As far as the photoresistor module controlling the relay state; the key is understanding what your module does. In other words: it's unlikely that you will be able to control the relay directly with a photoresistor as it's simply an analog device whose resistance changes as a function of the incident light intensity. Typically, photoresistors are used to bias a transistor (i.e. turn it on or off depending on the light intensity), and the transistor then controls the relay by switching current through the relay's coil. In other words: If your photoresistor module has the components needed to control current through the relay coil, then you're in business. If not, you'll need to add those to your circuit. Edit your question to add a link to the modules specifications, and we'll try to be more specific.
There are numerous ways to use a photoresistor to control a relay. (Here are several examples).
If you design and build your own "module", one issue in particular to be aware of is an apparent oscillation of the switching device (transistor) as the input nears the threshold value at which it is designed to switch. This frequently occurs in photoresistor circuits, but is effectively controlled by adding hysteresis. I'll stop here as there's little point in discussing how to add hysteresis if your module already has that designed in. But if you decide to build your own module, you can edit your question, and we'll try to help you with that.


How to swap generated mesh based on camera distance (geometry nodes)

Question: I'm trying to make a procedural forest in geometry nodes and I ran into performances issues. So I tried to make an LOD system. Problem is: I generate my trees procedurally and I want to swap the mesh for a pre-made billboard tree based on the camera distance. I haven't found a way to make the switch node work, since I don't have access to the original point position of the tree distribution once I generated the trees. I don't think I can swap meshes at instancing either, since I do multiple operation on the mesh after instancing. How should i go about his?
Here's a mock-up of my node tree (it's to big to fit on a screenshot, so this is a simplified verison):
Answer: By using Instance Index of Instance on Points node you can set different objects to the points.
This setup shows basic culling based on distance from the camera.

(Note that objects naming should be in increasing order of its subdiv levels)
Comment: I don't fully understand what you are trying to do. May be you can use instance to points node after doing the operations. It would be easier to look if you share the file.
Comment: Unfortunatly, this doen't work for me, as I need to modify the basic scatered mesh to make the trees, so swapping them for billboard trees would just make a mess as the operations would be performed on the billboard tree mesh and not on the generated mesh. I need to be able to either swap meshes after applying the operations, or swap the meshes before and find a way to stop the operations to happen after scattering.


2008 Saturn Vue wont start after putting in new ECM

Question: I put in a new ECM and tried to relearn the key but my security light does not come on and stay on. I did a reading and it gave code p0315. Can someone please help me to figure it out?
Comment: Was the new ecm programmed to the car?
Comment: are you sure that was the right ECM? where do you buy this ECM? new or recondition?
Answer: The missing security light means the ecu you have installed is not good, not compatible or just has the wrong calibrations installed on it.
There are two ways to do this. The right way with GM tools or J2534 or the backyard mechanic way.
The right way:
I usually use tech2 or a cardaq with GM SPS from ACDELCOTDS
Your goal is to Replace+Program the PCM so that the latest programming calibrations are installed and your cars VIN number will be written to the unit. After the pcm updates then you need to go into the PK3+ system (immobilizer) usually listed as VTD.
Backyard mechanic way (with no scan tools):
Buy a used pcm with all same part # as original, helps if you buy one where they write your vin for you or else you will have an incorrect VIN and ABS mismatch messages but you can still get the car to run normally otherwise. The main thing you will need to do is program the key. YOU CAN do this with out any tools (if you have a US model only).
Hook up a battery maintainer and do the following:

Turn the original key to the "ON" position and leave it there for over 10 minutes. (do not crank). The security light will go out.
Turn Key off & then back to the "ON" position for another 10+ minutes. The light will go out again.
Turn Key off & then back on for one final 10+ minute wait. The light will go out again. After this you turn the key off and all is done.
Answer: The only way to perform the relearn is with a professional level scan tool. Most shops will charge a half hour labor to perform this for you.
The anti theft will need to be done by the dealer as shown below
Theft Deterrent Control Module Programming and Setup

Connect a scan tool to the vehicle in the Pass-thru arrangement.
Turn ON the ignition, with the engine OFF.
Ensure that all power consuming devices are turned OFF on the vehicle.
On the Techline Terminal, select Service Programming System and follow the Techline Terminal on-screen instructions, using the Legacy Pass-Thru method. Ensure the correct programming selection is chosen based on component being replaced or programmed. For this procedure, go to the TDM - Theft Deterrent Module menu and select the proper on-screen options.
After the programming has completed, turn the ignition OFF for 30 seconds.
Turn ON the ignition with the engine OFF.
On the Techline Terminal, select Service Programming System and follow the Techline Terminal on-screen instructions, using the Legacy Pass-Thru method. Ensure the correct programming selection is chosen based on component being replaced or programmed. For this procedure, go to the V.T.D. Vehicle Theft Deterrent Learn menu and choose the Vehicle Theft Deterrent Learn, ECM, or PK3 Replaced selection.
At this point the scan tool must remain connected for the duration of the 10-minute relearn procedure.

Important:

The scan tool will initially display 12 Minutes. The first 2 minutes allow the scan tool to initialize the appropriate control module. The remaining 10 minutes is the relearn timer.

On some vehicles the security indicator may be illuminated for the duration of the 10-minute relearn procedure.

Observe the scan tool, after approximately 10 minutes the scan tool will display "Programming Successful, Turn OFF Ignition". The vehicle is now ready to relearn the key information and/or the passwords on the next ignition switch transition from OFF to CRANK.

Turn OFF the ignition and wait 2 minutes.
With a master vehicle key, turn the ignition to the RUN position for 15 seconds, then start the vehicle. The TDM and ECM have now relearned the pre-release password ***** the challenge/response data.
With a scan tool, clear any DTCs.
Comment: You can manually program pass-key, pk3, pk3+, etc...GM's on US models.


is there a way to save a temporary file as a permanent raster layer

Question: I am trying to build a raster table for a temporary layer i created from an image difference on ArcGIS image analysis. Is there a way to save the temporary layer from this image analysis as a permanent .img file/hdf file or something along those lines ?
Answer: right click on your layer and chose "make permanent" (with geostat analyst) or "export data"


Second toilet runs after first one flushed?

Question: When our one toilet is flushed, the other toilet will run for a short time? II have drained the tank and cleaned around the flap.
Answer: Sounds like a problem unrelated to the flapper. The "running" you hear is likely the fill valve. Perhaps the fluctuation of your water supply pressure when one toilet's fill valve opens is causing the other toilet fill valve to momentarily leak-by or open. I have seen this happen before and a rebuild of the fill valve washers (or fill valve replacement) should fix it.
Try shutting off the supply to the suspect fill valve and open it up. Inspect the valve washers for debris, lime, scale, mineral deposits. Flush the valve by cracking open the water supply while it is disassembled. If the valve washers are worn or soft (if you get black stuff on your fingers when touching them) they need replacing.
Answer: I agree with jimmy that it is the fill valve and not the flapper.
The problem is one of water pressure.
The fill valve has a float, and this applies pressure to close the water flow into the tank.
The idea is that the valve fills up the tank to a certain level of water, and will stop.
This is almost, but not quite, how it works.
The tank fills until the float has enough strength to close the valve.
The water stops when the cold water pressure is the same as the strength of the float to stop the water.
When you flush the first toilet, it makes the cold water pressure fall. This is the same thing that happens when you flush a toilet and the shower gets cold.
Like Jimmy says, because of debris and bad washers, the valve can open a little, just enough that the water runs for a few seconds.
Unless you ignore it, then there is so much debris, or the washers as so worn, it will run all the time. Because the float is never gets as strong as the water pressure.
Answer: If the above does not cure the problem, it may be that the vent for the second toilet is blocked or non existant.  The water draining from the first toilet will cause a vacumn in the drain line of the second toilet causing that's toilet water seal to be sucked down the drain resulting in the start of the re-fill cycle.  It generally will not be a flapper valve problem. Does this happen to both toilets? In other words, does this happen when either of the toilets are flushed, does the other toilet "flush?
Comment: Welcome to the site.  FYI - It's better not to refer to other answers as "above"; they may be in a different order when the next person views them.
Comment: How does the second toilet tank know that the second toilet bowl has been sucked dry?
Answer: Is it old? A modern diaphragm style valve might fix that, as it uses the actual water pressure to seal the valve; not just the wonky operation of a float on a stick. It does have a float, but it only works a very tiny valve that works the big one. Kind of like a touch lamp vs a pull chain light.
The reason could still be a very slow leak at the flapper, the flapper seat if that assembly is removable, or around the fill valve that evaporates or runs down the tube through the hole in the floor. Mark the full water level with a crayon, check back later


Google Analytics API calculate internal referrals.

Question: I can find out the traffic sources for a page with a given permalink from the Google Analytics API that return a result like this:
Array(
    [direct] => 1
    [social] => 0
    [3rdparty] => 0
    [search] => 0
)

using a query call like this:
public static function get_traffic_sources( $args ) {
        global $post;

        $default = array(
            'per_days' => 30 ,
            'skip' => 0,
            'query' => 'traffic_sources',
            'path' => Inbound_Google_Connect::get_relative_permalink( $post->ID )
        );

        $request = array_replace( $default , $args );

        return Inbound_Google_Connect::load_data( $request );
    }

But I would like to find out the number of internal referrals. Google does not seem to include this in their traffic_sources query. Any leads on how I could get this extra bit of information?
Answer: I'm not sure what you mean by internal referrals - I guess yo mean "the internal link that got a user to the current page" ? Since internal links are not traffic sources (which in Google Lingo means "whatever brought the user to the currently tracked property") you have to look for the previous page path via ga:previousPagePath (which for me in the query explorer only worked after I combined it with a filter for a specific page). I'm not quite sure which API client library you are using there, so you'd have to figure out yourself how to set dimensions in the query.


Client refused to pay for maintenance but now asks for small tweeks

Question: We had developed a blog/sales website for a client about 6 months ago and while discussing the contract, they were sure that they won't need maintenance. Since last month, they have been asking for small tweeks to the website,really small tweeks like just put a hat on the logo (they gave the edited logo) or change the background color of a particular section. We have been accepting the request because they are as small as a copy paste and a git push but it is a bit annoying as they did not pay for this and I feel this will just grow, but at the same time it feels bad to ask for money to change a font's color. How do I handle it?
Answer: There are a number of common tactics to nudge your clients towards a more effective behavior:

Charge a minimum time, say 15 or 30 minutes always, no matter how small the task. Reason is that task-switching adds overhead. So if I stop my work and do something else instead I will loose that amount of time. Also, communication and invoicing adds overhead. Obviously let your client know of these minimum times.
Only answer such requests at a certain time of the day. If they contact you by phone, tell them you are in the middle of something and to call you again at that time.
Delay they work. Even if it is a small thing, just add this to you list of small things, which you will get to at the end of the week.

This will lead to either:

They will pay you good money for the service, so you won´t mind too much.
They will collect their requests to have enough changes in one go to make effective use of your time
They will ask you for the service-contract again.
They will go elsewhere with their little requests.

Either way, you have to educate them or it will go as @Scott said - they will expect more and more service for free.
Comment: This seems like the correct way to go about it.. Thanks
Answer: For every 1 thing you do for free, clients will expect 3 more. And you've given them a perfectly reasonable expectation of that.
You need to take a hard stance... either pay for maintenance or pay an hourly rate (with a minimum fee) for each change.
It's business, not friendship.
Answer: If it's a small change you charge less but not nothing. Offer a reasonable hours rate that makes both parties happy.
Even a 20 dollar per change is good enough.
Comment: I didn't think beforehand, but I think the region depends a lot. I am from India so $20 would be a bit too much for my client, at the same time Rs 20-100 is basically worth nothing here


how do we calculate set intersection using homomorphic encryption?

Question: I am new to this field. I want to learn how homomorphic encryption can be used for PSI. I am aware of other SMC protocols but I never understood how to use schemes like Paillier for PSI calculation. For example Alice and Bob have two bloom filters(with set cardinalities: |$ B_{Alice} $| and |$B_{Bob}$|they want to compare and see if they match. Alice sends the encrypted (encrypted using paillier) bloom filter to Bob along with the public key. Now, how does Bob build the Binary AND, i.e., how does he calculate E(|$ B_{Alice} $| $  \wedge  $ | $ B_{Bob} $|)?
Answer: I'm not sure where Bloom filters necessarily come in.
The "standard" way to use additively homomorphic encryption (that's what Paillier is) for set intersection is the oblivious polynomial evaluation (OPE) technique.
It works like this:

Alice generates a polynomial whose roots are the items in her set: $p(x) = \prod_{a \in A} (x-a)$. She encrypts the coefficients of $p$ using an additively homomorphic scheme, under her own key. She sends the result $E_k(p)$ to Bob.
For each $b \in B$, Bob chooses a random value $r_b$ and uses the homomorphic property of the encryption scheme to evaluate $E_k\Big( r_b \cdot p(b) + b \Big)$. This requires only additive homomorphism since $b$ and $r_b$ are known to Bob. Note that: if $b \in A$ then $p(b) =0$ so the result is $E_k(b)$; otherwise the result is the encryption of a uniformly random value. Bob sends all of these ciphertexts back to Alice.
Alice decrypts the ciphertexts and computes the plaintext intersection with $A$.

This technique dates back to:

Efficient Private Matching and Set Intersection by Michael Freedman, Kobbi Nissim, Benny Pinkas (see Sec 4.1)
Comment: Thank you, that clears. Bloom filters , I just used as an example for a set with 0s and 1s; I was going through a paper on private record linkage and it uses encrypted bloom filters to calculate dice coefficient between the elements
Comment: @mikero Do you happen to know if OPE has been implemented in any of the existing homomorphic encryption libraries? Thanks!


Is it possible to have a busier tropical storm season in the eastern Pacific basin than in the western Pacific basin?

Question: It is known that hurricane activity in Atlantic basin is less active than in East Pacific basin in seasons past, but for the 2005 and 2010 seasons, the Atlantic basin is busier than western Pacific basin.  However,I have never heard of the eastern Pacific basin having a busier season than the western Pacific basin, is that possible?
Comment: @Gstesto - Need to check during strong El Nino years when SSTs are favorable.
Answer: There are many determinants of tropical storms. The most important is to have sea surface temperatures of >27 deg C. Obviously, this will increase in extent, though not necessarily in frequency, with global warming, and increased incidence of El-Nino events. Shallow sea, as in the western Pacific, warms up faster than deep sea, as in the eastern Pacific. Hence there are always likely to be more tropical storms in the west Pacific.
The second determinant is for the air mass to have a 'start-up' rotation, which is a function of latitude. That is, almost no tropical storms at the equator, but many in the tropics, as air masses pick up Coriolis rotation.


Ender 3 Power Problem: Not starting up

Question: I have a Creality Ender 3, I've had it for just under 2 years and during a print one morning it suddenly stopped and powered itself off. After checking the fuse and other electronic components it still didn't power on. I purchased a new switch as I thought the problem was there but after replacing it is still did not turn on.
The printer has been working fine and there were no visible or audible anomalies. I urgently need this to be fixed.
Comment: This might be a broken Power supply as much as a broken board. To test: keep the mains power unplugged, connect the front USB port to a PC. If you get a screen, the board is ok. Just get a new Power supply in that case.
Comment: I think it may be wise to invest in a [multimeter](https://en.wikipedia.org/wiki/Multimeter), you would then be able to check if the PSU outputs 12/24 V (depending on the output voltage).
Comment: Does the outlet that you're plugging it into have power? (Yea this happened to me once with my Anet A8)
Comment: Ok, I will try that.
Comment: Is anything abnormal here: the power supply?
Comment: Is anything abnormal: Power supply - link to google drive as image too big  : https://drive.google.com/file/d/0B4i3vetngZX0VUQyc21HZkR2bzF3amFuQkViLUN5azM0NnNN/view?usp=sharing
Comment: I am not an electrician, but the 8A/230V fuse of the Power supply seems to be intact. **Do NOT work with mains voltage unless you have undergone the necessary training to do so! Take all the necessary precautions as you need to work with electricity under mains voltage!** Thomas has a tutorial on what might be needed to repair them. https://www.youtube.com/watch?v=gHBpDxf6eVA
Comment: @TimLi When you buy a multimeter, note that although many 3D printers work from 12 V (as mentioned by 0scar), an Ender 3 uses a 24 V PSU. A convenient place to measure is found by disconnecting (with the PSU switched off) the yellow connector.
Comment: Purchased new power supply after testing he board. Thanks for your help.
Answer: @trish Thankyou for your help.
I did purchased the new power supply and everything works fine now.

Ender 3 Power Problem: Not starting up


A potentially dangerous Request.Form value was detected from the client

Question: I am not able  to get the actual cause of this error in my Web Application.I am using IIS7.0 and .Net FrameWork 4.0
Answer: You have inputted html tags in the input field,
Put validateRequest="false" in your page directive or web.config file.
http://msdn2.microsoft.com/en-us/library/ms972967.aspx
Comment: This only has an effect on ASP.NET WebForms, but not ASP.NET MVC.
Answer: You're posting some values that are or resemble HTML. Are you using ASP.NET MVC? If so, I blogged a solution here: specify the attribute ValidateInput(false) on the controller method and everything will work.
But make sure this is the right solution. Does your app allow posting of HTML? If so, this is what you need to do; if not, you're just opening a security loophole.
Comment: What if I have a million controller methods? There must be a way that doesn't require me to go through everything and add a million attributes?
Comment: Timwi, did you see @sudheshna's answer? That seems to be what you want. I had this only on one form method, so I was content with a single attribute, and *not* disabling XSS/etc. protection across my app. Are you sure you know what you're doing?


Netsuite dropdown menu using

Question: Is it possible to use a simplest two levels dropdown menu in Netsuite theme using <NLPAGETABS> tag?
Answer: This is possible, however NetSuite pages are dynamically rendered by backend scripts that overwrite DOM scripting that is why they don't recommend performing DOM scripting on their pages.
You can opt to use instead their built-in customization features. For your question about creating menus, you can look into creating Custom Center Tabs and categories. That should do the trick. If you're using the classic (Admin or full access) center, it should be located in Setup > Customization > Center Tabs.
Cheers!
Answer: Its possible to have a dropdown in a Netsuite website but Netsuite doesn't offer this facility, as you can check the available themes, layouts.
Few Months Back I was trying to attain this, but finally I was able to do this using a suitelet that returned me all the tabs using XML data and finally Javascript helped me create the dropdown.
This javascript code I embedded in the content area section of the Netsuite website.
For further clarification please let me know.
Cheers!!!

Netsuite dropdown menu using


Is the true linear regressor equal to the average linear regressor?

Question: Let me define my terms.  Suppose I have a pair of jointly distributed random variables Y, X, where Y is numeric and X is a random vector.  Note that I do not want to assume that Y and X are related in the usual sense of linear regression.  Said a different way, I do not want to assume that the linear regression model is correct.
Let's say the true linear regressor (possibly "best linear regressor" would be better terminology?) is found my minimizing the expected square error over the joint distribution:
$$ \newcommand{\argmin}{\rm argmin}
\argmin_{\beta} E_{X,Y} \left[ \left( Y - \overrightarrow{X} \beta \right)^2 \right]
$$
And let's say the average linear regressor is found by taking the expectation of the linear regression solution with respect to a sampling distribution (where samples are of some fixed size) of X,Y:
$$ E_D \left[ \left( \mathbf{X}^t \mathbf{X} \right)^{-1} \mathbf{X}^t \overrightarrow{Y} \right] $$
here my samples D are stacked into matrices (for X) or a vector (for Y) in the usual way.  The formula is the standard expression for the parameter vector given a sample data set.
My intuition tells me that these quantities are equal, but my attempts to prove it fail.  I'm leaning towards this being false at this point due to the following computation:
$$
\begin{align}
  \argmin_{\beta} & E_{X,Y} \left[ \left( Y - \overrightarrow{X} \beta \right)^2 \right] \\
  &= \argmin_{\beta} E_D \left[ \sum_i \left(Y_i - \overrightarrow{X_i} \beta \right)^2 \right] \\
  &= \argmin_{\beta} E_D \left[ \left( \overrightarrow{Y} - \mathbf{X} \beta \right)^t \left( \overrightarrow{Y} - \mathbf{X} \beta \right) \right] \\
 &= {\rm argzero}_{\beta} E_D \left[ \mathbf{X}^t \left( \overrightarrow{Y} - \mathbf{X} \beta \right)\right] \\
 &\Rightarrow \beta = E_D \left[ \left( \mathbf{X}^t \mathbf{X} \right) \right]^{-1} E_D \left[ \mathbf{X}^t \overrightarrow{Y} \right]
\end{align}
$$
The issue is clearly that the product of expectations at the end has no reason to collapse to a single expectation.
I suppose my questions are simply:

Is my mathematics correct?
Why is my intuition flawed?  Is there an intuitive way to see the difference, or a simple example where the two quantities are obviously different?

There was a question of exactly what I'm up to here, so let me explain how I got to this question.
Let's consider a simple toy model for definiteness:
$$
\begin{align}
  X \sim U(0, 2 \pi) \\
  Y \sim \sin(X) + N(0, \epsilon)
\end{align}
$$
This could really be anything, I just want a very simple example.  Let's say I have a learning algorithm, linear regression for definiteness:
$$ \mathcal{A} : D \mapsto f(X) $$
so $\mathcal{A}(D)$ is the linear regression of $X$ on $Y$ using the data set $D$ (which comes from the sampling distribution of $X, Y$).  I want to calculate the model bias, and to do so I need the expected model, where the expectation is taken over the sampling distribution.  The question is, how can I calculate this analytically?  My intuition was to solve the optimization problem:
$$ \argmin_{\beta} E_{X,Y} \left[ \left( Y - \overrightarrow{X} \beta \right)^2 \right] $$
Which if you work out the math in this case, reduces to:
$$ \argmin_{a,b} \int_0^{2 \pi} \int_{-\infty}^{\infty} (y - ax - b)^2 e^{ \frac{(y - \sin(x))^2}{2 \epsilon^2}} dy dx $$
I can solve this numerically (using scipy), which gives the blue line below:

Attempting to convince myself that the solution to this problem, the true linear regressor, is the same as what is called for in the definition of model bias, the average linear regressor, is where this problem came from.
Comment: What happens if you restrict the domain to $(0,\pi)?$
Answer: I am not sure what you are doing here, so only a quick comment. In general, for two random variables $Z$ and $W$, $E(ZW)\neq E(Z)E(W)$. I am not sure what your operator $E_D$ does but my guess it is that this property applies to $E_D$ too. So, the last line does not follows from the previous one.
Comment: That's what I meant at the end "The product of expectations has no reason to collapse to a single expectation."  The $E_D$ operator is the expectation over a sampling distribution (samples from $X,Y$).

The last line does follow from the previous one.  Im only using that the expectation of a sum is the sum of the expectations.
Comment: After I posted this I found that my last equation (the product of expectations) appears in Hastie, Tibshirani and Friedman, chapter 2.  It's equation 2.16 in the 10th printing.
Comment: We do not assume that the X's are random, but that they are fixed. Therefore, the expectation of X is X.
Comment: @ChinG No.  You can see that all of my expectations are over either the *joint* distribution of X and Y, or over the sampling distribution of training data sets $D$.  I am explicitly interested in the variation in X.


Protective Paint for Coins

Question: I have an antique silver coin that I was planning on displaying on a ring, and  I was wondering if there was a protective paint that I could put on the coin.  The paint needs to be scratch resistant, protect the coin from water and oils, and needs to be able to be removed from the coin without damaging the coins value.  I do not need the paint to protect the coin from tarnishing just to protect the coin from normal wear.  I haven't been able to find anything myself and I am not a coin expert so I was hoping a coin expert could help me with this, thank you.
Comment: I'm voting to close this question as off-topic because it's more about preservation of metal jewellery (that happens to be a coin) than the coin as money.
Comment: Your problem is that people like antique silver coins to look antique.  The moment you clean all the protective coating off, it will look too shiny, and that will decrease the value.
Comment: You might try asking at https://crafts.stackexchange.com/
Comment: I think I am in the wrong stack exchange, ab2's reply was very helpful, but I will still post this question on Arts and Crafts, just to see if anyone else can answer my question. Thank you all for your help.
Answer: It is unclear from your question whether you want to protect the coin from tarnish or whether you want to protect it from scratches and dings.
If the former, the comment of @Simon B is right on.  Antique silver coins that have numismatic value (more valuable than their metal content) should never be polished to a silvery gleam if you want to retain their value.  They can, however, be cleaned of dirt and grime and there are articles on the internet telling you how to do this safely and effectively without affecting their value. None of these methods involves a protective finish.
If you want the coin to have the gleam of silver, even though it may lessen its value, then just polish it periodically.  There is no point being fanatic about a coin whose value is only in its silver content (plus sentimental value) and does not have any numismatic value. Incidentally, the term for tarnish on an antique coin is called patina, and is highly desirable.  There are even articles on how to introduce patina onto the surface of silver jewelry.
If, on the other hand, you want to protect the coin from dings and scratches, then you should:

treat the ring like a pearl, opal, jade or emerald ring and not wear it when doing work on hard surfaces (e.g., gardening or repairing the car) or with tools; and/or
design the setting so that the coin does not project much above the setting.  This can be done and still have a setting that shows off the coin to advantage.

I have several ancient Greek and Roman silver coins and the patina of 2,000 years adds to their beauty. If one of them got dirty, I'd clean it gently with a gentle, non-gritty soap, a baby toothbrush and maybe a Q-tip.
Comment: Possibly the coin already has a patina, and OP wants to protect the patina while wearing it as a ring?
Comment: @The Photon You have a point, but any ring set with a stone or anything else that has a Mohs hardness of less than 7 (quartz) is subject to scratching because grit often contains quartz, and the wearer needs to conscious of what she does when wearing the ring.  Silver has a Mohs hardness of 3;  silver patina  may be higher, but not as high as 7.  Great care also needs to be taken with emerald rings as emerald, although hard, is brittle, and subject to cracking or breaking.  I'll be interested to see what the crafts people say.

Protective Paint for Coins


How do you find potential by Lagrangian formalism?

Question: Suppose a ball is falling towards earth and hence by Lagrange equation we can find $T$ and $V$ where $V$ is $mgh$. But we know $V$ only because we know $F = mg$. Now since Lagrange equation doesn't require the concept of force (correct me if I am wrong), how do you find potential in a place where we have no intuition of force and are not allow to find it.
Comment: You don't "find" the Lagrangian or potentials in the Lagrangian formalism. The Lagrangian formalism uses a *given* Lagrangian as its starting point. You need to use an educated guess (like guessing the potential from the experimentally observed force) for it and see whether it predicts the physics correctly.
Comment: Related: http://physics.stackexchange.com/q/20298/2451 and links therein.
Answer:
how do you find potential in a place where we have no intuition of force and are not allow to find it.

Well I think this might be your problem; I've certainly never heard it said that you are not allowed to find forces. The Euler-Lagrange equations are simply another tool to finding the dynamics, but that doesn't mean you have to start from scratch and cannot use knowledge gained from other courses (e.g. that gravitational potentials go as $mgh$) for use in solving your problems.
Answer: In a general Lagrangian formalism, $ L $ doesn't equal $T - V $. Rather it is a function of some field (be it scalar field, vector field, or whatever other field that is useful...) $\phi$, derivatives of $\phi$ and spacetime (x,y,z,t). This function is chosen so that the equations of motion produce the correct physical phenomena. In general, canonical momentum conjugate $\pi$ is defined by $\frac{\partial L}{\partial (\frac{\partial\phi}{\partial t})} = \pi$ And this is the most obvious bridge between the language of Lagrangian Field theory and classical mechanics. Other than that simple expressions in mechanics don't carry over to complicated fields...


Windows 7 Ultimate files to Iso

Question: So i had copied my windows 7 files from an installation disc to a flash disk which i had made bootable to format a mini laptop with no DVD drive, then by mistake broke the installation disc but still have the files in the flash disc, i want to burn them into another disk. Have tried burning them as data but wont work in some systems...so how can i get to create a bootable disc / disc iso image?
Comment: *I rily need help ASAP* --- This really sounds a little bit rudely. :(
Comment: possible duplicate of [How to convert flash drive to Windows installation CD](http://superuser.com/questions/144914/how-to-convert-flash-drive-to-windows-installation-cd)
Answer: You can also use imgburn which is maybe a little bit more straightforward than poweriso to work with. Be careful though not to install bloatware that comes with the installer.
Using Imgburn, you can easily create a new image from the files and folders on your usb drive. Then you can burn this image to your disc:
Answer: This is an official microsoft downloads
Windows 7 Ultimate x86 SP1 (bootable)
http://msft.digitalrivercontent.net/win/X17-24394.iso
Windows 7 Ultimate X64 SP1 (bootable)
http://msft.digitalrivercontent.net/win/X17-24395.iso
Download burn to DVD and DONE.  It even has SP1 built-in
Answer: Use the software Power Iso. It is not free. But the trial version is enough to accomplish your task. Install Poweriso. Plug in the usb. In the options, it has an option to create iso from USB. I have used it before. I didnt remember the exact menu and cant put screenshots now as i am in a linux machine now.

Windows 7 Ultimate files to Iso


WPF TabControl vs. Pages

Question: I am creating a resource-intensive dashboard application that will have many areas of data visualization.  I am thinking that it would be best to use a frame and load the pages needed one at a time using WPF pages.  These pages will also have different data contexts, security restrictions, etc.  But, another developer says I can accomplish the same thing using a TabControl.
Does a TabControl load all the items in all the tabs at once, on application startup?  Or, can I load them lazily as needed like with WPF pages (page only loads content when navigated to)?  Also, can you have different data contexts per each item in a TabControl?
Answer: In WPF you can use UI Virtualization which means that only the visible controls are initialized and rendered. As far as I know, the TabControl does not support UI Virtualization by default but maybe you can add it manually or use another control. Maybe you want to have a look at the following article which presents some performance tips. There is also mentioned that there is a difference between UI and Data Virtualization. Not showing the controls does not mean that the underlying data are not in memory. All your binding targets will be loaded, but the controls will not be rendered.
To your second question: Yes, every TabItem can have its own DataContext. If you use a TabControls ItemsSource to bind a list of items, the DataContext for every TabItem will be one item of the list. If you manually add TabItems, you can set the DataContext like that:
<TabControl>
    <TabItem DataContext="{Binding Context1}" />
    <TabItem DataContext="{Binding Context2}" />
</TabControl>

Answer: It is more complex than you would guess.  If you bind to Tab Collection (think MVVM) then the tab only get created when it is selected.  And with a Collection if you leave a tab and come back it gets built AGAIN.  If you create the tabs in XAML then the tabs are all built when the windows loads.  Yes you can have different DataContext for each tab.   What I do for lazy loads is bind  to the TabItem property IsSelected and if it is false all the Properties in the class just return a (fast) static type compliant value.   If IsSelected is changed to true then I load the real values and call NotifyPropertyChanged (and I save the real values).
I use the heck out of this were I load a big objects and one tab is a summary.  Tabs do not virtualize but if you have big lists then for sure use virtualization in the tab.   You can use BackgroundWorker to create properites but once it returns and you bind that returned value the UI locked until the UI control is rendered.  For me reuse of a single frame versus tabs is a UI thing.  Just to break up code I typically load a tab with a frame and a page (and I typically pass data to the page in the ctor to load dynamic content).

WPF TabControl vs. Pages


Dungeon crates not spawning..?

Question: I've recently found out about the dungeon crates that you can fish for, well, you guessed it, in the dungeon. I created a large body of water in it, and have been fishing for maybe an hour or so now. I buffed with a crate potion, but the only crates I'm getting are the wooden, iron, and golden. I also keep getting fish from the underground area only, such as armored cavefish. I know that I'm IN the dungeon area, because the music is playing,  and the mobs are spawning. So I'm in the dungeon biome, have tons of crate potions, but I can't get anything but underground catches...
Answer: The Terraria wiki states this:
"As long as you are below 0 depth and in front of natural Dungeon wall, you are counted as being in the Dungeon. (It is notable that the music changes as well. This is an easy way to tell if you are in the Dungeon.)"
My guess would be that you are not standing in front of a natural dungeon wall.
Comment: What does it mean by "Natural dungeon wall"? Do you just mean inside between 2 sets of dungeon walls? Because the music is still playing...
Comment: @RoboMaster122 I believe they mean a dungeon wall that was generated when the world was created, not one built by the player.
Comment: Oooooh. Well in that case, I shouldn't be having a problem..... Weird.. Maybe It's because I broke some of the walls nearby, but I doubt that's the reason.
Comment: @RoboMaster122 I'm not sure if the Wiki means background wall or block wall. Are you touching both?
Comment: Wait, TOUCHING? I mean, I'm touching the backwall, and I'm inside the regular blocks, but I made a small wooden platform for safety... Maybe I was doing it wrong the whole time!
Comment: I am pretty sure that this means background wall. Is the dungeon music playing? Do you have a depth meter that tells you you are below 0ft?

Dungeon crates not spawning..?


How to change wordpress registration form submit button value?

Question: I am trying to create a website with wordpress and I want to change the text value of the submit button (included in the pictures). When I change its' text value while inspecting the element, it changes successfully, but when I do it with custom CSS, it fails. What code should I write to the custom CSS file to successfully change the buttons' text value?
Answer: you would have many options to change button text like jquery and if you know about that registration form from where it is coming from.
By using jquery you would have to add below code at the end of the footer.php file like as below:


How to make .DACPAC from Azure Sql Server using Azure DevOps release pipeline?

Question: I'm using Terraform to create my environment and I'd like to deploy Azure Sql Server along with other things. I use terraform so I can easily destroy all deployed things and reduce costs when I'm not using them.
So, I decided that I can add Azure Sql Server into my Terraform file but I need to store my information into backup file so I can restore it with "Azure SQL Database deployment" task from pipeline. Hovewer, I haven't find any indication that it is possible to create a .DACPAC from within Azure DevOps.
So, is there a way to create and save a backup of my database (preferrably, into a blob storage) from Azure DevOps pipeline? I looked into azure shell (az sql database), but haven't find anything of value
Answer: Ok, after researching some more time, I've found this gem https://markheath.net/post/backup-restore-sql-database-azure-cli. In this article author uses az sql db export and az sql db import to save database into BACPAC and restore it back on the clean database. But here comes a pitfall - Azure CLI task v1.0 uses CMD so it's not easy to translate from Bash syntax to CMD, and Azure CLI task v2.0 preview which has option to choose Bash as an interpreter doesn't have az installed (it's probably a bug and already has a post on uservoice) so one needs to rewrite the script into Powershell if they want to use it.
So, it's not completely what I was looking for but it does its job.


Level 2 Wizard powers and Spellbook question

Question: I am a little confused on how a wizard's spellbook works..  I used the dnd insider to help me create my character so I am assuming it knows what it's doing..  anyway, it's allowing me to take 3 at will powers, 2 encounter, and 2 daily powers.  Am I allowed to use all of these before I take an extended rest, or does this have something to do with my spellbook where I have to pick and choose what to cast after every rest?
Answer: The powers you're picking are what is available in your spellbook. You can cast any at-will and non-utility encounter powers as if you were a normal class. However, after each extended rest, you must pick which one daily or utility power of each level you will have accessible until the next extended rest.
All the spellbook lets you do is swap out which dailies and utilities you have selected. You can only swap after an extended rest, and can only swap for other powers in your spellbook.
Comment: This is not quite true. For the Mage the encounters are also chosen on a daily basis. This is different than the arcanist.
Comment: Thank you for the clarification.  having two daily powers seemed like it might be too powerfull for this level.. Cheers!


MongoDB + Compass exporting strings and numbers "columns" with value of 1 as "true"(boolean) and 2 or null as "false" to CSV

Question: When I export my MongoDB collection to a CSV, the String and Number "column" data types values are converted to "true" for 1 and "false" for 2 and null - how do I retain the values as numbers, strings and integers on export to CSV from Compass?
Answer: While I have not been able to completely eliminate the possibility of MongoDB Compass exporting 1's and "true" (bool) or 0's and "false" (bool) nor remove NaN in some "columns" with NULLs mixed with numbers, using "Int32" and "Int64" data types for non-decimal values reduces the number of "false bools", significantly in my MongoDB Compass exports (but not completely - enough to greatly reduce the number of manual/script changes).
The best workaround I have for these quirks of Compass is to switch to Robo 3T (Formerly known as Robomongo) which seems much more consistent and less "auto-magic" happening in the background. It's just a better tool for MongoDB all-around, IMPO.
Link: https://robomongo.org/download
Note: Download just the 'Robo 3T: "The Hobbyist GUI"' and not the Studio 3T package unless you want to spend money for it in a few weeks.

This is just one example of the MANY inconsistent behaviors I've observed while using Compass in Linux with a Gnome GUI instead of the mongoshell or Robo 3T on the same machine.
You can just use the mongoshell commands inside of Robo 3T to perform your CSV exports:
Example: mongoexport --db=PetHotel --collection=pets --type=csv -- fields=_id,name,type,weight --out=data/pets.csv


Visual Studio Toolbar

Question: In Visual Studio:
New->Project->ASP.NET Web application
New->Website->ASP.NET Website
What is the actual difference between these two, though we are opening webapplication?
Answer: Web Application Projects are projects, like any other Visual Studio project. They have a project file (.csproj or .vbproj) which is an MSBUILD description of how to build the project. This is how Web Applications were built on .NET since Day 1.
With Visual Studio 2005, Microsoft decided that this was too complicated. They got rid of Web Application Projects and replaced them with Web Site "projects". These are not actually projects, but are rather a collection of files in a folder tree, on disk, on an FTP site, on IIS, etc.
They were loudly informed of their error, and quickly came out with Visual Studio 2005 SP1, which put Web Application Projects back in the system, where they are to this day, and always will be.
The code in a Web Application Project all gets compiled into a single DLL. The code in a Web Site is only compiled when it is referenced. This can be a benefit during development - I'm working on one now, and actually find it sort of cool to be able to change some C# code, save it, then press F5 in the browser to see the affect.
On the other hand, what I'm working on now actually is a web site - it's not a web-based product that needs to be packaged up and shipped to customers. I may be old-fashioned, but I don't like the idea that my code doesn't compile before I ship it to customers. I was taught (the hard way) to test what I ship.

Visual Studio Toolbar


Getting max resident/working set size of Windows program from CLI, and user & system run times?

Question: On Linux and Mac OS X, I can run a command from the CLI using the "time" command (not the bash shell built-in command time) and get not only the elapsed run time from start to finish, but many other statistics as well.  For example on Mac OS X:

% /usr/bin/time -lp /usr/bin/wc PS1-01.m4v
 6166365 46283357 1532034853 PS1-01.m4v
real        27.09
user        24.65
sys          1.17
   1433600  maximum resident set size
         0  average shared memory size
         0  average unshared data size
         0  average unshared stack size
       361  page reclaims
         1  page faults
         0  swaps
         0  block input operations
         0  block output operations
         0  messages sent
         0  messages received
         0  signals received
         4  voluntary context switches
     21604  involuntary context switches

On Ubuntu 10.4, "/usr/bin/time -v " gives similar but not identical output.  It is definitely good enough for my purposes, though.
I can also get similar results on Windows XP + Cygwin.  On Cygwin, if the command being measured is a "Cygwin binary", it works as I want.  But if the command being measured is not a "Cygwin binary" (e.g. in my case I'm running the Java Virtual Machine from the command line, specifying the program class file to run on the command line), then it seems that the time command is measuring statistics for a "hidden" shell process, not the Windows binary.  At least, that would make sense given what I have seen.  My belief that it is a shell process that is being measured comes from this email from someone who has investigated the matter carefully several years back, and later in the same email thread a Cygwin developer confirms his findings:
http://cygwin.ru/ml/cygwin/2001-09/msg00202.html
The statistics I am most interested in are what is called the "max resident set size" on Linux and Mac OS X (sometimes abbreviated Max RSS or MRSS), but might be called the "working set size" on Windows.  Another I'd like to see is the percentage of time that each CPU core is busy (or idle -- I can do 100-x on my own), with a separate measurement for each core in a multi-core system.  It would be nice to also get the user and system CPU times used, which would correspond to breaking down the CPU time into Windows kernel vs. user application run time, but having both of those combined into one number would be OK, too.  Note that such numbers could be longer than the elapsed wall clock time on a multi-core system, if the program uses more than one in parallel.
I have seen other mentions on Stack Overflow of timeit.exe and timethis.exe.  Those seem to give the elapsed time only, as far as I can tell.  There are many tools that I think can give me the current "working set size" of a process, but the only ones I know of so far show that number in a GUI window.  It is really only useful to me if I can get the information using a batch method, because I want to do performance testing of many different programs run from the CLI, one at a time from a script.
Answer: After doing plenty of searching on Stack Overflow and other places on the Internet, I found partial answers about Win32 API calls that can be made to get some of these performance measurements for programs, and was able to use MinGW to compile a small C program that does what I want.  I wanted to share it with others in case they are also looking for something for Windows that is close to what /usr/bin/time does on Linux and Mac OS X:
http://homepage.mac.com/jafingerhut/files/code/code.html