How can I stop regretting about the mishappening in the world?

Question: I am a student whose duty is to study but it worries me that I cannot contribute to betterment of world or society.
Do our Hindu scriptures says anything about our duty towards world or society? Or how we are supposed to contribute towards betterment of it?
Comment: Here questions should be about Hinduism only. You need to make your question Hinduism specific which isn't the case right now :-)
Comment: @Rickross You are back... Welcome...
Comment: Haha thanks again .. last time it was you too who welcomed me. But I actually was active since last 20 days or more. So I did not resume activity from today. But its not your fault as now we can't check who is active and who is not @hanugm
Comment: I recommend you to read Shanthi parva from Mahabharatha.
Comment: I think commentary on how to handle miseries around the world may help @ayush?
Comment: Swami Vivekand mentions that Morality is the only thing which pushes us towards other living beings and this nature. This morality is present inside us by default due to presence of Aatman but in a poorly developed state. This needs to be properly developed which can be done by extensive reading of Shastras. The more you read, the better your morality and understanding towards the world.
Answer: Yes, Hindu shastra does talk about our duty towards others. If you see someone wasting his life then you should urge him to mend his ways. That is all you have to do and in practical point of view can do. If he doesn't mend his ways then there is nothing more you can do. Remember that everyone has karmic history and so acts according to their karma. All you can do is to serve others to the best of your ability.
Liberality

THE Gods have not ordained hunger to be our death: even to the well-fed man comes death in varied shape. The riches of the liberal
never waste away, while he who will not give finds none to comfort
him. 2 The man with food in store who, when the needy comes in
miserable case begging for bread to eat, Hardens his heart against
him-even when of old he did him service-finds not one to comfort him.
3 Bounteous is he who gives unto the beggar who comes to him in want
of food and feeble. Success attends him in the shout of battle. He
makes a friend of him in future troubles. 4 No friend is he who to his
friend and comrade who comes imploring food, will offer nothing. Let
him depart-no home is that to rest in-, and rather seek a stranger to
support him. 5 Let the rich satisfy the poor implorer, and bend his
eye upon a longer pathway. Riches come now to one, now to another, and
like the wheels of cars are ever rolling. 6 The foolish man wins food
with fruitless labour: that food -I speak the truth- shall be his
ruin. He feeds no trusty friend, no man to love him. All guilt is he
who eats with no partaker. 7 The ploughshare ploughing makes the food
that feeds us, and with its feet cuts through the path it follows.
Better the speaking than the silent Brahman: the liberal friend out
yalues him who gives not. 8 He with one foot hath far outrun the
biped, and the two-footed catches the three-footed. Four-footed
creatures come when bipeds call them, and stand and look where five
are met together. 9 The hands are both alike: their labour differs.
The yield of sister milch-kine is unequal. Twins even differ in their
strength and vigour: two, even kinsmen, differ in their bounty.

Rig Veda 10.117
Helping the indigent

Bhishma said, "Whatever wishes one entertains with respect to
oneself, one should certainly cherish with respect to another. With
the surplus wealth one may happen to own one should relieve the wants
of the indigent. It is for this reason that the Creator ordained the
practice of increasing one's wealth (by trade or laying it out at
interest)."

Mahabharata, Santi Parva, Section CCLIX
All spiritual practices are in vain if you close your eyes to suffering of others.

I abide in all beings as their inner-most soul. Disregarding My
presence within them, men make a show of worshiping Me through images.
If one disregards Me present in all as their soul and Lord but
ignorantly offers worship only to images, such worship is as
ineffective as a sacrificial offering made in ashes. A man who
persecutes Me residing in others, who is proud and haughty, who looks
upon God as the other – such a person will never attain to peace of
mind. If a man disregards and persecutes fellow beings, but worships
Me in images with numerous rituals and rich offerings, I am not at all
pleased with him for proffering such worship. A man should, however,
worship Me in images, side by side with discharging his duties, which
include the love of all beings, until he actually realises My presence
in in himself and in all beings. As long as man is self-centred and
makes an absolute distinction between himself and others (without
recognising the unity of all in Me, the Inner Pervader), he will be
subject to the great fear of Death (including every form of
deprivation of self-interest). So overcoming the separateness of a
self-centred life, one should serve all beings with gifts, honour and
love, recognising that such service is really being rendered to Me who
reside in all beings as their innermost soul.

Srimad Bhagavata Purana III.29.21-27
Comment: Forget what you can't do. Do what you can do. Remember that everyone has his own karmic history and so all you can do is to give him good advice. If he doesn't mend his ways then there is nothing further you can do.
Comment: No no I meant that assume someone 500km away from me is abusing alcohol and is wasting money of his family . It's like nothing I can do about it. But I dont know why I keep regretting I can't do anything about it which distracts me from my study
Answer: The answer is given in Yoga Sutras

क्लेशमूलः कर्माशयो दृष्टादृष्टजन्मवेदनीयः ॥१२॥
A man's latent tendencies have been created by his past thoughts and
actions. These tendencies will bear fruits, both in this life and in
lives to come.

A man who is facing problems in his life is because of his past life karmas. So if you are feeling bad for not being able to help someone, you shouldn't because it was not in his prarabdha to receive help from someone.
Comment: "A man who is facing problems in his life is because of his past life karmas. So if you are feeling bad for not being able to help someone, you shouldn't because it was not in his prarabdha to receive help from someone". So you are saying that if anyone is suffering due to his/her prarabdha, you shouldn't help that person?
Comment: @learner we should try to help him but my point is that if we are not able to him it means it is not in his prarabdha to receive help from someone. If it is in his prarabdha he will definitely come out of the trouble. We should try to help everyone but if we can't, it means it is not in his prarabdha.
Comment: This is like saying that a mother shouldn't love her blind son, because he was born blind due to his ill prarabdha karma. Vivekananda was right in pointing out that "Bhakti alone, without service towards others, is sentimental nonsense which makes one impotent".
Comment: @learner a mother loves her child despite of his disabilities. Your question doesn't make any sense. The child is already suffering the deeds of his prarabdha and you can't punish someone for a crime twice.


How long would it take to realize there are "star-like objects" (i.e. planets) that change position in respect to the "fixed stars"?

Question: If you were using unaided observations and were unfamiliar with astronomy (and maybe just pen and paper for recording anything), how long should it take to notice that Mercury, Venus, Mars, Jupiter and Saturn move independently of the "fixed stars"? Would some planets be easier or harder to notice than others? I assume that Jupiter and Saturn would be somewhat difficult because they move so slowly and Mercury might be difficult to make observations of at all, but that is just my naive first impression.
Comment: Should we assume that our hypothetical observer is just casually glancing at the sky (in which case they might never notice) or are they making careful observations and records with the intent to find any "wandering stars" (the planets move enough each day for a careful observer to notice almost immediately if they are actively looking) So the answer could be anything between "right away" and "never".
Comment: It's also much easier to notice changes in relative terms, So if Jupiter is very close to Regulus one day, and you look next week it would obviously have moved. On the other hand if Jupiter happened to be far from any bright fixed stars, it would be much harder to casually notice movement.
Comment: For my part, I really think I would have lived my whole life without realizing that the celestial sphere rotates, had I not been told. I think that this really comes down to the personality of the observer.
Comment: To @JamesK - I was thinking of someone who didn't have any astronomy knowledge, but had the time and curiosity to study the sky. I don't know enough about the state of mind of people, say, 10,000 years ago - so I tried to keep the question more general.
Comment: Not really a full answer, so adding as a comment. Aside from their motion, the planets should catch your eye pretty quickly on brightness alone. If you've ever looked up and seen a star and thought "that's a really bright star!", you were probably looking at a planet. The 5 planets visible to the naked eye all stand out purely due to their brightness. Take a look at the [list of objects by apparent brightness](https://en.wikipedia.org/wiki/Apparent_magnitude#List_of_apparent_magnitudes) and you'll see all five planets' mean brightness is brighter than almost every star in the sky.
Answer: It could take a day to discover a planet, if the stars align (literally), and then probably less than a year to find all five planets.
On the 3rd of April 2020 you happen to look up and you notice that the evening star is right in the middle of the Seven sisters (you know the seven sisters because it does look rather special in the sky and the evening star is so bright, so this combination is quite noticeable.

"Has it always been in the seven sisters?" you think to yourself, surely I'd have noticed... so next night you look again.

To your surprise, it has moved noticeably over one night!
From now on you are actively looking for these special moving stars.  Over the summer of 2020 you notice two bright stars in the southern sky, and they are clearly further apart at the end of summer than they were at the start. Looking carefully over the summer reveals that they both moved relative to the constellations.

And then in the winter of 2020 into the spring of 2021 you watch as a bright red star move closer and closer to the "V" of the hyades.
Mercury is always hard to spot, but as soon as you do (perhaps in the mornings of July 2020) you know it moves, because it simply isn't in a place where a star is, it moves so fast that its motion is quite obvious.
With naked eye astronomy, there is no reason why you should not identify 5 planets with a year.
Comment: The word planet, literally meaning *wandering [star]*


In a Dyson shell, could centripetal force act as gravity?

Question: In a pure Dyson shell surrounding a non-moving star, with the shell rotating around the star, could the centripetal force of the shell act in some way similar to gravity toward the interior of the shell. it's not a field force, so i would assume not, as there is no way it would act on an object that is not part of it.
Comment: Do you mean " could gravity act as centripetal force"? Because gravity is a real force, centripetal force is just a term given to certain real forces.
Comment: Not really, i mean that the centripetal force outward acts as gravity normally would, speaking as in a planet bound sense.
Answer: Overall, no, not if you're talking about a "classical" Dyson sphere: a rigid spherical shell. At the equator, centrifugal force will act as a pseudo-gravity for anything making contact with it or coupled to its rotation, so atmosphere will behave approximately correctly. Atmosphere is viscously coupled to the rotating surface, so it gets carried along.
The problem is that, as you move toward the poles, the apparent "gravity" will gradually become both weaker (as the radius of rotation becomes less) and tilted away from local vertical. The direction of the centrifugal force will always be in the plane of rotation, and that will always be parallel to the equatorial plane. At the poles there will be no effect at all, since the moment arm of motion will become zero.
As a result, as you move away from the equator the air will get thinner and the local "gravity" will tilt more and more toward the horizontal at the same time as it gets weaker.
Of course, a Dyson Sphere is pretty big, so there's a lot of equator. Presumably a band of several degrees of latitude will be useable, and that will have an area many times that of earth.
Comment: A 'Dyson cylinder' would work, but then different parts of the inner surface would be at different distances from the sun.  It'd make for interesting weather.
Comment: The best-known version is the ringworld https://en.wikipedia.org/wiki/Ringworld


Why is "Devices" under bluetooth greyed out?

Question: I only see an option that allows me to select d8-30-62-42-10-25. Why is that? How can I connect to my other bluetooth devices?
Answer: The label "Devices" is always grayed out, if that's what you're asking. Just like "Bluetooth: on" is grayed out. But here's what you can do to connect.
1.) Click the bluetooth icon in the menu bar while pressing the option key: ⌥ + click.
2.) Hover the mouse over the device that you want to connect, and click remove. This should refresh any old bluetooth logs.
3.) Then connect again.


How do I edit code in REPL after saving it in Emacs?

Question: Alright I apologize if this has been asked, but I cannot seem to find this problem through searching. I am trying to figure out how to work on code in Emacs and when I come back open it again to edit the code. I was working with Emacs in the REPL learning Common Lisp and I used the "save as" feature and saved my work. I come to it this morning and try to open it to finish up on it and when I load the file it opens either as read only or it "kills" the REPL and doesn't let me use the functions that I coded originally. When the file is loaded I can't compile it to use in the REPL and it seems to not want to work in the REPL when I try to copy.. I am new to Emacs and I am needing some help figuring out what I did wrong so I don't do this again. Til now I have only coded a few lines and just been starting from scratch and copying what is loaded in the file and completing my exercises, but that limits productivity. I am spending more time trying to figure out how to use Emacs than I am learning Common Lisp. I am not sure what I did wrong, but if there are any Emacs gurus out there that could help me out I would greatly appreciate it! Thank you in advance!
Comment: I, for one, have trouble guessing just what you did. If you could be more explicit, giving a step-by-step recipe that starts with `emacs -Q` (no init file), that might help people help you more. I'm guessing that you are following some kind of tutorial - perhaps you are reading the manual *An Introduction to Programming in Emacs Lisp*, which is included with Emacs (`C-h i`)?
Comment: I am following Practical Common Lisp by Seibel and I briefly covered the built in tutorial.
Comment: I am just following Practical Common Lisp. I was in REPL and clicked the "save-as" icon and typed "mp3list.lisp" as my file name and saved it. Closed out the program for this morning. I get on this morning and open Emacs, after initializing  I tried to use (load "mp3list.lisp") and (load "mp3list") and neither of those worked. So then I selected the "file" and "open-file" then selected the file I was ready to work on, mp3list.lisp. It opened it in another buffer that was not the REPL and I could not figure out how to take the "defun" and all the list I had coded from that buffer to the REPL.
Comment: Are you using SLIME? If not, you certainly should be. Please try to clarify the question. Give us clear list of actions you performed, major modes used, how exactly do you start REPL (name of command), how do you load functions and entire files. Also, state clearly what happened and what you expected to happen instead. Also, try to edit tags of the question, mention major mode (or SLIME if you're using it). As it probably has nothing to do with specific version of Emacs, remove `emacs24.4` tag while you're at it.
Comment: Ok so I downloaded lispbox and it has CCL 1.6, Emacs 23.2, Quicklisp, and Slime. To open the REPL I just click the .bat file "lispbox" and it opens up directly into the REPL. I have slime-repl clozuecl, scratch, Messages, slime-events, and inferior-lisp as buffers. As a back up plan to this, if you guys can't figure out what I did wrong, I downloaded sbcl and notepad++ to give that a shot. Honestly the hardest part of learning Common Lisp is trying to figure out how to use Emacs. I find that humorous. Thanks again for all the help guys!
Answer: There are two other methods of interacting with Common Lisp, besides SLIME. Although they both use SLIME as a back end.
Org mode
To make org-babel understand CL, you need to add this to your config (after you've configured SLIME):
(require 'ob-lisp)
(org-babel-do-load-languages
 'org-babel-load-languages
 '((lisp . t)))

Here's an example Org content:
* CL is a LISP-2
So you need to quote the ='+= function.
#+begin_src lisp
(mapcar '+ '(1 2 3) '(1 2 3))
#+end_src

#+RESULTS:
| 2 | 4 | 6 |

When you navigate to a source block, you can edit it with C-c ' in its native lisp-mode.
You can evaluate it with C-c C-c, once SLIME was started.
lispy
You can install lispy from the
package manager.  Then open e.g. test.lisp file, navigate to an open
or close paren and press e.  If SLIME isn't running yet, it
will automatically start and evaluate the current expression.  The
result will be shown in the Echo Area.
If you'd like to see the result in the buffer, press E
instead of e.  You can also insert the result as a comment
by pressing 2e.
You can think of pressing e as:

copying the expression from source buffer to the kill ring
switching to the SLIME REPL
inserting the expression
switching back to the source buffer
Comment: So in the end after using REPL how do I save the code I have written and use it again/edit the code when I am finished? I ask this, because I can barely navigate Emacs.
Comment: The code is always in a file. The methods that I described allow you to send a portion of a file to a REPL.  Just save the file normally.
Answer: I figured out what I wasn't doing. So to save my source code I have to create a file via C-x C-f and then input the source code into that buffer. Then when I come back to emacs I can  open the file and edit the code. At least this worked for me. Thanks for the input.


A newly opened tab in Chrome will sometimes close at random

Question: I've got a very curious problem in Google Chrome that's been giving me trouble for the past month or so, and I don't seem to be able to find a solution anywhere. Upon opening a new tab, there's a small chance that it will randomly close itself, and not after any set amount of time; it's pretty much random, and only happens a few times a day, so it's no more than a nuisance. Once I've switched to the new tab and begin typing, it will close itself without any warning or reason. My first thought was that my Chrome installation was messed up, but I also re installed Windows 7 yesterday, and it still happens on a fresh installation. The only other thing I can think of is an extension might be doing it, Awesome New Tab Page, but I'd like to consult SU before contacting others, I tend to see much quicker results and the community is very helpful. Thanks
Comment: Try disabling the extension first and see if it still happens. Also if your Ctrl key is faulting or u keep pressing it you might be using Ctrl+W to close the tab.
Comment: Thanks, it looks like it was the extension, as I thought
Answer: Try disabling the extension
You may also want to report the issue


What is the name of the document/amount of money you need to temporarily give the government in order to leave the country?

Question: I don't know how this works in other countries, but in Iran, when you want to leave the country, say, on business, you need to post bail, which can consist of either an amount of money or a piece of property with cash value, which will be returned to you after you get back. Can we use the word "bail" or is there a more suitable word for such an occasion?
Comment: In the US, bail is for jail. You could try *collateral*.
Comment: Not too long ago they had the same kind of rules for leaving Ireland. This could also be thought of as a bail but that is short for a bail-*Bond* which is to say a promise to return or forfeit the bond. Another good word for it is a *Ransom*.
Answer: Possibly you're looking for the word bond (certainly not bail):

bond n
a. A guarantee issued by a surety agency on behalf of a client, requiring the surety to pay a sum of money to a third party in the event the client fails to fulfill certain obligations; a surety bond.
TFD Online

Absent that, surety itself could work for you.

surety n
2. (Law) security given against loss or damage or as a guarantee that an obligation will be met
Comment: *Bond* may be an OK term for this purpose, but the quoted definition of *bond* does not seem to be applicable to the OP's case, as no surety **agency** is involved in what is described in the question.


Announcement to display just the title in SP 2010

Question: How to display just the title in Announcement on the Home page. Can I hide the body so it can be seen only if you click on the title in SharePoint 2010
Answer: Easy. You want to edit the Announcements web part and change the view. You could modify the existing view to remove the columns you don't want, or open the Announcements list and create a new view that only has the Name (linked to document) then use that for your web part.
Here's a short guide.
Comment: Thank you. This was really easy. This was just out of mind I dont know why. Anyways Thanks a lot for your help
Comment: No worries! We all have those moments. Be sure to mark as answer if this answered your question!


Site Column Not Displaying in List - SharePoint Online 2013

Question: I created a site column in a Content Type that's used by a List.  The site column is listed with others from the same Source (Content Type). After that, the new site column is nowhere to be found: I expect to see it when creating a new item, but nothing. How do I get the new column to surface in the new/edit/update list forms?
Comment: Are you using a custom infopath form or the Out of the box Sharepoint list form?
Comment: I am using an out-of-the-box SharePoint List form.
Answer: Have you set this content type as the default content type to the list ?
Go to list settings - advanced settings - > Allow management of content types - > Yes
Go back to list settings - > change the default content type to your custom content type.
Now try adding/editing the list item.
Comment: Yes, the content type IS is the default content type for this particular list, we've been using it for several years.  I added a site column to said content type like all others, nothing special about it.


How to account for purchase on behalf of client when expecting to get paid the following fiscal year?

Question: If a company buys an equipment for a client and bills the client at exactly the same cost, no more, no less, and the client pays the company back in the exact amount in the subsequent fiscal year, should the company still be putting the expense in the taxes? If so, should the expense go in the prior year and the revenue in the subsequent year? Or should the expense and revenue be recorded when latter occurs so they zero out?
Answer: It depends on whether cash or accrual basis accounting is being used. With cash basis, there'd be an expense in current year and the income would show up in the subsequent year (transactions are recorded when money changes hands). With accrual basis, the expense and revenue would be recorded in current year (when the revenue was earned, not when it was received). Most small businesses use cash-basis, businesses can (sometimes) switch accounting methods, but it requires IRS approval (have to file Form 3115).
Comment: Okay. Just to be sure I understand your point, in the cash-basis case, the company is going to pay a little less tax in the current year since that expense is taken into account, and instead will pay a little more tax next year since as you said the transactions are recorded when money changes hands. Thanks.
Comment: @2q. That's correct, and accrual-basis helps smooth this out a bit for some companies.


SSRS Templates

Question: I'm trying to figure out if you can create template files or skins for SSRS reports.  We are trying to standardize all of our reports to look similar.  If there are no known ways to create templates or skins how do you work around this issue?
Answer: If you're using the Buisness Intelligence Design Studio to create your reports, this was the approach we used for SQL 2005:

create a template by customising the
default.rdl
copy to C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject
this template then shows up in BIDS when you select Add > New Item in the Solution Explorer

We use a batch script to duplicate the latest template across all the development machines.
Answer: Yes.  They are called RDLC files.
You basically specify what your report will look like in these files, which are just XML files.  There is a built-in editor for these files in Visual Studio, which is drag and drop and very easy to use.

SSRS Templates


Schengen Area to UK to Canada to USA

Question: I am traveling on Air France from Paris to Heathrow and then out of Heathrow on Air Canada to Boston through Halifax. Can I check my bags through in Paris or do I need to clear customs at Heathrow? I have a three-hour window for connection but am hoping I don't have to go through arrivals and customs and then re-enter for departure on Air Canada.
Comment: Did you book the flights together?
Comment: Even if you're on separate tickets and therefore need to re-check your bags at Heathrow, you shouldn't need to be concerned with _customs_. Arriving from Paris, you would have green-striped baggage tags, so just choose the "arrivals from the EU" lane to bypass customs inspection after the baggage pickup.
Comment: the flights are ticketed separately. So if I go through blue lane "arrivals from eu" there is no need for customs?
Answer: When you arrive in the UK from France you can indeed go through the "arrivals from the EU" lane or, if you have nothing to declare, use the green "nothing to declare" lane.
But customs usually does not take much time, it is immigration that is the bigger hold up, where passports are checked, where you need to join the queue which can be long or slow going. (And you will find immigration before customs.
It will be worth it to ask whether you can check your luggage through.
Air France and Air Canada are not in the same alliance but Air Canada has 'non Star Alliance interline partners' and Air France is mentioned in the list of possible partners.
Even with tickets bought separately sometimes airlines are able to check luggage through and you should be able to get your boarding pass by checking in online. If that does not work, ask the airline staff, Air France as well as Air Canada if needed, where to get your boarding pass.
The information about the alliance partners is on this page.
Comment: With Brexit arriving in the UK is no longer free of customs inspection, although most of the time you will be able to use the 'nothing to declare' path if you do not bring strange things.

Schengen Area to UK to Canada to USA


SharePoint 2013 - Managed property value does not update

Question: I have configure SharePoint Search with line of Business Content Source (BCS).

Create Few Managed Property with this BCS.

Records is crawling successfully however managed mapped property value does not updated.
And one more thing, I have database in which I have 5 records however SharePoint crawling 7 records instead of 5. Two (2) of them are coming with null values.

Please help me to fix this situation...
Answer: I Got the Solution.
Above issue is resolved by adding ListElement and ItemElement in mapping of crawled properties box.
Answer: Did you map the crawled properties in the Search Service Application or the Site? BCS Properties can only be mapped in the SSA, even though they appear in the Site and Site Collection mapping them at that scope does not work.
I have not seen the issue with null values, I would troubleshoot the RootFinder for the entity.


About the Yang-Mills equation

Question: Perhaps this is a sick question. How do we know that Yang-Mills equation does not have a non-trivial classical solution in Minkowski spacetime in vacuum? By non-trivial solution, I mean one that connects a pure gauge to another with a different Chern-Simons charge. We know that there are solutions in Euclidean spacetime, the BPST instantons, that can do this. And I am aware of the existence of barriers between two pre-vacua with different Chern-Simons charges. But I do not know how to prove (or show) it explicitly.
Answer: Answered shortly. It has to do with compactness. Boundary conditions are very relevant for instanton-like solutions since by definition they must have a finite action. This immediately implies that such solutions must have a particular decaying behavior. In this process what is done mathematically is, compactify space-time. However this procedure makes sense only if your norm is euclidean because the quadratic form
$$x_\mu x^\mu = x_1^2 + x_2^2 + x_3^2 + x_4^2$$
is positive definite (technically $SO(4)$ symmetric which is a compact group), so a single point labeled as infinity can be defined, it representing all coordinates increasing and getting farther and farther from the origin. And then a solution can be found since expressions such as $|x|^{-n}$ make sense at infinity. This is not the case in the Minkowski case since its symmetry group is $SO(3,1)$ is not compact one cannot write solutions that fall-off consistently and give out finite actions.
Note: The above statements are not sufficient (just necessary) to have instanton solutions. Even in Euclidean signature in $\mathbb{R}^4$ with $U(1)$ symmetry, one does not have not trivial solutions because of gauge-equivalence.
Comment: Thanks a lot for your answer. While this argument for the existence of BPST instanton in Euclidean space is standard (a map from the boundary at infinity to the field space for pure gauge field configurations), it is still not clear to me why the symmetry group $SO(3,1)$ does not allow a solution in Minkowski space?
Comment: It is because it is topologically not a sphere so one cannot have a non-trivial "degree" mapping. So all solutions will be gauge equivalent. This argument is more delicate, I just wanted to give the spirit of the obstruction above.

About the Yang-Mills equation


Do I need to glue 2x4 supports for an apron sink?

Question: I am replacing an undermount sink with an apron sink. I modified my cabinet and built a support for the apron sink, however I forgot to use glue on the 2X4's and just have them screwed together and to the cabinet vs using glue and screws. Is this OK or should I unscrew everything, add glue, and screw it back together? I am installing a Kholer 5826 sink if it matters.
Image of my supports:
Comment: Apologies in advance, because you didn't ask, but plumbers take a pretty dim view of those accordian drain pipes. They gunk up something fierce, especially in a kitchen sink.
Comment: The 2X4s are on the bottom panel of the cabinet. I did consider cutting it out to get them to the floor but the bottom cabinet panel felt very sturdy so that seemed unnecessary to me. OK I found a 45 degree and 90 degree slip joint elbow at HD, I'm going to try that out, at least it won't have the wavy parts, but still a steep turn. Thanks for all the help!!
Comment: Yeah I am not too happy about that solution, the new sink will have a drain on the right side so for now that was the best option I could come up with without cutting out the current plumbing and redoing it. Have any other ideas?
Comment: Regarding the plumbing, it's usually possible (though troublesome!) to get hard pipe to work. 22.5° couplers will be your friend. On another note, did you manage to get those upright 2x4s bearing on the actual floor, or are they just sitting on the bottom panel of the cab? They might be okay if they're just in the cab, but the manufacturer specs say the bracing is supposed to hold 300 pounds. If you could pull the kick panel off the cab, you might be able to wedge a support between the floor and the underside of the cab bottom.
Comment: Put in a 90 degree slip joint, looks muuuuch better now. We'll see how that steep of a turn holds up but so far so good.
Answer: No. If anything you'd use construction adhesive, and not wood glue, but if you've done a good job with the screws glue isn't needed. In fact, it's rarely used in cases like this.
If you find that there's flex in your supports, re-screw it and make sure the boards are dead tight. Spread the screws widely in the vertical.


The ideal Splash Screen for mobile applications should be animated or static?

Question: The manager asks for animated Splash screen, but I am against it, since the animation can slow down and annoy the user, but what do you think?
Comment: What's the splash page for? If it's a placeholder that's shown while a view is being prepared, then an animation is not necessarily detrimental to load time. I'd say this becomes more of an issue the shorter the real load time is, because you ideally don't want to impact load performance any more than you need to. But maybe you're primarily showing it as part of the app branding. In which case some page load time may be traded off to help build brand engagement. If you provide more details, we'll be able to answer more specifically.
Comment: People tend to make requests without including background knowledge and values supporting their request. But for another to best meet the request it helps for all to explore the underlying principles and purpose. Asking requesters what are the principles/values motivating their request helps them either reveal the justification or reconsider their, possibly misguided, request.
Comment: This may help: [Pros/cons of splash-screen with articifial loading delay](https://ux.stackexchange.com/q/41682/93969)
Comment: Is there any app load time that can be used for a splash screen? If branding is the purpose, is there sufficient, appropriate branding in the app interface itself?
Answer: When in doubt, do user testing! Prepare both versions, at least in mock up, and let the users run through it multiple times. Since part of the concern is that users will be annoyed having to watch the animation every time the app loads, you can give them multiple tasks and ask them to exit the app in between. If the users are annoyed, then you have data to show your manager. And if the users don't mind or like the animation, then you've learned something.
As others have pointed out in the comments, a lot depends on when the app would look like without the animation. A simple animation may not actually have a noticeable affect on load time, and if the app needs to load a lot of data for core functions, the animation can actually give a cue that something is going on in the background. If the animation takes longer than the load time of essential functions, then you're wasting the user's time for no tangible benefit.


Can the array be reinvented in Ruby?

Question: This is just a hypothetical question, if you wouldn't have the Array and the Hash class, would there be any way of implementing an Array class in pure Ruby? How?
Answer: Yes we can!
class MyArray
  include Enumerable

  def initialize
    @size = 0
  end

  def <<(val)
    instance_variable_set("@a#{@size}".to_sym, val)
    @size += 1
  end

  def [](n)
    instance_variable_get("@a#{n}")
  end

  def length
    @size
  end

  def each
    0.upto(@size - 1) { |n| yield self[n] }
  end
end

a = MyArray.new
a << 1
a << 2
p a.to_a     #=> [1,2]

This works by creating instance variables @a0, @a1, etc. on the object to represent array indices 0, 1, etc.  It has constant time length and index operations.  The rest of the operations (remove, etc.) are a bit more effort to implement, but it's absolutely possible.
Note that the constant time property for the index operation depends on the underlying Ruby runtime using an appropriate data structure for instance variables.
Comment: I think this the most ruby-esque solution.
Answer: You could use a linked list, which would be horrendously inefficient, but possible. You could also use a binary tree (see above comments).
I guess, my point is: you couldn't get a decent array without lower level language support. The basic structure that I assume is used in the Ruby array is a C array (though I could be wrong). With such a fundamental type, lower level support will be crucial for anywhere decent performance.
Comment: Haven't thought about that. Interesting :)
Answer: You can implement [] in any object. For example:
def [](index)
    proxy_object.send(index.to_sym)
end

Comment: I know that, I was referring to an array per-se.
Answer: Sure you can. Ruby is a Turing-complete language. You can implement everything that you can implement in any language in Ruby.

Can the array be reinvented in Ruby?


High Performance BPEL engine?

Question: I am evaluating BPEL engine for our high performance telecom application but performance seem to be very poor. We have evaluated  Apache Ode, SunBPEL engine, Active BPEL etc. Do you know any faster BPEL engine implementation or BPEL implementation in C/C++ ?
Answer: I believe your performance measurements were very brief.
For example, I'm familiar with Apache ODE and I must say there is quite a lot of possibilities to speed things up.
After doing configuration optimizations, like using in-memory processes and disabling debug events, I got 60 TPS in SoapUI. After I did some code improvements, it went up to 150. So there is field for optimization in future.
I don't know how many TPS do you need, but 60 on a single machine is quite enough.
As for optimizing persistent processes, you need to tune indexes in database.
If you want more details on optimization, you can make a post to ODE user group.
Answer: Have you looked at Oracle BPEL?  If it's like their database, it's probably fast but hard to configure and administer.

High Performance BPEL engine?


Where is the parachute?

Question: In GTA San Andreas a parachute would apear on your back the moment you boarded a plane. Now everytime I bail out of a plane I just fall to death. How does one aquire a parachute in GTA V?
Comment: Afaik, planes still have one. However, check ammu nation too.
Answer: The Parachute can be found at the very beginning of the game. The parachute is located right next to the cable car exit on top of Mount Chilliad.
Jump off the mountain and press the A button on Xbox 360 / X button on PS3 / Left Mouse button on PC to open the parachute and drift down the mountain.
Answer: You will receive a parachute every time you enter an aircraft after a certain late game Trevor mission.
You can also buy a parachute from Ammu-Nation (might need to to couple of story missions before it unlocks).
Answer: Parachutes can be purchased at Ammunation where it is at the top-left corner on the weapon wall.
A parachute can be equipped in the air (if you're free falling, not just a jump) by going to the gun wheel and looking at the top-left. After you select it press the Xbox A button or the PlayStation X button to activate the chute. Pressing the Xbox Y button or the PlayStation △ button disconnects you from the chute, allowing you to fall freely again (to your death).

Where is the parachute?


How to use the FormlyConfig for custom type with angular 4

Question: I am using formly form (ngx-formly-form )in angular 4 , i want to create the custom type for toggle functionality like "Yes" or "No" buttons.
Can any one share the example of how to use FormlyConfig in angular 4.
I found some example but which is angular js specific.
Answer: well, I think it can be implemented easily if you follow the doc https://formly.dev/guide/custom-formly-field which shows you how to create a custom field type.
if you're looking for a working example see https://stackblitz.com/edit/ngx-formly-custom-template-3yvkcd


architecture layers and MVP in android

Question: There are 3 layers: presentation, data, domain. MVP is an implementation of presentation layer, which itself consists of Model, View and Presenter. Please, describe the difference between Model and Data, Domain layers.
Comment: We discussed it here. http://stackoverflow.com/a/38360843/1559852
Answer: MVP is a pattern not an arquitecture itself, the model in MVP is the view model, meaning it should represent the data you dislay in the view, domain model is all the data that represents your application entities, in simple cases you will probably use the same domain model in the view but it's a good idea to separate both, keep your app logic in domain model, MVP will consume the data from domain model and add or transform presentation model for the view.
For example if you have a Users.geActiveUsers(), in a presenter you can get the list of active users and also have additional information in the model like "selectedUser" that doesn't belong to the domain model.
Look for "clean arquitecture" to know more about domain model and view model.

architecture layers and MVP in android


How can I insert an array of variable into a database individually in php?

Question: How can i insert the array into the database individually, It's displaying error. I want to insert them all at once... sometimes the array may be more the 3, 5 or 10.
$roll_num = '111,222,333';
$rollnum = explode(",",$roll_num);

$sql ="INSERT INTO eyfstb(specialnum)  VALUES('$rollnum[]')";

if($db->query($sql)== TRUE){
    echo "true";
}else{
     echo "false";
}

Comment: I don't understand how you mean
Answer: The explode function converts your array into a multiple index variables, so regarding your question, it should be:
$roll_num = '111,222,333';
$rollnum = explode(",",$roll_num);

$sql ="INSERT INTO eyfstb(specialnum)  VALUES('$rollnum[0]')";

if($db->query($sql)== TRUE){
    echo "true";
}else{
     echo "false";
}

If you want to insert all of them, you could either store it as a JSON in your table, or create additional columns.
Comment: I want to insert them all at once... sometimes the array may be more the 3, 5 or 10.
Comment: To fix your problem you need to use a `loop` function so that you can insert dynamically to your `Database`. Pls, take a look to my answer above. Thanks
Answer: As I understand you want to insert a new row for each array cell. To do so, I would recommend:
$roll_num = '111,222,333';
$rollnum = explode(",", $roll_num);

$sql = "INSERT INTO eyfstb(specialnum) VALUES('" . implode("'),('", $rollnum) . "')";

That will produce the following SQL:
INSERT INTO eyfstb(specialnum) VALUES('111'),('222'),('333')

And will be more efficient than looping and inserting every iteration.
Answer: You can Insert it Dynamically to your Database and this will fix your problem. :D
  $roll_num = '111,222,333';
  $rollnum_arr = explode(",",$roll_num);

  for($x = 0; $x < count($rollnum_arr); $x++){
      $sql ="INSERT INTO eyfstb(specialnum)  VALUES(".$rollnum_arr[$x].")";
  }

  if($db->query($sql) == TRUE){
      echo "true";
  }else{
      echo "false";
  }

Answer: Firt of all, your $roll_num variable is not an array.
And the explode function will split your string by a string as it said here: https://www.php.net/manual/en/function.explode.php
For that you could build your array whith your values inside like:
$roll_num = array('111', '222','333');

And INSERT INTO thanks to a loop:
for ($i = 0; $i < count($roll_num); $i++) {

    $sql = "INSERT INTO eyfstb(specialnum)  VALUES(" . $roll_num[$i] . ")";
    $db->query($sql);
    $db->execute();

}

It should work :)


Interesting question about twin cousins

Question: If $p$ and $p + 2$ are (twin) primes, then $p + (p + 2)$ is divisible by $12$,
where $p > 3$.
Comment: @Gerry I think it may be some language thing. I don't know if it was deliberately intended as some sort of pun or something. But in Spanish and (after checking in google) Portuguese the word for cousin is "primo" which is also the word used for prime. I'm guessing that the OP is from Portugal or at least speaks Portuguese, from the website that is mentioned in his profile.
Comment: And how do cousins enter into it?
Comment: Is this a question? Are you trying to prove this? I don't understand.
Comment: I love it that "interesting" is part of the question. I think the idea is that *we* get to decide what's interesting by upvoting (or not...)
Comment: @Gerry: If the parents of the twins were twins, then the twins are also cousins... or something?
Answer: Often if you are asked to show that a number $n$ is divisible by some positive number $N$, a good way to do this is to factor $N = p_1^{a_1} \cdots p_r^{a_r}$ into distinct prime powers and show separately that $n$ is divisible by $p_i^{a_i}$ for all $i$.  (This is clearly necessary, and it is sufficient because $n$ is then divisible by the least common multiple of all these numbers, which is $N$.)  At any rate this sort of local approach of working prime by prime becomes an increasingly important technique as one continues one's study of number theory.
So here I am saying to show separately that $2p+2 = 2(p+1)$ is divisible by $3$ and $4$.  The divisibility by $4$ is especially straightforward: for divisibility by $3$ it is equivalent to show that $3$ divides $p+1$, i.e., $p \equiv 2 \pmod{3}$.  For that, it is enough to rule out the other two possibilities $p \equiv 0 \pmod{3}$ and $p \equiv 1 \pmod{3}$: I leave that to you.
Answer: To show $p+(p+2)=2p+2$ is divisible by $12$, you can show $p+1$ is divisible by $6$, or $p+1\equiv 0\pmod{6}$, that is, $p\equiv 5\pmod{6}$. Now $p\gt 3$ cannot be equivalent to $0$, $2$, $3$, or $4$ modulo $6$, else it wouldn't be prime. If $p\equiv 1\pmod{6}$, then $p+2\equiv 3\pmod{6}$, which means $p+2$ is not prime, as it is divisible by $3$. So $p\equiv 5\pmod{6}$ as needed.
Answer: I've seen 4 answers, all good, but no one has suggested working directly on 12. Modulo 12, if $p$ is prime (and greater than 3), then $p$ is 1, 5, 7, or 11 (since those are the only numbers less than and relatively prime to 12). If $p+2$ is also prime, that leaves $p$ being 5 or 11 mod 12, and $p+p+2$ being a multiple of 12.
If "modulo" is unfamiliar to you, put it this way: $p$ must be of one of the forms $12k+1$, $12k+5$, $12k+7$, $12k+11$ (again, because for any other $m$ less than 12, $m$ will have a common factor of 2 or 3 or more with 12, so $12k+m$ will have that factor and won't be prime). Then for $p+2$ to be prime as well, we're down to $p$ being $12k+5$ or $12k+11$, and then you can calculate $p+p+2$ and see there's a 12 to factor out.
Answer: Or to show $6 \mid p+1$ note that any prime $p>3$ is of the form $6k-1$ or $6k+1$. But $p \neq 6k+1$ because if $p =6k+1$, then $p+2 = 6k+3$ which doesn't give a prime always. For example $k=1$ it gives $9$, which is not a prime. Hence $p$ has to be of the form $6k-1$.
Answer: Although I don't quite know that I understand the purpose of this question, I wanted to answer. This is actually very simple. If we recall that primes > 3 will be either congruent to 1 or 5 $\mod 6$, then we quickly see that all $p$ in this problem are congruent to $5 \mod 6$. How do you get the other factor of 2? One prime will be congruent to $1 \mod 4$, and another $3 \mod 4$. So their sum is divisible by 4 and 6. Therefore, it's divisible by 12.

Interesting question about twin cousins


Does a story require a villain to succeed?

Question: So far in my WIP, which is a "journey" story, the main characters have been struggling against the environment and the fact that they're displaced and trying to return home.  I've arrived at a point in the plot where they're settling in to their situation and I've stalled out.  I couldn't figure out why.  Now I realize that they don't have something clear to struggle against.  I know what I want them to accomplish over the course of the novel, but I don't know what, besides a core time travel mechanism in the story, they need to "fight".  I feel like I need some way to create conflict for them (maybe not), but I don't quite know how.  One MC is going to go through a deep bout of depression, and the other will pull him out, but that's not long-term sustainable.  Do I need to have a personified villain?  This conversation suggests that I don't.  What non-personified (e.g. environment, time pressure, etc.) are examples of things where I could find inspiration for my story?
Comment: Sometimes the struggle is against nature or the main character struggles against themselves. A recent famous example of man vs nature is *The Martian*. There's no villain and it's a great, compelling story.
Comment: Another one is *Cast Away*. There is no antagonist through the film, yet is really compelling, and very conflictual.
Comment: Small tidbit of advice: you might not want to accept an answer straight away, especially in less than 24 hours (we all live in different timezones). You never know what useful information others might bring. If there's already an accepted answer, it tends to discourage others from posting. The first answer might well be the one you accept in the end, but why not wait and see what other people might add?
Comment: Related: https://writing.stackexchange.com/questions/36998/how-to-write-a-story-without-conflict-like-my-neighbour-totoro
Comment: This question is way too broad. It's like asking how can a story end besides romantic boy-gets-girl...
Comment: There are many many stories that do not have a villain. Smile by Raina Telgemeier is one of the many popular books that have no villain. Most of the books without a villain are usually based on real life.
Comment: Add in *Juno*, and *The Perfect Storm*.
Answer: There's a school of thought that every scene must have conflict, that every scene needs an antagonist.
This idea is different than every scene needing a villain. A villain is usually an antagonist, but heroes (or neutral factors) can also antagonize a protagonist in scenes. Some great stories and scenes turn villains into co-protagonists (maybe Severus Snape falls into this category; clearly an antagonist through much of the story, and possibly a brother-in-arms by the end.)
There is a school of thought that each story is at its heart a choice between what your protagonist wants and what your protagonist needs. The entire story is this: Your hero weighing the choice, finding the decision and sacrificing one or the other to reach what she has decided. Conflict is implicit in this.
So, yeah, there should be antagonism = an antagonist, and this can be a 'person.'
A villain is simply a useful way to put this choice into relief. A personified villain makes it easy to frame the story. There are a thousand examples of this kind of story.
But your antagonist can be an evil corporation, a governmental group, the environment, space aliens, a plague, a drug cartel, one's own demons, religion, the past, the future--anything your protagonist is working against becomes the antagonist. If it is thematically woven through and lies at the crux of your protagonist's choice, it could be thought of as the villain.
It sounds like your antagonist is either time, or depression, or an internal struggle about whether they should go back or not.
You can personify any threat you wish. If you want to. What this does is make it easier for the reader to see the signposts in your story. It's like a trail with obvious markers.
Answer: Traditionally, people have referred to four different types of conflict that can animate a narrative.

Sexist language aside, these classifications can be quite helpful:

Person versus person - Your typical villain story.
Person versus nature - A disaster story, or a survival story.
Person versus self - Your hero must work hard to overcome deep flaws within.
Person versus society - The government is out to get your hero, or her conformist peers just can't accept someone who doesn't fit in.

But ultimately, something needs to keep the narrative from just being a smooth progression from start to finish.  It's possible to be quite creative with this, however, and one story can quite often have multiple types of conflict. For example, in my current WIP, the protagonist thinks he has antagonists, but really, his main enemy is himself.  Other stories have dealt with antagonists who become friends, or at least allies, when facing off against society or nature.
https://en.wikipedia.org/wiki/Conflict_(narrative)
Answer: No, a story does not need a villain.
There are many stories in which a person struggles against nature, struggles to survive, struggles to invent something new, etc.
All the story requires (to be interesting) is a person trying to do something that they do not find easy, so they have setbacks, make mistakes, or have to sacrifice to make something happen.
In writing, it can be easier to do this if another person is opposed, because the plausibility of difficulty is not questioned; this other guy is shooting at them (figuratively or literally).
But look at the movie "Juno" for example; a teen girl gets pregnant and has to decide what to do. There are no villains, her parents are supportive, she has to tell the father (her friend), decide whether to get an abortion or have the child, then whether to keep the child or put it up for adoption, then choose an adoptive parent. No person harshly opposed her at any time (though opinions were expressed about abortion).
In Castaway, Tom Hanks is stranded by accident on a deserted island, and must figure out how to get home. Again, no villains. Consequences of being gone and presumed dead for years, but nobody trying to thwart him.
You have a perfectly good story with a crew against the elements, but it sounds to me like you have let them solve too many problems by "settling in" to their situation. In this type of story, they cannot settle until they have everything they want, or know they are permanently denied what they want; and there the story ends.
You need to find that wrong turn. Kick that environment into a higher gear of opposition, with dangerous predators, heat, cold, starvation, illness, hurricanes, earthquakes, vipers, whatever. This doesn't get easier, every skill they gain for survival gets offset by nature throwing another bucket load of crap on them, trying a fun new way to kill them.
Or they come to an impasse, a bridge is out, or there is no bridge but the river is too fast, and they have to backtrack or find a way around it. Through the forest! Great idea! Then lightning sets the damn forest on fire, and they run. They tie themselves together and have to jump into that fast river and try to not drown as it sweeps them fifty miles off course. And over the frikkin' falls. It might have been a little easier if Joe knew how to swim.
Comment: @J.D.Ray I consider "villains" people (or at least sentient and consciously plotting against people), not circumstances or accidents. So I see no villains in Castaway, Juno, or movies about asteroids or earthquakes or floods, etc. I'd suggest if you MUST make them settle, start fights between them about that, or where, or who's in charge and why, etc, to sustain conflict. Stories stall when you run out of conflict, that looks like your problem to me. Change the plot so they don't settle, or find a way to add conflict when they do.
Comment: @J.D.Ray It could be interesting if by the time they can leave they are already integrated into society - have responsibilities towards other people, who depend on them. Setting duty against desire is a powerful internal conflict.
Comment: In Castaway, the primary villain was the environment.  Oh, and for a moment, the goat.  And then it was the struggle to re-integrate into society.  So there were many villains, or if you prefer, antagonists.
Comment: In my story, the characters are going to settle in because they feel like they have no choice.  Once they get settled, they're going to see that they do, which is going to create another struggle as they realize they have a path to get what they want (back home), and yet another as they struggle with the idea that they now have two concepts of where "home" is.  I can *feel* the storyline, but can't *see* it yet.


Is there a way to avoid using the geth console?

Question: The geth JavaScript console is cumbersome and does not support tab completion. Do any tools exist such that I can avoid using it?
Answer: Yes! geth_tools is made for this exact purpose!
When you use "geth_tools", all you have to do is define your contracts in Solidity and program how you want to interact with the contracts in JavaScript. Then the tools take care of everything else.

Deploy a contract: ./compile_and_deploy.pl <outdir> <solidity source code> [constructor arg0] [constructor arg1] ...
Run methods on the deployed contract: ./run_code.pl <outdir> <javascript>
Answer: Well of course you could use Parity and its UI.  I'm not sure if that's what you want but it's an option.  It depends on what you're trying to accomplish.  If you like the command line interface but not the geth console, then geth_tools could be useful as @Thorkil... said.


How to Import a CSV file containing multiple sections into R?

Question: I want to import the contents of a csv file into R, the csv file contains multiple sections of data vertically, seperated by blank lines and asterisks.  For example
********************************************************
* SAMPLE DATA ******************************************
********************************************************
Name, DOB, Sex
Rod, 1/1/1970, M
Jane, 5/7/1980, F
Freddy, 9.12,1965, M

*******************************************************
*  Income Data ****************************************
*******************************************************
Name, Income
Rod, 10000
Jane, 15000
Freddy, 7500

I would like to import this into R as two seperate dataframes.  Currently I'm manually cutting the csv file up into smaller files, but I think I could do it using read.csv and the skip and nrows settings of read.csv, If I could work out where the secion breaks are.
This gives me a logical TRUE for every blank line
ifelse(readLines("DATA.csv")=="",TRUE,FALSE)

I'm hoping someone has already solved this problem.
Comment: This SO question is vaguely similar http://stackoverflow.com/questions/509595/csv-file-with-multiple-time-series
Comment: Using `ifelse` is redundant in this case. `readLines("DATA.csv")==""` works the same.
Answer: In this case I will do something like:
# Import raw data:
data_raw <- readLines("test.txt")

# find separation line:
id_sep <- which(data_raw=="")

# create ranges of both data sets:
data_1_range <- 4:(id_sep-1)
data_2_range <- (id_sep+4):length(data_raw)

# using ranges and row data import it:
data_1 <- read.csv(textConnection(data_raw[data_1_range]))
data_2 <- read.csv(textConnection(data_raw[data_2_range]))

Actually your first example set has inconsistent structure so data_1 looks strange.
Answer: Maybe this untested fragment can be helpful:
reader <- file("DATA.CSV", "r")
lines <- readLines(reader)
writer1 <- textConnection("csv1", open = "w", local = TRUE)
writer2 <- textConnection("csv2", open = "w", local = TRUE)
currWriter <- writer1
lastLine <- length(lines)
lineNumber <- 4
repeat {
    if (lineNumber>lastLine) break
    if (lines[lineNumber]=="********************************************************") {
        lineNumber <- lineNumber + 2 # eat two lines
        currWriter <- writer2
    } else {
        writeLines(line, currWriter)
    }
    lineNumber <- lineNumber + 1
}
close(reader)
close(writer1)
close(writer2)
csv1Reader <- textConnection(csv1, "r")
csv2Reader <- textConnection(csv2, "r")
df1 <- read.csv(csv1Reader)
df2 <- read.csv(csv2Reader)
close(csv1Reader)
close(csv2Reader)


OIS example in Hull's book

Question: In Hull's book (9th edition), on pages 202-203, there is an example for computing the payoff of an OIS that I am confused about. It says suppose in a US 3-month OIS the notional principal is \$100 million and the fixed rate (i.e. the OIS rate) is 3% per annum. If the geometric average of overnight effective federal funds rates during the 3 months proves to be 2.8 per annum, the fixed-rate payer has to pay 0.25*(0.030-0.028)*\$100 million. In my understanding, if the overnight interest rates over the period are $r_1,...,r_n$, and the swap rate is $q$, then isn't the fixed-rate payer paying
$$(1+\frac{q}{360})^n$$
and receiving
$$(1+\frac{r_1}{360})(1+\frac{r_2}{360})...(1+\frac{r_n}{360})?$$
In which case, if the geometric average of the overnight interest rate is
$$\frac{r^*}{360}=[(1+\frac{r_1}{360})(1+\frac{r_2}{360})...(1+\frac{r_n}{360})]^{\frac{1}{n}}-1$$
and the cash flow of the fixed-rate payer is actually
$$(1+\frac{r^*}{360})^n-(1+\frac{q}{360})^n$$
Is my understanding correct? I can't make sense of the example in the book.
Answer: I'm not clear on the algebra you've given, but I think all Hull is doing is saying the annualised fixed rate is 3% and the 3m OIS float rate fixing is 2.8% - thus the cashflow is the difference of this adjusted for the accrual period (0.25 in this case), times the notional. He doesn't say anything about how the 2.8% comes about.  Using your notation: if the daily fixings in the 3 month period (which, for the sake of argument, say has 66 good business days) are $r_i$ and the (business daily) accrual periods are $\delta_i$, for $i=1,...,66$, then that 2.8% comes from something like: $$ ((\prod_{i=1}^{66} (1+\delta_i r_i))-1)/0.25.$$
Answer:
isn't the fixed-rate payer paying $(1+q/360)^n$

Interest rate swaps typically don't involve exchange of notional. Also, fixed leg of a swap is usually quoted in money market convention, not as a compounded rate. So the fixed cash flow would be $q\cdot n/360$, assuming ACT/360.

and receiving $(1+r_1/360)(1+r_2/360)...(1+r_n/360)$

Floating (compounded) leg of an OIS is usually converted to a money market rate convention as well, so one would calculate $r=((1+r_1/360)(1+r_2/360)...(1+r_n/360)-1)\cdot 360/n$. The result is usually rounded, and floating cash flow amounts to $r\cdot n/360$.
As a concrete example, consider a 100M USD OIS, traded on 09/02/2023 for 1 week (VD 13/02/2023, MD 21/02/2023), with a fixed rate of 4,5%. Fixed payment would be 100M*4,5%*8/360=100 000,00 USD. Floating rate would be ((1+4,55%/360)*(1+4,55%/360)*(1+4,55%/360)*(1+4,55%/360)*(1+4,55%*4/360)-1)*360/8=4,55158% (rounded to 0,00001%). Floating payment would be 100M*4,55158%*8/360=101 146,22 USD. Net, the swap buyer would receive 1 146,22 USD on 23/02/2023.

OIS example in Hull's book


Using PhoneGap Media API with Ripple

Question: I'm new to PhoneGap/Cordova and I'm trying to experiment with some of the API.
I have been using the documentation examples within Ripple Emulator for Chrome however when trying to use the media example I get the following errors in the console:
<code>Uncaught TypeError: Object [object Object] has no method 'hasResource'
Uncaught TypeError: undefined is not a function
Uncaught TypeError: undefined is not a function
</code>
Am I missing something, can this be used inside the Ripple Emulator?
I've tried searching around with little information available for what I'm looking for.
Sorry if this is somewhat of a simple question but I don't seem to be able to find any info.
Thanks
Comment: Where do you see hasResource defined in the Media APi?
Comment: It's within the Chrome dev tools console area
Comment: Err, but where do you see it _documented_? Because I'm not seeing it.
Answer: am not sure if at time of posting the version 2.0 of Cordova was released yet. But you should follow this API guide inside of the 1.0
http://docs.phonegap.com/en/2.0.0/cordova_media_media.md.html#Media

Using PhoneGap Media API with Ripple


What is best option for BI capabilities with SharePoint

Question: In SP2010 there are silver light dashboards used to be there in our project. Now we planned to convert them into BI reports in SP2013. All these report data is coming from list and libraries. Some reports should also have drill down capabilities. I am planned with performance point services or excel services. But is it proper one. Reports should have filter capability. If I install SSRS for SharePoint is it possible to achieve the same? Everywhere showing examples of external database like Adventure Works with sharepoint. But I have to build a report using list and libraries. Which will be best option?
Answer: Regarding If I install SSRS for SharePoint is it possible to achieve the same? Everywhere showing examples of external database like Adventure Works with SharePoint. But I have to build a report using list and libraries
Yes , you can use SSRS to show data from SharePoint Lists using Report Builder ,  to do that check the detail steps at
Create SSRS Report from SharePoint 2013 List using Report Builder 3.0
Regarding What's the best option ?
you have mentioned most of the available BI and reporting tools in SharePoint, I suggest When you try to select appropriate tools you should be aware of the following 5 factors

The SharePoint Edition.
SharePoint Topology.
The Capability of the tools.
The Client Requirement.
your knowledge with this tool.

Based on the above factors you can select your appropriate tools. (Note : Based on your mentioned scenario , I suggest SSRS)
**Below is simple comparison between SSRS , PerformancePoint and Excel Services **
The SharePoint Edition

PerformancePoint. (Require SharePoint Enterprise)
SSRS. (Require SharePoint Enterprise/Standard/Foundation)
Excel Services. (Require SharePoint Enterprise)

SQL Services Reporting Services - SSRS
Pros

Flexibility in defining specific formatting and layout, specific item -placement, multiple or composite report items, groups, headers, footers, subtotals
Report caching and snapshot for better performance especially if the source data query is complex and takes longer to execute
Creating report subscription for automatic report delivery via email or file share mode
Can combine multiple data sources (relational and OLAP data) into a single report
Additional charting options - map, area, range, scatter, polar, 3D, sparklines, data bars, etc
As similar as PPS dashboard, SSRS reports can also be deployed on a SharePoint site for collaboration

Cons

Harder to create dashboards and therefore often done by IT people
No automatic drill-through and drill-across features

PerformancePoint Services - PPS
Pros

Unique decomposition tree features for better and multi-level data analysis; you can refer to this tip for more on decomposition tree feature.
Automatic drill-through and drill-across features using the decomposition tree on SSAS cube
Stunning/great appearance of dashboard, score cards, etc.
Scorecards allow users to enter comments against KPI values
Usually, less development time required in comparison with SSRS reports or dashboard

Cons

Comes with SharePoint 2013 Enterprise Edition
Limited flexibility in defining formatting and layout; cannot be customized or modified as much as SSRS

Excel Services
is a remarkably good choice for a Self Service BI scenarios. The ease of development and the flexibility of the UI options are great.  The greatest drawback is inability to interact with charts and graphs on the Excel Services rendered web page.  Also, if you are trying to delight the end-user with you data visualization, it can be a challenge as the final product at the end still looks very much like Excel
Form more details check

comparing-performancepoint-powerview-excel-services-and-reporting-services
sql-server-reporting-services-vs-performancepoint-services
Comment: Excel Services does have interactions with slicers and powerpivot, which can be used effectively. Have you considered PowerView? I haven't used it recently, but it was looking very good and moving to HTML5. The other possibility is PowerBI, although not available directly in SharePoint at the moment.
Comment: @M.Qassas, thanks for your details steps. I am having SharePoint 2013 enterprise. If use excel services, I can get data from list? Graphs has to be updated automatically when data was changed in the list.
Comment: @Mihir so sorry for late answer I was not here, , yes you can do this , please check http://tavislovell.com/create-a-dashboard-from-your-sharepoint-list-data-using-excel-services-and-the-excel-web-access-web-part/  and https://blogs.technet.microsoft.com/excel_services__powerpivot_for_sharepoint_support_blog/2015/07/28/excel-services-consuming-a-sharepoint-list-using-the-listdata-svc/ and https://blogs.technet.microsoft.com/excel_services__powerpivot_for_sharepoint_support_blog/2013/07/11/excel-services-using-a-sharepoint-list-as-a-data-source/ please tell me if you need more clarification
Comment: @Mihir Please Don't forget to **Mark** and **Upvote** the correct answer in case it helped you


How to give the same order for "OK" and "Cancel" buttons in KDE and GNOME applications?

Question: I have installed some KDE and GNOME applications on the same computer. I use the applications at the same time. I find, I often hit the wrong button when I see "OK" or "Cancel" or "Yes" or "No" buttons, because the order is different. Is there any way to set these consistently, either changing to the KDE order or to the GNOME order?
Answer: So I found out that this is not configurable within KDE Plasma. Here is the culprit: QDialogButtonBox::KdeLayout is hard-coded in the source code as a style hint of the Qt5 intergration plugin. One way to change this is to patch plasma-intergration to use QDialogButtonBox::GnomeLayout instead.
Another option is to use qt5ct. If you set the theme to Breeze and set the following menu option to GNOME, things look and feel much like KDE.

However, since I'd like to stay as close to KDE behavior as possible in all respects but the dialog button layout, I didn't find this option satisfactory. Your best bet is to patch plasma-intergration. Maybe at some point it will be updated so that it's possible to set your preferred dialog button layout.
Comment: Two years later, it is still hardcoded. I'm surprised that there is no option to change this.
Comment: @valsaysReinstateMonica Be the change you want to see in the world I guess. ;)
Comment: I've found how to change this: use gtk2 theme (available in ubuntu repo). Should write an answer about this.


Dual iPad deleting

Question: I have two iPads, and want to give my adult daughter one. I don't want to clear it completely, leaving games and such on there for her. I need to clear off the mail and photos. Will this do that to my new iPad with the same mail and photos?
Comment: Do it correctly now-erase it fully and set it up again with a new appleid or her existing appleid from another device.  If you want her to be able to redownload purchased games set up family sharing, if it's a paid game she will not have to pay again. If you change the appleid on the iPad to hers without clearing the AppStore will complain if any of them need to be updated.  Do yourself a favor and do this correctly first time and that means clearing the iPad and starting over.  Appleids are not meant to be shared, if you do not take this advice now you will be back with more questions later.
Answer: You could go through Settings and delete all the accounts under Mail, Contacts, Calendars, sign out of iCloud, iTunes and App Store. This should cover most of it. I think you're better off erasing the device and setting it up fresh though. You can always re-install the apps. If you use Family Sharing, she'll be able to install anything you've ever bought from iTunes.
https://support.apple.com/en-us/HT201088
Comment: Thank you, but what I want to know is if it will affect my iPad Air2 when I do that?!!
Comment: Is the Family Sharing free? I didn't see it say anything about a fee! Thx
Comment: Family Sharing is free. Deleting apps/signing out of iCloud from one iPad will not affect the other one.

Dual iPad deleting


Don't know how to find all the roots

Question: So i got this problem :
 Find all the roots of  $r^{3}=(-1)$
 i can only think to use :
 $\sqrt[n]{z} =\sqrt[n]{r}\left[\cos \left(\dfrac{\theta + 2\pi{k}}{n}\right) + i \sin\left(\dfrac{\theta + 2\pi k}{n}\right)\right] $
 i know that $\theta = \tan^{-1}(\dfrac{b}{a}) $as in from $ z=a + bi$
 $r=\sqrt[]{a^2 + b^2}$ , $k=0,1,2,3,4,.. n-1$
 so anyone could explain this to me ?
lets say that $r^{3}=(-1) == z^{3}=(-1)$ a since i dont like it and it messes me up using the formula
 so far :
$ z^{3} = (-1) $ so $z = \sqrt[3]{(-1 + 0 \cdot i)}$
$ r= \sqrt[]{(-1)^{2} + 0^{2}}=1$
$\tan^{-1}(\dfrac{b}{a})=\tan^{-1}(\dfrac{0}{-1})=\tan^{-1}(0)=0$ <- not sure about his part
k=0;
$ z^{3}=\sqrt[3]{1}(\cos(\dfrac{\pi + 2\pi \cdot 0}{3})+i \cdot \sin(\dfrac{\pi + 2\pi \cdot 0}{3})$
$ =\cos(\dfrac{\pi}{3}) +i\cdot \sin(\dfrac{\pi}{3})= \dfrac{\sqrt[]{3}}{2} +\dfrac{i}{2}$

k=1;
$ \sqrt[3]{1}(\cos(\dfrac{\pi+2\pi \cdot 1}{3})+i \cdot \sin(\dfrac{\pi+2\pi \cdot 1}{3})$
$=\cos(\pi) + i \cdot \sin(\pi)=(-1) + 0 = -1$

k=2;
$\sqrt[3]{1}(\cos(\dfrac{\pi + 2\pi \cdot 2}{3})+i \cdot \sin(\dfrac{\pi + 2\pi \cdot 2}{3})$
$=\cos(\dfrac{5\pi}{3})+i \cdot \sin(\dfrac{5\pi}{3})=-\dfrac{\sqrt[]{2}}{2}-i\cdot\dfrac{\sqrt[]{2}}{2}$
 so is this correctet or im missing something here?
Roots $(\dfrac{\sqrt[]{3}}{2} +\dfrac{i}{2};-1;-\dfrac{\sqrt[]{2}}{2}-i\cdot\dfrac{\sqrt[]{2}}{2})$
Comment: Since $|r^3|=|-1|=1$ it follows that $|r|=1$ hence our roots lie on the unit circle in the complex plane. In fact, since $r^3=-1$ we know that our roots are precisely those complex numbers that partition said unit circle into three equal parts; one such number is obviously $-1$. Can you determine the others? http://en.wikipedia.org/wiki/Root_of_unity
Comment: As you suspected, the angle is incorrect. The $\theta$ for $-1$ is $\pi$, not $0$. The problem shows up because $\tan$ is not injective, so we can't make a nice inverse. For all $x$, there are two $\theta \in [0, 2\pi)$ such that $\tan(\theta) = x$, and they lie on opposite sides of the unit circle. (Can you see why?). Your $==$ notation makes me think you're a programmer, so it may help to look up functions called "atan2(x,y)".
Answer: As an alternative to finding "roots of unity" using the "$\operatorname{cis} \theta$" approach, you can easily solve the equation $$r^3 = -1 \iff r^3 + 1 = 0 \iff (r+1)(r^2 - r + 1)$$
That gives a real root $$r_1 = -1,$$
and two complex roots, which can be solved by applying the quadratic formula $$\left(\dfrac {-b \pm \sqrt {b^2 - 4ac}}{2}\right)\;\;\text{to}\;\;r^2 -r + 1 = 0\quad\text{to find}\;\;r_2, r_3$$
$$r_2, r_3 = \frac 12 \pm \frac{\sqrt {-3}}{2} = \frac 12 \pm \frac{\sqrt 3}2\;i$$
Comment: This needs a TU. +1
Comment: @amWhy $\Large{+}^+$ ;)
Answer: Hints:
Using $\,cis(\theta):=\cos\theta+i\sin\theta=cis(\theta+2k\pi)\;,\;\;k\in\Bbb Z\;$ , we have:
$$z=r\,cis(\theta)\implies -1=cis(\pi+2k\pi)=z^3=r^3\,cis(3\theta)\;\;\text{(de Moivre's Theorem)}\implies$$
$$z_k:=r\,cis\left(\frac\pi3(1+2k)\right)\;,\;\;k=0,1,2\;\;\text{(why is it enough to take these values of}\;\;k)?$$
Now calculate the roots, taking into account that $\,r=1\;$ (why?)
Comment: +1 Good point of remarking $cis$. This concise form is used here hardly.
Answer: Hint: An alternative to
$
-1=-1+0\cdot i=\cos(-\pi)+i\sin(-\pi)\quad
$
one ungainly brute force
$$
(a+bi)^3= -1+0\cdot i
\Longleftrightarrow
a^3-3ab^2=-1 \mbox{ and } -b^3+3a^2b=0
$$
Answer: Looking as an extension of fields, $x^3+1=0$ has exactly 3 unique solutions.  $(x-\alpha)(x-\beta)(x+1)=x^3+1=(x+1)(x^2-x+1)$   (-1 is apparent.)  You can solve for the other 2 by binomial or trig or whichever way you want.  but as far as the trig goes, $cos(\theta)+i*sin(\theta) = e^{i\theta}$, so $(r*cos(\theta)+i*r*sin(\theta))^k = r^ke^{ik\theta} =r^kcos(k\theta)+i*r^ksin(k\theta)$  So it is just a matter of setting $r^3cos(3\theta)+i*r^3sin(3\theta)=-1$ where r is a positive number.
Answer: Just to hop and skip around some of the theory hovering in the background of some of these answers...
O.K., firstly by the Fundamental Theorem of Algebra $r^3=-1$ has at most three (distinct) solutions. This means that if you can find three then you are done (this is why in the '$k$' solutions they only need $k=0,1,2$).
Obviously $-1$ is one solution. Now what we want to do is find another (complex) number that when cubed gives you $-1$. Now how do complex numbers multiply? What does it look like? Multiplication for complex numbers is better handled when we write in polar form
$$z=|z|(\cos \theta+i\sin\theta),$$
where $|z|$, the magnitude, is the distance from $z$ to the origin and $\theta$, the argument $\arg(z)$, is the\an angle between the positive $x$-axis and the ray connecting $z$ to the origin.
It turns out that when you multiply complex numbers together they stretch\contract and rotate... more precisely
$$|z_1\cdot z_2|=|z_1||z_2|\text{ and }\arg(z_1\cdot z_2)=\arg(z_1)+\arg(z_2).$$
You can show this by multiplying together
$$z_1\cdot z_2=\left(|z_1|(\cos \theta_1+i\sin\theta_1)\right)\cdot\left(|z_2|(\cos \theta_2+i\sin\theta_2)\right).$$
Now $|-1|=1$ so we want $|r^3|=|r|^3=1$ and because $|r|\geq0$ we need $|r|=1$.
Next $\arg(-1)=\pi$ and $\arg(r^3)=3\arg(r)$ so we want
$$\pi=3\arg(r)\Rightarrow \arg(r)=\pi/3,$$
and indeed by DeMoivre (AKA multiplying complex numbers by themselves)
$$(\cos(\pi/3)+i\sin(\pi/3))^3=\cos \pi+i\sin \pi=-1$$
as required.
Now that is two solutions. Finally by the Conjugate Root Theorem, as the coefficients of $r^3=-1$ are all real the conjugate of this solution is also a root.
So we have the solution set
$$\{-1,\cos(\pi/3)+i\sin(\pi/3),\cos(\pi/3)-i\sin(\pi/3)\}.$$

Don't know how to find all the roots


How do I make a glass with a thicker bottom than top?

Question: I am trying to make a cup with varying thickness. The top of the cup is much thinner than that of the bottom part of the cup. I have tried playing around with the Clamp but it doesn't get the bottom to raise up as high as I would like. How do I get an affect like this?
Comment: Try applying and using proportional editing with connected only enabled.
Comment: Would be faster model inner part manually, just a few extruded edge loops ...
Answer: You can for instance use a solidify modifier set to vertex group, then paint the weights in weight paint mode.
First add a vertex group and in edit mode make sure to remove every weight from your vertices.

Then add a solidify modifier to your mesh, set the factor to something > 0 so there is at least a bit of displacement with a weight 0.

Then go into vertex weight paint, with the ALT key pressed left-click on the bottom of your object, then drag your cursor up to the top and release the mouse button. You will see a gradient on your mesh :

Play with the solidify and the vertex group factor. Tweak a bit the mesh and use a negative thickness to get something approaching your image. Final result :


Background Focusing

Question: Besides setting the lense to Manual focus, can single point Auto focus be used to
focus 'beyond' a foreground of tree branches to infinity? Living in the mountains makes long distance focusing a challenge. Thanks! Canon t7i w/ 55m kit and 50-250mm tele. (amateur)
Answer: If we are talking about the phase-detection autofocus (the one you get through your viewfinder), then it is important to know that the actual AF-point is larger in area than the one you can see in your viewfinder. Therefore it would be best to look for a gap that is slightly bigger than your chosen AF-point.
With contrast-detetction autofocus (LiveView), a gap that is as wide as the AF-point should be enough.

Another possibility is to use lenses with a focus-limiter-switch - this feature is most often found on (higher-priced) tele-lenses, such as the 100mm f/2.8 L IS USM Macro, the 100-400mm f/4.5-5.6 L IS II USM, the 70-210mm f/4, etc.p.p.. Lenses with that feature have a dedicated switch that can limit the focus-range; e.g. from 1m-∞ to 5m-∞. That way, the AF will ignore objects in front. However, few of these limiters are designed to ignore mid-range obstacles; they are mainly intended to allow shooting through fences at short distance.
The picture below shows the AF-limiter settings on the 100mm f/2.8 L IS USM Macro - notice that it has three settings (Full, 0.5m-∞ & 0.3-0.5m) that are designed to differentiate between macro and non-macro distances. Some/most lenses just have two settings.

Image stolen from GearOpen's Canon 100mm f/2.8 L IS USM Macro review
Comment: Does the autofocus software take the limiter into account as far as differentiating near and far contrast points in software or does it simply act as a mechanical stop, keeping the focus from getting too near - but still allowing a near object to potentially "trick" the autofocus?
Comment: @Corey **that's a good question!** I don't have the knowledge to give a detailed insight into the technology, but my (somewhat limited) experience is that the omitted range will not be cycled through at all; it's like your lens has a new minimum focussing distance (MFD). So just as with the real MFD, if the AF-point is out of the focus-range, the camera will cycle through the whole (usable) focus range - or simply stop autofocussing, depending on your `C.Fn`s. All I can find in the lenses' manuals is `By setting a suitable focusing distance range, the actual autofocusing time will be shorter.`
Answer: Yes, as long as the point is small enough that you have a clear view to a high-contrast pattern in the distance.

Background Focusing


If current takes the path of least resistance, why do parallel circuits work?

Question: Why doesn't all the current flow down the path with the weaker resistance instead of dividing and going through both resistors (in a parallel setup with 2 unequal resistors)?
Comment: If ALL of the current went through one path, then the voltage drop across the larger resistor would be 0 (there's no current flowing through it). But this is a contradiction since 2 resistors in parallel are connected on each end by a wire (which ideally has 0 resistance), so the ends must be at the same voltage. Thus, the voltage drop across the larger resistor must the be the same as that across the smaller one.
Comment: Possible duplicate of [How do electrons know which path to take in a circuit?](http://physics.stackexchange.com/q/33621/)
Comment: You are taking it too literally. It is like water in parallel pipes. The larger pipe has less resistance to water flow. But not all the water goes through the larger pipe. The path of least resistance is for situations like touching a high voltage circuit - you'll get a shock if you provide a low resistance path to ground. It is not a technically precise description of the behavior though. You might use Ohm's law for that.
Comment: In practice there can be complications due to temperature effects. Power transistors sometimes consist of a number of parallel individual transistors. If there is current flowing through them they will heat up and their resistance goes down. Since they are not precisely equal some will get a lower resistance and conduct a larger current heating them up even more and lowering their resistance accordingly leading to a burnout. So measures are always taken to prevent this from happening.
Comment: A signal does NOT follow the path of least resistance.

That statement implies there are multiple possible paths.

The signal, at each instance of time, 'sees' ONE circuit which can depend upon whether the signal is constant (DC) or alternating (AC).
Answer: "Current takes the path of least resistance" is just a phrase people say but it's not totally accurate. When one path through the circuit has 0 resistance (a short), it is true that current follows that path only. It isn't true when you have multiple paths, with nonzero resistance, though. A better way of saying it would be "current flows through all paths in an amount inversely proportional to their resistance." This is basically just a fancy way of stating ohm's law.


What do you call the document containing all of the details of a military mission?

Question: What do you call the document containing all of the details of a military mission? I know the "mission briefing" expose the details of the mission, but what do you call the document and not the event where the details of the mission is being put forth?
Answer: It is called an operations order.  It is abbreviated as OPORD.  It has five paragraphs:
"S" Situation, "M" Mission, "E" Execution, "A" Administration/Logistics, "C" Command/Signal
Interestingly, in the context of preparing for war, it is called a war plan, as Jason Bassford has said.  Operations orders do vary by country, but there are several which follow the U.S. model very closely.
The manual that deals with OPORDs in detail is FM 5-0: The Operations Process.
Answer: From Wikipedia, there is military operation plan:

A military operation plan (also called a war plan before World War II) is a formal plan for military armed forces, their military organizations and units to conduct operations, as drawn up by commanders within the combat operations process in achieving objectives before or during a conflict. Military plans are generally produced in accordance with the military doctrine of the troops involved.

I suspect, however, that different countries and different branches of the military will have different specific terminology.


Any way to see all moderator nominations?

Question: The current 2015 Moderator Election page just shows 4 candidates ran for moderator; however, I know there were seven nominations. Is there any way to see withdrawn nominations?
Answer: Although this does not seem to be available on the election site, it can be found with the Data Explorer. Since a PostTypeId of 6 means ModeratorNomination, the users that entered nominations for moderator election can be found with this query.
SELECT OwnerUserId AS [User Link],
       CONCAT('https://blender.stackexchange.com/posts/', Id, '/revisions') AS 'Post Link'
FROM Posts
WHERE PostTypeId=6 --PostTypeId of 6 is ModeratorNomination
  AND YEAR(CreationDate) = 2015

Thus, the following users made nominations:

X-27
zeffii
David
iKlsR
gandalf3
VRM
ideasman42

(The links for X-27, zeffii, and ideasman42 are to post revisions because there does not appear to be a way to link directly to withdrawn nominations. There were also Comments on 2015 Moderator Election Nominations.)
Comment: Awwww, that was a fun nomination XD


What will happen if I just stretch a spring and release it?

Question: What will happen if I stretch a spring and release it. There is no mass in the spring and there is no mass attatched to the spring. Will it stop when it aquires its natural length or will it continue to move? If it stops at the natural length, how will its energy will remain conserved?
Any help will be appreciated.
Thanks
Comment: A massless spring is _unphysical_. That is to say, the laws of kinematics will give you meaningless answers if you try to analyze it.  Depending on what you _really_ want to know (since you will never use an actual massless spring in real life), you might find the concept of _[limits](https://en.wikipedia.org/wiki/Limit_(mathematics))_ to be useful.  I.e., instead of asking about a massless system, you ask, how does the behavior of a massive system change as the mass shrinks, _approaching_ zero?
Answer: You can't really say it's got no mass without leading to some pretty absurd conclusions. Suppose the spring's free length is $L_0$, its spring constant is $k$ and uniform mass $m$ (which we shall tend to zero eventually). Suppose the spring is fixed to a wall in one of its ends, for simplicity, and assume that it compresses and extends uniformly to a length $L$.
The elastic potential energy can be just written down without much thought:
$$U=\frac{1}{2}k(L-L_0)^2$$
The kinetic energy is a bit more complicated. Let $v(x)$ be the velocity of the spring along its length as a function of the distance $x$ from the wall. Then the kinetic energy would be
$$K=\frac{1}{2}\int\limits_0^L\frac{m}{L}v(x)^2\,dx$$
If we suppose the uniform compression, we can say that the velocity is proportional to the current position along the spring
$$v(x)=\frac{x}{L}\dot L$$
Where $\dot L=\frac{dL}{dt}$. As such, we compute this integral and get
$$K=\frac{1}{6}m\dot L ^2$$
Looking at these expressions, this system behaves like a Simple Harmonic Oscillator (SHO) with mass $m/3$ and spring constant $k$. It should oscillate about $L_0$ with period
$$T=2\pi\sqrt\frac{m}{3k}$$
Which goes to 0 as $m\rightarrow0$. We then have oscillations of finite amplitude with zero period. The spring would oscillate like crazy at arbitrarily high speeds, which is clearly unphysical.
So, you can't neglect the mass of the spring when it is the only mass of the entire system.
Answer: While it is true that there isn't any mass attached to the spring, a real spring has mass itself, so after contracting to the natural length, the mass of the spring carries momentum. Thus, it will continue to move, resulting in the well-known oscillations, until the energy is completely dissipated by internal friction.
Edit: I am not sure if the model "massless spring without attached mass" does make any sense. There is no mass in the system that any force could act on.
Comment: A "massless spring without attached mass" makes good sense if you are doing statics, not dynamics. It also makes sense if there is also a (massless) damping element in the dynamic model, but the equation of motion is then first order not second order.
Comment: I agree, but in a sense, by looking at the static case (i.e. stretching it, but not releasing it) you do attach a mass to it. Same for the massless damping element.


Monotone convergence theorem for stochastic integrals

Question: I was wondering if there exists an equivalent of a monotone convergence theorem for stochastic integrals. I looked into plenty of books and papers, but I haven't found anything useful. I would expect something like that:
Assume that $L(t)$ is  Levy process and $X_n(t)$ a sequence of stochastic processes such that $\lim_{n \to \infty}X_n(t)=X(t)$ in a monotonous way (limit defined in some sense, for example in distribution). Then $\lim_{n \to \infty} \int_{-\infty}^t X_n(s-)dL_s=\int_{-\infty}^t X(s-)dL_s$.
Is it true? If it is, do you have any hints how to prove it and/or where I could find a proof?
Comment: How do you define $\int\dots dL_s$?
Comment: In a "convenient way". So can be Ito integral, can be Stratonovich integral. I'd be happy to find a result for any of these definitions.
Comment: And what do you need these results for? Anyway, the chances are minimal to get something making use of monotonicity and not included in existing general results. Maybe only when $L$ is a subordinator: the integral is defined pathwise in Lebesgue-Stieltjes sense, so you can use deterministic monotone convergence theorem.
Comment: I'm actually still trying to solve the question I asked before: http://mathoverflow.net/questions/259991/limit-of-a-stochastic-integral. Could you please explain the subordinator case?
Answer: Firstly, to give the formal definition of integral wrt Lévy process is necessary for prove the "MCT"(monotone convergence theorem).
Secondary, for the most definitions of stochastic integrals(in path, $L^1$, $L^2$ or locally etc.), the MCT could be deduced by DCT(dominated convergence theorem), if the $X_1$ and $X=\lim\limits_{n\to\infty}X_n$ are supposed integrable. Since
$$ \sup_{n,m\ge 1}|X_n-X_m|\le 2\max(|X_1|,|X|).$$
Answer: To add to the answer by JGWang: The MCT is useful beyond the DCT only when we do not know that the limit is integrable. But in this context, the MCT depends crucially on some form of nonnegativity so that we can define the putative integral of the limit. We will not have this for stochastic integrals.


How to change the Entry status to enabled from Disabled

Question: I have created a page where user creates an entry but its status is disabled. This page then redirects to a page where the user gets to see a preview of his entry. On this preview page there are two publish button when clicked the status of the entry has to be enabled. The code I have used is:
<form method="post" accept-charset="UTF-8">
    {{ getCsrfInput() }}
    <input type="hidden" name="action" value="entries/saveEntry">
    <input type="hidden" name="redirect" value="/user/thanks/{{slug}}">
    <input type="hidden" name="sectionId" value="4">
    <input type="hidden" name="entryId" value="{{entry.id}}">
    <input type="hidden" name="enabled" value="1">
    <button type="submit" class="btn-save">Publish</button>
</form>

But after submitting the form it reloads the same page. I checked the craft.log, it has the following errors:
2017/06/08 13:17:53 [warning] [application] Craft\ContentModel->dailyPlan failed validation: Daily Plans cannot be blank. ( a matrix field )
2017/06/08 13:17:53 [warning] [application] Craft\ContentModel->banner failed validation: Banner cannot be blank. ( an asset field )
2017/06/08 13:17:53 [warning] [application] Craft\ContentModel->Included failed validation: Included cannot be blank. ( a table field )
2017/06/08 13:17:53 [warning] [application] Craft\ContentModel->Excluded failed validation: Excluded cannot be blank. ( a table field )

Can't I change the status of entry simply with the above form? Do I have to load all the required fields with its value? Well I don't want to do that as it would take lot of extra lines of code and also the execution time will be longer, as there are two publish button on the page.
Answer: I think so, if they are required fields. You'd just add them as hidden fields and there wouldn't be any additional database queries because it's already fetched the entry anyway.


Tall red piece with coffee cup, phone and gas picture?

Question: I have a few of these taller red pieces with logos of gas, phone, and a coffee cup on them. I've been searching online for days and cannot find a gas station, store, or anything with these pieces in it. Can you help me identify the set this came in?
Answer: This brick comes from set 6393: Big Rig Truck Stop from 1987.

The official BrickLink name of this brick is 3755pb01 Brick 1 x 3 x 5 with Cup, Phone, and Water Tap Pattern
Comment: Nope, these are printed parts. There is a sticker sheet for this set, but it only contains the striping for the window panes (simulating blinds).
Comment: Were these pre-printed parts?  The pictures look like it is done with a sticker.