Three Gorges Dam or The Three Gorges Dam?

Question: Some links mention "Three Gorges Dam" with article "the" while other links simply don't. When should the article be added, if at all? Thank you !
Comment: Nothing to do with the question, but I chuckled when reading _"the largest dam structure in the world."_ in the Britannica-article (second link) :)
Answer: It depends on usage, and it is difficult to list all the possible situations.
In the two links you gave, the first one is in a sentence ("The X is a Y ..."), but the second one is not ("X, x on the Y River in Z province, China").
The second has no verb. Encyclopedia entries sometimes just list the subject of the article at the first, without a verb since all they're doing is giving a title and perhaps a little extra definition.
The first has a verb, and is in fact a complete sentence. It would be correct either with the article or without. It is more natural to put the article there, but I don't think it's a mistake either way.
Comment: Thank you all so very much for your detailed explanations !
Answer: It depends on whether the article ("the") is part of the official name, and usually it is not, such as in this case of the (not "The") Three Gorges Dam. This can be confusing since some names are almost always used with an article, which must be capitalized at the start of a sentence.
The main exception is for book or movie titles, where it is so common that there is a special convention to move leading articles to the end for sorting purposes. For instance, "The Cat in the Hat" gets sorted as "Cat in the Hat, The".
There are also a few weird cases such as The New York Times, which technically should be referred to as the The New York Times, but almost nobody actually does that because it sounds weird.
Comment: Not every proper noun with "The" is an "official name", what is an "offical name" anyway  The offical name of the dam is 三峡大坝 if it is anything.  Where is this offical list of names?
Comment: Your New York Times example is not "weird" in the UK, where the title of almost every broadsheet newspaper (except for the Financial Times) starts with "The". The Times, The Daily Telegraph, The Guardian, The Independent, The Observer, etc. (Of course we don't duplicate the "The" when referring to "the ").
Comment: @alephzero That's probably where The NYT got it from. But outside print media, examples are rare, so it's still snowing oddity overall.


Generate Pinterest Share Button That Specifies URL

Question: I am trying to create a "pinterest share" button, but am running into a snag.
Currently, I have the pinterest button (generated from their Widget Builder) appearing in a Lightbox. (For certain reasons, it must appear this way.)
The issue is the Lightbox code has direct linking on it, so the code for the lightbox window is something like: www.domain.com/#/social/4
Pinterest is picking up that URL (which has no images since it's just the lightbox) instead of the URL for the main page (www.domain.com).
Does anyone know how I can specify the exact URL to share via the pinterest button?
I have read some posts that said doing this would work:

However, specifying the URL does not seem to work at all. It appears to be totally ignored and has no impact.
Any ideas?
Thanks in advance!
Answer: You can use a standard link and specify all the data in the parameters:

Source: http://developers.pinterest.com/pin_it/
Answer: You can try using structured meta data and Rich Pins.


Install autoconf 2.69 on Ubuntu 12.04

Question: The default version of autoconf in 12.04 is version 2.8. How can I upgrade to autoconf 2.9?
Answer: It looks like the ppa:costamagnagianfranco PPA is no longer active or at least didn't work for me.
Instead there is a PPA available for a lot of GNU libraries at https://launchpad.net/~dns/+archive/ubuntu/gnu
For example this allowed me to install Autoconf 2.69 on Travis:
before_script:
  - sudo add-apt-repository ppa:dns/gnu -y
  - sudo apt-get update -q
  - sudo apt-get install --only-upgrade autoconf

Answer: Use a PPA: ppa:costamagnagianfranco/autoconf
For information on how to PPAs see: What are PPAs and how do I use them?

Install autoconf 2.69 on Ubuntu 12.04


Apache installation on ubuntu 11.10

Question: Install apache by apt-get or need to compile it from source will it make any difference in Security ?
Answer: I think there is no difference when it comes to security unless you have a patch to apply (made by you or taken from someone else).
For better security, you can do other things like:

Prevent directory listings.
Running apache as non-root user.
Assign the correct permissions for your folders/files.
And others...

Of course, your requirements can greatly change what you can/should do.
EDIT:
There is one more point to add: In the case of installing a package from source, you can apply a patch to fix any bug as soon as it is discovered by the developers. However, you can't do it when installing a debian package (using apt-get) until the ubuntu guys release an update for it and this usually takes longer time.
Comment: I find it easier to maintain and apply security fix if installed by apt-get as you can rely on the distribution security team.

Apache installation on ubuntu 11.10


Master theorm and epsilon value

Question: I have been reading CLRS and came across a few examples of the Master theorem. I could not follow the reason that epsilon was chosen as 0.8 in the example from page 96 .  Can I simply use the condition n^log(b) of a to determine the maximum value of epsilon? For example for case 3 where ()=Ω(log+) for some constant >0. T(n) =12T(n/2)+n^2. here the answer is n^ 3.58 so I am assuming it is n^3 and therefore Case 3 which means ()=Ω(log+) : How do i choose a value for epsilon that will be the maximum allowed to make .My effort 3.58+ <1 seems nonsense.   Which  is correct to this case, or does the Master theorem not apply. Can this method be also be applied to the other cases. case 1 has an epsilon,  but case 2 does not. when epsilon is an integer it is staright forward, but not so obvious( to me ) when it is a decimal. help would be apprecaited
Comment: Please [edit] the question to make it self-contained, so we can understand the relevant context and can understand what you're asking even if we don't have a copy of page 96 from CLRS in front of us.  I am not sure what you mean by "maximum value of epsilon".
Answer: $\epsilon$ is simply a value bigger than $0$, there is no maximum possible value for it. If you can find any $\epsilon>0$ which makes either of the cases 1 or 3 of the master theorem true, then you have found the complexity for the algorithm (though additional checks might be needed for case 3 but it's not related to the question).
Considering the example you've provided in the question, $T(n)=12T(\frac{n}{2})+n^2$, we have $a=12, b=2,f(n)=n^2$. Checking the first case of the master theorem, we have $$f(n)=n^2\in \mathcal{O}(n^{log_{2}12-\epsilon})$$
which is true for let's say $\epsilon=\frac{1}{2}$ (since $n^2 < n^{log_211.5}$).
You can choose many other $\epsilon$'s that still satisfy the condition, but all you need to do is find one and you're good to go.
Comment: Is there any "efficient" way of finding an epsilon value that works?

Master theorm and epsilon value


What does the expression "孤男寡女" mean?

Question: What does the expression "孤男寡女" (gū nán guǎ nǚ) mean, exactly? Does it have inherently negative connotations?
As an aside, why does Google translate it as "Needing"?
Comment: 孤: 1. a child whose father had died or his parents had died. 2. an alone person. 寡: a women whose husband had died. 孤男寡女 means **a single man and a widow woman**.
Answer: Frankie's answer is good, but I want to make a clarification on 孤 and 寡. Both of them mean "only one" here, and I don't think "single" is good in this situation since it could mean "unmarried".
example:
you and a female friend of yours are taking in a  club, in a room with the door closed,(of course, I don't recommend this :-)  ), unfortunately, your wife finds you here, so she would high suspect that you have affairs with your friend.You try to explain, but she retorts,

你们孤男寡女,共处(chŭ, to stay in )一室,你还有什么好说的?
one man, one woman, and one room, how could you explain?(I won't believe!)
Answer: The phrase, in direct translation, means single guy & single lady. More often than not, it is being used to implying that when a single guy & single lady spending time together alone, bad things/gossips might just happened.
Answer: It describes a man and a woman being together (usually in some manner of seclusion). Depending on the marital status of the man and the woman, it can be seen either as a good/normal (a couple dating) or bad thing (a brewing affair). There is no inherent negative connotation unless it is used in certain context.
Google is just confused. It has problems with 寡女 (somehow it was "trained" into translating that into pinyin equivalents guanv1) but not with 孤男,寡,女.
Comment: Actually I think I know what happened. It's because of a [movie](http://zh.wikipedia.org/wiki/%E5%AD%A4%E7%94%B7%E5%AF%A1%E5%A5%B3_(%E9%9B%BB%E5%BD%B1%29) title "孤男寡女", which was translated to Needing (You) in English.
Answer: A literal translation is "lonely man,lonely woman." To translate it as "needy" is a bit of a stretch, but that's basically what a lonely man and woman (together) are.

What does the expression "孤男寡女" mean?


`docker rmi` tries to delete image with empty string (that does not exist)

Question: When I'm trying to delete any of my images, docker does that thing :
<code>$ docker rmi 5aeb37c1fd00
Error response from daemon: image ID '' is invalid
Error: failed to remove images: [5aeb37c1fd00]
</code>
as you can see, it is complaining about an image with empty string name that it cannot delete.
If it matters, my docker is installed on vagrant machine with Red Hat 64-bit OS.
That error came by from yesterday. 2-3 days ago everything worked perfectly.
more additional information:
<code>$ docker version
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 786b29d
OS/Arch (server): linux/amd64
</code>
Thanks.
Comment: Try forcing it. `docker rmi -f `
Comment: just close it. I just deleted all the local docker data storage (containers directory, etc.) and downloaded the images again.
Answer: I believe this is a bug in older docker versions. The error message is misleading.  I suggest you upgrade to the latest version of docker, the bug has been fixed.
Answer: just close it. I just deleted all the local docker data storage (containers directory, etc.) and downloaded the images again.


What is the difference between a navigation database and an airport mapping database?

Question: What is the difference between "navigation database" and "airport mapping database"? Are those both required by flight management software for flight planning?
Comment: Where are you seeing these terms?
Comment: Particularly the second term, since a navigation database would include airports and airport layout.
Answer: Navigation databases are typically targeted at FMS based systems, usually using the ARINC-424 standard.  These are ASCII database files that describe aspects such as approach procedures, flight plans, spacing, etc.  It would also provide basic runway information such as heading and altitude of touchdown points - enough to navigate but not enough to paint a completely pretty picture.
By contrast Airport Mapping Databases provide a detailed layout of the entire airport in question - runways, taxiways, vertical structures such as buildings, etc.  The industry standard is ARINC-816 for the databases themselves, but the content is based on DO-272's parameters.  They are usually installed into systems with displays, e.g. Electronic Flight Bags (EFBs) - this may include Class 2 EFBs that are simply iPads for ground-only operation.
Moving maps of this type provide situational awareness, especially when coupled with Cockpit Display of Traffic Information (CDTI) and its associated applications utilizing ADS-B/TIS-B: these provide awareness as to other aircraft that might be in the vicinity, threat level, etc.
Side note: additional CDTI applications that utilize ADS-B are enumerated in DO-317.  These include airborne procedures, e.g. decreased spacing for in-trail procedures (ITP).
Comment: @Terrance you have given a good answer and I upvoted it. i took out my comment as it was redundant.
Comment: Moving maps while taxiing are not unusual these days.
Comment: Moving maps while taxiing are quite normal today.
Comment: Makes me mad when the OP abandons their question.


Entering USA with ESTA whilst awaiting B1 visa

Question: I need to attend a conference in the USA for which I have a valid ESTA. However, I plan to go back to the USA soon after under a B1 visa (more than a 90 days stay) which I cannot get in time before going to the conference.
My question is: can I apply now for the B1 and enter the USA for the short conference trip with the ESTA or will the fact that I have a B1 application ongoing impact entering with an ESTA?
Answer: Presuming you are intending to apply for the B1 visa through a consulate visit, and that consulate visit is going to occur after you return from your trip to the US on ESTA/VWP, then there is no harm in doing what you are suggesting.  You have not "applied" for the visa until your consulate interview, so at the time you enter the US using your ESTA/VWP you will not have actually applied for a visa.  The fact you will have started that process is not relevant.
However there is a second issue you may want to consider.  In general, US consulates will not issue a B1/B2 visa to someone from a VWP-eligible country without a specific reason that you need to have a visa, rather than simply entering under the Visa Waiver Program.  In your case it appears to that your reason is that you want to stay in the US for more than 90 days, and whilst this is a valid reason for obtaining a B1 visa, it's also one that will likely result in a lot of scrutiny at your interview.  You should be prepared to justify why you need a B1 visa, and why you NEED to stay in the US for more than 90 days on a single trip for the purposes of "temporary business".
If you are unable to convince the consulate staff that you have a valid need to be issued a B1 visa then they will likely deny your request. At that point your existing ESTA will become invalid, and you will likely not be approved for a future one (on the grounds that you've had a visa application denial), so you will not be able to travel to the US at all, at least for some period of time.
Answer: Should be fine. The things to avoid are:

applying for multiple visas of the same kind (you can have e.g. B1 and J1 applications underway at the same time but not B1 and B1)
trying to get a US visa issued from within the states (just doesn't happen, a different procedure is needed)
re-entering on a non-immigrant visa (e.g. B1) shortly after leaving (they generally prefer you to be out for about twice as long as you stayed, e.g if you were there for a week, try to be out for a good two weeks before re-entering)
trying to do something you're not meant to do on that visa (e.g. going to study or train or work on a B1 visa, which doesn't permit these activities). Be very careful with this one.
overstaying

Immigration staff are pretty sensible, if a little serious, and slight mistakes are often forgiven if everything's legit. Take a book to read if you end up in secondary examination - the wait there can be long and no devices are allowed (and there are often no clocks), but they'll work things out fine more often than not. Enjoy your trips!
One final thing - when you apply for the B1 visa - at many consulates (including in VWP countries) you can actually take your passport home with you, and they'll email you when they're ready to issue the visa, which can often be done by posting them your passport. Give it about 2-3 weeks for them to issue and mail back. This might be useful if you apply for the B1 before doing the ESTA trip. But as always it's good to start things as soon as possible, I often get my visa appointments 6+ months before the travel!


Drop Tables with Bigger size

Question: We have a mysql database with a size of 2 TB, in which we have for to five big tables ranging from 110GB to 350GB. When we try to drop these tables the mysql goes to the defunct mode and hangs in that state for a long time. Is there a solution to drop these tables without mysql hanging. We have a machine which has a memory of 122GB and swap of 60 GB. We use an InnoDB Engine Hope the information suffices kindly help us with this issue
Comment: try to truncate first
Comment: Even that tries to go to defunct mode , we have tried to truncate.
Comment: Just curious: What version of MySQL ?
Comment: We Mysql 5.6.13
Answer: This is an old verified bug in MySQL for InnoDB on larger tables.
As this has been patched quite some time ago, perhaps it's not the same situation, but it sure seems similar.
The workarounds for the older versions are:

Defragment in the filesystem. When you extend many tables the chunks for each end up very fragmented, so the defragmenting can be of benefit for table scans as well as dropping speed. If you don't have a defragmenting program, copying the files somewhere and copying them back will do the job.
When dropping, create a filesystem link to the IBD file. Drop the table in MySQL and the OS won't drop the file in the filesystem because the link exists, so the drop will be fast within MySQL. Remove the link and the OS will finish the deleting work in the background.

If that doesnt work... The answer in this question will allow you to delete ABOUT half of your data.
The idea being that you can remove enough data to stop InnoDB from hanging when you drop the table.
Answer: Use pt-archiver to delete all the rows from the table first, in batches. This will take much more time but it will not block other operations. Once the tables have no rows (they are empty) and the rows have been purged, you can delete the tables, which should only take a microseconds lock.
What you are suffering is a full buffer pool global lock. You can prevent it by updating to a newer version of the server, where that problem has more or less been solved, using Percona Server with the lazy drop table feature, using the global tablespace for those big tables in particular, or using multiple buffer pool partitions, so you will only suffer from blocking on one of them.
Answer: You may need to try something a little unorthodox.
Let's say you have the following scenario:

Database is mydb
table is mygianttable
datadir is /var/lib/mysql
the physical file is /var/lib/mysql/mydb/mygianttable.ibd
You want to drop mydb.mygianttable

I found PalominoDB's How to recreate an InnoDB table after the tablespace has been removed. Based on the paradigm in that post, I would suggest doing a manual truncation by running the following:
MYSQL_USER=root
MYSQL_PASS=rootpassword
MYSQL_CONN="-u${MYSQL_USER} -p${MYSQL_PASS}"
SQL="CREATE TABLE mygiantcopy LIKE mygianttable"
mysql ${MYSQL_CONN} -Dmydb -ANe"${SQL}"
rm -f /var/lib/mysql/mydb/mygianttable.ibd
SQL="ALTER TABLE mygianttable DISCARD TABLESPACE;"
SQL="${SQL} DROP TABLE mygianttable;"
SQL="${SQL} ALTER TABLE mygiantcopy RENAME mygianttable;"
mysql ${MYSQL_CONN} -Dmydb -ANe"${SQL}"

Give it a Try !!!

Drop Tables with Bigger size


Is it possible to de-gloss paint?

Question: I have some satin black enamel paint, after applying it I found it to be too glossy. I know you can make paint more glossy, for example by adding varnish to it, but is there a way to make it less glossy?
Answer: You can coat it with a satin clear finish. or even a matte finish. Both are available at most paint stores and big box stores.
Comment: The matte on top of gloss will *de-gloss* it (as will satin). It might not be truly matte, but it should be significantly less shiny. I would wait a few days after the gloss is applied to ensure that it is fully dried. Also, on average, matte finishes are often less durable than other finishes, so if you can live with satin, that might give you better long term results.
Comment: But does a matte clear finish give glossy paint a matte look? Or will it simply not _add_ a glossy finish on top of it? I think I'll try it and see.
Answer: I had that same problem (oil based paint too glossy). 000 steel wool worked, sanding worked, tsp had no effect, vinegar had no effect.
 I mixed some talc (baby powder)  with my oil based high gloss paint and was able to get the flat appearance I wanted.  I found that it took a ratio of about 6 parts paint to 1 part talc to get the desired result
Answer: Use steel wool or plastic abrasive pads on it (after it's dried.)
There are also "paint flattening agents" if you are looking for a chemical/additive fix for another coat.
Comment: Wouldn't this leave a 'scratched' finish? I want it to be smooth but not glossy.
Comment: If you use fine abrasives (0000 steel wool, white or gray "Scotchbrite", etc.) the "scratches" will be so fine they are not perceptible as "scratches."
Answer: The 2 answers you have amount to (i) roughen it, and (ii) satin/matte varnish it.
I suggest doing both.  When you're applying one finish on top of another, neither of which is primer/undercoat, you need a good key -- hence roughening the surface.  You don't want to create visible scratches though. At some point you want to leave it in a warm place for a couple of days to make sure it's completely dry. Then wipe over with methylated spirits to remove dust/grease. Then you can apply your top coat.  Be sure to use a product with the same base as the paint you've just put on -- a water-based finish like acrylic varnish won't stick well to fresh oil paint.
You could of course -- if you're buying something anyway -- get a satin paint for a last coat.
Answer: For the best possible results, just go buy the same paint in a less glossy firm and repaint the wall. All the other solutions will take as much time and still might not give the results you want. Save time and effort and just repaint.
Comment: Problem is, I couldn't find a less glossy paint. They did sell chalkboard paint, but I'm not sure if that's a good option.
Answer: TSP has been used by painters for many years to "de-gloss" paint.
I have used it to both flatten a painted rooms glossy look, as well as to provide a surface that a new top coat can adhere to.
Gloss enamel needs to be cut (a surface tooth) established for new paint to adhere.  If you do not provide a tooth for new paint it can peel off of glossy enamel (a lesson learned for me long ago).
Answer: Add a small amount of talc (try 2 TBSP per gallon). Try painting it on a small piece of wood to see how it looks. Add more or less depending on the results.
Answer: Buy some zinc and add to your gloss finish enamel paint and mix it
In this way you can make in matt enamel
Comment: Metallic zinc, zinc oxide, ... ?
Answer: Old trick given to me by old coach painter was add talc to the oil paint
Soaks up the oil in the paint dulling it.
Be careful with what Making It Matt suggested. Don't add to much or it goes gritty rough.
Answer: Rub glossy paint on dry wall with hand sanitizer (Walmart Equate brand) on a paper towel.  It will remove the gloss, super fast, super simple.  No sanding, no matte clear coat.  Just wipe.
Comment: Hand sanitizer is mostly alcohol, and alcohol dissolves latex paint, so I can see where this would remove some of the surface finish.  Does this work with enamel paint (as in the question)?
Answer: For liquid paint that you want to dry with less gloss, add diatomaceous earth. Available as swimming pool filter supplies. Talc might work but I believe diatomaceous earth is used by paint manufacturers. You would need to experiment to find how much to get the affect you want.
Answer: Hand sanitizer seems to remove somesurface paint but did not remove gloss completely.
Comment: It's probably the alcohol, but I'd be worried about getting even results (i.e. not splotchy). Any suggestions on how to keep the results uniform?
Answer: I used Soft Scrub, a very mild abrasive cleaner with small grit particles. Put a small amount on a clean white rag and abrade the glossy finish to your satisfaction.
Answer: If you have the time its best with the proper grade of sandpaper/steelwool, to sand between coats or alternating coats. Experimentation is a great learning tool. At a mere cost of your time and some money.
Answer: Just wipe it with vinegar. There will be no more gloss. Try in an inconspicuous spot first to see if you like the result before going any further.
Comment: Tried this, it did nothing.
Comment: If a painted surface can be modified just with vinegar, its not very good paint.  Might affect some types of lacquer or shellac.

Is it possible to de-gloss paint?


When we should edit the title of a question?

Question: I think that a title like this: Is this reaction to produce ammonium sulfide safe? is not good because do not contain any information regarding the reaction, so I would like to edit it in something like this :"Is safe to produce Ammonia Sulfide mixing ammonia and head matches?" I think that good title can be useful for the visibility of the site in Search engine indexing and so for the site health. Should we edit titles more often?
Comment: Yes, you should always edit to improve if possible :)
Answer: Yes, you should absolutely edit titles to be as descriptive as possible.  Make sure to check the body of the post as well to see if it needs any fine tuning.
Answer: In general I would try to edit as few as possible to try to keep the information as provided by the OP.
The question you are referring to has a title that says nothing at all. That might also cost some attention for the question itself. In this case I would suggest the edit, to make it more interesting to all of us. It is also quite good to have meaningful titles if we would like to refer to it in other posts.
As the OP will be notified s/he could roll back any time.


Are html styles valid inside Docbook and TEI documents?

Question: Im working on a webapplication where you can make docbook and TEI documents and I know that docbook and TEI has its own tags for bold, italic ect. text but I would like to use some wysiwyg editor to make those text styles.
Currently Im using NicEdit which is fine but I dont know if its valid for docbook and TEI to contain html code like <b> text </b> or < font color="red"> text </font> inside its nodes which is made by NiceEdit
Since I could not find the answer could you tell me wether its valid to do this way or my idea is wrong?
Comment: [what have you tried?](http://whathaveyoutried.com)
Comment: by the way I was clearly asking for advice not the solution in code format ...
Answer: Your idea is wrong.
DocBook is logical markup.  Presentation matters are defined in stylesheets.


KNN Regression: Distance function and/or vector representation for datetime features

Question: Context: Trying to forecast some sort of consumption value (e.g. water) using datetime features and exogenous variables (like temperature).
Take some datetime features like week days (mon=1, tue=2, ..., sun=7) and months (jan=1, ..., dec=12).
A naive KNN regressor will judge that the distance between Sunday and Monday is 6, between December and January is 11, though it is in fact 1 in both cases.
Domains
hours = np.arange(1, 25)
days = np.arange(1, 8)
months = np.arange(1, 13)

days
>>> array([1, 2, 3, 4, 5, 6, 7])
type(days)
>>> numpy.ndarray

Function
A custom distance function is possible:
def distance(x, y, domain):
   direct = abs(x - y)
   round_trip = domain - direct
   return min(direct, round_trip)

Resulting in:
# weeks
distance(x=1, y=7, domain=7)
>>> 1
distance(x=4, y=2, domain=7)
>>> 2

# months
distance(x=1, y=11, domain=12)
>>> 2
distance(x=1, y=3, domain=12)
>>> 2

However, custom distance functions with Sci-Kit's KNeighborsRegressor make it slow, and I don't want to use it on other features, per se.
Coordinates
An alternative I was thinking of is using a tuple to represent coordinates in vector space, much like we represent the hours of the day on a round clock.
def to_coordinates(domain):
    """ Projects a linear range on the unit circle,
        by dividing the circumference (c) by the domain size,
        thus giving every point equal spacing.
    """
    # circumference
    c = np.pi * 2

    # equal spacing
    a = c / max(domain)

    # array of x and y
    return np.sin(a*domain), np.cos(a*domain)

Resulting in:
x, y = to_coordinates(days)

# figure
plt.figure(figsize=(8, 8), dpi=80)

# draw unit circle
t = np.linspace(0, np.pi*2, 100)
plt.plot(np.cos(t), np.sin(t), linewidth=1)

# add coordinates
plt.scatter(x, y);

Clearly, this gets me the symmetry I am looking for when computing the distance.
Question
Now what I cannot figure out is: What data type can I use to represent these vectors best, so that the knn regressor automatically calculates the distance? Perhaps an array of tuples; a 2d numpy array?
Attempt
It becomes problematic as soon as I try to mix coordinates with other variables. Currently, the most intuitive attempt raises an exception:
data = df.values

Where df is:

The target variable, for simple demonstration purposes, is the categorical domain variable days.
TypeError                                 Traceback (most recent call last)
TypeError: only size-1 arrays can be converted to Python scalars

The above exception was the direct cause of the following exception:

ValueError                                Traceback (most recent call last)
<ipython-input-112-a34d184ab644> in <module>
      1 neigh = KNeighborsClassifier(n_neighbors=3)
----> 2 neigh.fit(data, days)

ValueError: setting an array element with a sequence.

I just want the algorithm to be able to process a new observation (a coordinate representing the day of the week and temperature) and find the closest matches. I am aware the coordinate is, of course, a direct representation of the target variable, and thus leaks the answer, but it's about enabling the math of the algorithm.
Thank you in advance.
Comment: An alternative - it looks like there's a 'precomputed' option for distance, which will let you use the distance you "really" (?) want, and should not be slow, since there's no computation to be done.  btw, I like your idea of converting to 2d (the unit circle), 2d numpy array would be the way to go here I think.   There could be issues if you have *both* days and months, since the distance may not "know" to separate them - depends on the details of your setup.
Comment: Yes, the `days_x` `and `days_y`into separate columns is the way to go if you take the unit circle approach.  On feature importance - my intuition is that re-weighting features as you said will do what you want if by "feature importance", you mean "how much each feature matters for determining distance".
Comment: In response to the attempt section, for this code `neigh.fit(data, days)` what are the shapes of `data` and `days`?  Am I understanding that you're predicting temperature from datetime?
Comment: Thank you, @bogovicj , for pointing that out. I have edited the post to clarify.

Naively, I'd simply pass two columns for the algorithm to `.fit()`:
`day of week (int)` and `temperature (float)`.

However, this gets me in trouble due to the mentioned lack of symmetry (it will compute Monday-Sunday=6).

Instead, I try using coordinates.
This gets me the desired symmetry but results in columns with nested arrays:
`coordinates (list of tuples/numpy array of numpy arrays)` and `temperature (float)`.

The last part is my hurdle.
Comment: Could it be that the answer is dead simple, and that is just to split the  `days_coordinates (x, y)` into separate columns `days_x` and `days_y`? Thereafter, If I want one feature to be more important than the other I can standardize all features first, and then multiply them by custom weights?
Answer: I like your idea of converting to 2d (the unit circle), 2d numpy array would be the way to go here Specifically, try puting the days_x and days_y into separate columns if you take the unit circle approach.
An alternative idea - it looks like there's a 'precomputed' option for distance, which will let you use the distance you "really" want, and should not be slow, since there's no computation to be done.


Hardware architecture for snaps

Question: I just published my first snap (mathjump) The package is build on an x86 system. Is there any way to upload different revisions under the same package name for other architectures. I'm assuming my x86 snap will not work properly on other architectures but maybe I'm wrong.
Answer: Yes, you can upload packages for any of the architectures supported by the store (amd64, i386, armhf, arm64, even ppc64el and s390x if you want). The only requirement is that you must be able to actually build the snaps for those architectures (unless your snap is all shell script or similarly non-arch-specific). You can do that in a few different ways:

Build your snaps on a device (or emulated device with) the desired architecture. This really the only way if your snap is closed source and you want complete control of its build process.
Build your snap on the (freely available) Launchpad snap builders: submit the project containing your snapcraft.yaml to Launchpad and select which architectures you want to support, and it'll build (and even upload to the store) your snaps for you. You can read more about that here.

Either solution results in a snap you can submit to the store alongside the other revisions you already have uploaded that target other architectures. It'll get its own revision number, etc.
Answer: In the

snapcraft.yaml

file you can add the line architectures: [all]
description: |
This is the description.

architectures: [all]

apps: ...

Your snap now will be created with the word all in the end.

snapName_version_all.snap

This indicate that the snap itself can be installed on all the architectures. (Not sure about working).

Hardware architecture for snaps


Simulate touchpad or gestures on iMac

Question: I recently started using a MacBook Air and find some of the gestures such as the double click zoom in Safari extremely useful, I'm aware I can zoom normally using cmd - (+) but find the gesture zoom much better. Can I simulate the touchpad or another way to do this on my iMac.
Comment: What exactly do you mean by "simulate the touchpad"?
Comment: Use the same gestures on my laptop touchpad with my desktop mouse. I imagine OS X has limited this to the touchpad only as I can't see any system preferences that allow you to use the gestures such as the double click zoom or triple click for definitions etc. without a trackpad. If you could emulate (maybe a better word to describe it) the trackpad to use those gestures or an alternative way.
Comment: What is your mouse? That's really the key ingredient.
Comment: [Logitech G700](http://www.logitech.com/en-us/gaming/mice-keyboard-combos/devices/7244) paired up with [SteerMouse](http://plentycom.jp/en/steermouse/)
Answer: You can use a Magic Trackpad with your iMac - that will let you perform all the same gestures as you use on your MacBook Air.
There are even neat accessories to make it one unit with your Apple Wireless Keyboard. The ones I know about are the Twelve South "Magic Wand" and the Henge "Clique".
Comment: My current mouse has extra buttons that I use for expose and show desktop etc so I'm quite happy with that. I can see it being a bit counter productive having to take my hand off the keyboard to use the Magic Trackpad but I could be wrong.
Comment: There's nothing to say you can't continue to use the mouse, I do. The Wireless + Trackpad unit is still only as wide as the conventional keyboard with number pad.
Answer: BetterTouchTool does exactly what I was after, you can set keyboard and mouse shortcuts to emulate gestures and a bunch of other stuff. You will also need SteerMouse if you want to map the buttons on your mouse to keystrokes then assign them inside BetterTouchTool to gestures etc.
After some testing it's more of just a zoom not smart zoom but still works quite well; I'm happy enough with it.
Comment: BetterTouchTool now requires you to buy a license and can be downloaded at  https://folivora.ai/

Simulate touchpad or gestures on iMac


stratum connection interrupted problem

Question: stratum connection interrupted problem always present and no yay or accepted. Im using GTX 780 and my hash rate is insanely high.You can refer to the pic below, hope someone can help me solve this problem
Answer: The incredible high/impossible hashrate suggest something went wrong indeed.
If you have overclocked your graphics card, then revert to the original factory settings and try again.
Also you should try again with a lower amount of blocks/threads and slowly increase it.
Finally you should also update your drivers to the latest version, if your not already on latest one.

stratum connection interrupted problem


AWS Load Balancing Same Server Different Port

Question: I am just curios and probably the answer in no. But I was wondering if it is possible have a load balancing that listen on 1 server instead 2 or more and redirect the traffic on different ports?
Answer: The short answer is no.  You can create different load balancer destination ports that point to the same instance port (80 -> 80, 1025 -> 80), but you cannot have the same load balancer port point to different instance ports (80 -> 80, 80 -> 81).
Answer: This is now possible with Application Load Balancers by adding the same instance multiple times using different ports.
Here you can see the section where it allows to add an instance and specify the port:


Online meetings and GDPR

Question: If a tutor asks someone to use an online service for doing class meetings could a student have just sued the tutor  saying that he must take liability of the fact that he is forcing every one to accept the terms of a service and privacy policy of the website(the website used for video conferencing).Moreover even if the student agrees the tutor has not forced him to accept still as the tutor is sending links he will be liable for any processing done by the video conferencing company by b posting a link to it.How do tutors avoid this liability?
Comment: Do not remove strikes portion as it was previously there in the questionm.
Answer: Complying with a contract can require you to enter another contract
For example, when I hire a contractor I can require them to have public and product liability (or any other) insurance - that requires them to enter a contract. Or, I can require my builder to engage a particular plumber as a subcontractor.
Or I can require my student to enter a particular software licence.
If you don't want to do this, don't enter the contract with the tutor's organisation.
Comment: I think this does not address the GDPR aspect of the question. It seems that the online service is a data processor and may perhaps needed to be described adequately in the gdpr policy accompanying the contract between student and university
Comment: Or I can require the guy I order an item from to send via this and not that delivery service. Or it could make the seller enter *multiple* contracts with their own delivery chain... in some cases I know about the chain of contracts can go 4 deep! Company A orders a part from B, B orders a sub-part from C using the rules company A dictated, which require that the sub-part has fittings from company D.
Comment: @HagenvonEitzen I think this sort of thing will make its way to court eventually, because its a can of worms - student is required to use Zoom as thats the sole conferencing system the professor uses, so Zooms policy needs to be included?  So down the rabbit hole we go - any apps the course requires the user to use (Office, PDF creators, Mathlab etc etc), any file sharing systems the course requires the user to use (Dropbox etc), any use of the internet (ISPs collect data, as do telecoms companies...) etc etc etc.  You could literally end up with a million page privacy policy.
Comment: @HagenvonEitzen I think the courts will allow some common sense here when it finally does come to court - ie you as data processor or controller aren't expected to include policies for anything obviously external to your control if the usage is obvious.  Eg in this case, student uses Zoom, thats obvious, the professor could rely on Zooms publicly available policy and doesnt need to mention it in their own.  Same goes for using Office, Dropbox, Microsoft Windows, OSX etc - all will have their own publicly available policies, and it will probably be up to the student to do their research there.
Answer: There is no "liability" for requiring a student to sign up for and use a particular video conference service to tale a particular course. The tutor (or school) mat impose such a requirement if s/he so chooses. The student's only remedy, if the student objects to using the servile, is not to take the course. If the tutor is an employee, then the employer's (school's) policies might be relevant.

Online meetings and GDPR


implicit operator

Question: I just saw it was using in one of the recent answers:
public static implicit operator bool(Savepoint sp)
{
    return sp != null;
}

Why do we need word implicit here, and what does it mean?
Answer: Implicit means that the conversion doesn't require a cast in your code.
You can now do this:
Savepoint point = new Savepoint();
if(point) // becomes a bool using your operator
{
}

instead of having to do this:
Savepoint point = new Savepoint();
if((bool)point) // an "explicit" conversion
{
}

One example of why this is a useful distinction is numeric types.  There's an implicit conversion from "smaller" types to "larger" types, e.g:
float f = 6.5;
double d = f; // implicit conversion

But converting larger types to smaller types can be dangerous, so there's only an explicit conversion, forcing the user to clarify that he really intends to perform the operation in question:
long l = 20;
// short s = l;
short s = (short)l;  // explicit conversion

Comment: You have your words mixed up in the explicit numbers casting. "converting smaller types to larger types" should be the other way around.
Comment: float is smaller than double, isn't it?
Answer: That looks like misuse of an implicit operator. I don't know what the Savepoint class does, but converting it to a boolean does not seem logical. The implicit operator enables you to check if a Savepoint reference is null or not by simply evaluating the reference:
if (point) {

instead of:
if (point != null) {

If it's used that way, that is hiding what the code is actually doing, and that goes against pretty much everything that C# is about.
Answer: Just to add to mquander's answer.
From the C# 3.0 language specification:

A conversion operator declaration that
  includes the implicit keyword
  introduces a user-defined implicit
  conversion. Implicit conversions can
  occur in a variety of situations,
  including function member invocations,
  cast expressions, and assignments.

(section 10.10.3)
Answer: You need to specify 'implicit' because also there is explicit operators.
This means that conversion between Boolean and Savepoint can be done implicitly, e.g. = hidden.
Savepoint s = new Savepoint();
bool b = s;

Explicit conversion, e.g. evident, can be done this way:
 Savepoint s = new Savepoint();
 bool b = (bool)s;

Implicit conversion is often used when there is no possible data loss, i.e. Int16 (short) to Int32 (int). But if it's possible, you need to 'agree' with it using explicit conversion.
In your case, for example, if Savepoint is just a
struct Savepoint
{
  public bool data;
}

you can use implicit conversion, because no data loss is possible:
Savepoint s = new Savepoint();
s.data = true;
bool b = s;

otherwise I recommend you to define explicit operator!
Answer: Conversion operators convert from one type to another. Implicit means you don't have to type an explicit cast in code for the conversion to happen, explicit requires that cast in code to be called.
You use implicit conversion operator when you are certain that the conversion does not lose any data. For example, with widening coercions (int -> long, float -> double). Explicit conversion operators are used when some state will be lost or you don't want compiler to automatically screw up client code by inserting conversions all over the place.
A conversion like yours would really wreak havoc because it is inadvisable to perform this particular conversion.

implicit operator


What ever happened to Falcon?

Question: In Avengers X-sanction Cable goes back on his last day to try and kill the Avengers.  In the first issue did he actually kill Falcon?
Answer: The character Cable attacks is the Falcon. The goal was to draw out Captain America. He is presumed to have survived the X-sanction storyline.
Answer: The Falcon is still alive, he's teaming up with Captain America on Captain America #10.

What ever happened to Falcon?


What is the difference between "responsibility for" and "responsibility to"?

Question: I thought "responsibility for" is about the responsibility for an action or an object, and "responsibility to" is about the responsibility with a person, like if I say "I must have the responsibility to her for losing her money", it means that because I lost her money so I must have the responsibility with her. But when I searched on the web, I found a page titled that "Responsibility to our environment", environment is an object and why they use "responsibility to" instead of "responsibility for"? Is that usage of that page correct? Thanks for your help!
Comment: *responsibility to our environment* is like a duty.
Comment: +vickyvace So if it's a duty, we use responsibility to? thanks. What about this: "Responsibility to protect"?
Comment: Yes, it means that it  is your duty to protect. (I didn't mean to reply so late. The connection was lost)
Comment: +vickyvace Is it correct to use this "Responsibility to take care of his kids"?
Comment: [definition 6](http://www.dictionary.com/browse/to) (used for expressing aim, purpose, or intention) [definition 10](http://www.dictionary.com/browse/to) (used for expressing the object of inclination or desire)
Answer: The OP's assumptions about how these two prepositions work after responsibility and responsible are generally correct. If one is responsible for X, then X is either the action that would constitute discharging the responsibility, or the result of that action, or some person or thing that this action is centered on. If one is responsible to Y, then Y is some person who would be entitled to complain and demand some sort of remedy, if the responsibility is not discharged. For example, if one promises to Y to take care of X, the promise creates a responsibility for X, to Y. A babysitter is thus responsible to the parents, for the baby's wellbeing and safety.
Now, how does that work with respect to the environment? Everybody who is concerned about the environment agrees that human beings have a responsibility for the environment, that is for its flourishing, for ensuring that it is not damaged, etc. Behind that apparent disagreement, there is, however, a great deal of disagreement about what ethical considerations underlie the environmental concerns. Some people, when asked why they are concerned about the environment, might respond that the damage to the environment can affect the availability of crops that humans use for food, or cause flooding that would disrupt human life in coastal regions, and so forth. These people believe that our responsibility for the environment is a responsibility to the humans (including future generations of humans) who may be disadvantaged by the damage to the environment; their concerns about the environment are ultimately anthropocentric.
There are, however, also people who regard the natural environment as valuable in itself, independently of any impact on humans. They think of the environment (or of particular ecosystems) as something that demands respect because of what it is. The proponents of this approach to the environment reject the idea that the responsibility for the environment is a responsibility that we have to other humans; they think of it as a responsibility to the environment itself. The author of the text that caused OP's puzzlement probably chose the preposition to, rather than for, to express an allegiance to this way of thinking about the environment, and to make it clear that the text is not based on an anthropocentric approach to it.
Answer: Purely based on what sounds natural to me as a native speaker, I would say you are responsible for someone or something, and you have a responsibility to someone or something.
In other words the difference is responsible versus responsibility.  But there is also a slight difference in semantics I think.
Comment: Well, do you mean you don't use "I have a responsibility for XYZ"?
Comment: Correct, I can't think of a sentence where I would use it like that.
Answer: "Responsibility for" would precede a noun or a noun phrase. Example:
A parent has a responsibility for their child.
A student has a responsibility for doing their homework.

Here it means that the object is under the care or supervision or purview of the subject.
"Responsibility to" would precede a verb. Example:
A parent has a responsibility to teach their child.
A student has a responsibility to do their homework.

Here it means that the verb is expected to be handled/enacted by the subject.
In the example you provided ("Responsibility to our environment"), it's a less specific form, and isn't
[responsibility to] [our environment]

but rather
[responsibility] [to our environment]

meaning that everyone has a general responsibility, and that responsibility is directed toward our environment -- that everyone should act as though they are responsible FOR the environment. It is a much more situational usage that I would recommend avoiding, as to me it seems somewhat strange English.
Answer: I am responsible FOR my childrens' healthcare>(noun).
My responsibility is TO work and buy>(verbs) their insurance for that healthcare.
Comment: responsible FOR (noun) & responsible TO (verb)
Comment: This looks like it adds an example to [AberrantWolf's answer](https://english.stackexchange.com/a/332966). It does not seem to be an answer on its own. A Stack Exchange answer is lengthy enough to show that it is right. It gives explanation, context, and supporting facts. This is what makes answers useful – to the asker, and to future visitors. See: "[Real questions have answers, not items or ideas or opinions](https://stackoverflow.blog/2011/01/17/real-questions-have-answers/)".


Use of : Construction of objects at predetermined location in C++

Question: What is the use of Construction of objects at predetermined locations in C++?
The following code illustrates Construction at predetermined location-
void *address = (void *) 0xBAADCAFE ;
MyClass *ptr = new (address) MyClass (/*arguments to constructor*/) ;

This eventually creates object of MyClass, at the predetermined "address".
(Assuming storage pointed by address is fairly large enough to hold MyClass object).
I would like to know the use of creating objects at such predetermined locations in memory.
Comment: Never used this kind of allocations but I assume it is used in real time systems where memory is allocated in advance and partitioned manually for faster allocations
Comment: @giorashc- I came across such allocation for the first time, today !
Is this also termed as **"Placement new"** ?
(An edit to my original post suggested this change in the title)
Comment: Yes, this is called as **Placement new**.
Comment: see also [this question](http://stackoverflow.com/q/8959635/1025391)'s answers
Answer: There are mainly two cases:
The first is when -for example in an embedded system- you have to construct an object in a given well-known place.
The second is when you want -for some reason- to manage memory in a way other than the default.
In C++, an expression like pA = new(...) A(...) does two consecutive things:

calls the void* operator new(size_t, ...) function and subsequently
calls A::A(...).

Since calling new is the only way to call A::A(), adding parameters to new allows to specialize different way to manage memory. The most trivial is to "use memory already obtained by some other means".
This method is fine when the allocation and construction needs to be separated. The typical case is std::allocator, whose purpose is allocate uninitialized memory for a given quantity, while object contruction happens later.
This happens, for example, in std::vector, since it has to allocate a capacity normally wider than its actual size, and then contruct the object as they are push_back-ed in the space that already exist.
In fact the default std::allocator implementation, when asket to allocate n object, does a return reinterpret_cast<T*>(new char[n*sizeof(T)]), so allocating the space, but actually not constructing anything.
Admitting that std::vector stores:
T* pT;  //the actual buffer
size_t sz; //the actual size
size_t cap; //the actual capacity
allocator<T> alloc;

an implemetation of push_back can be:
void vector<T>::push_back(const T& t)
{
   if(sz==cap)
   {
       size_t ncap = cap + 1+ cap/2; //just something more than cap
       T* npT = alloc.allocate(ncap);
       for(size_t i=0; i<sz; ++i)
       {
          new(npT+i)T(pt[i]); //copy old values (may be move in C++11)
          pt[i].~T(); // destroy old value, without deallocating
       }
       alloc.deallocate(pt,cap);
       pT = npT;
       cap = ncap;
       // now we heve extra capacity
   }
   new(pT+sz)T(t); //copy the new value
   ++sz; //actual size grown
}

In essence, there is the need to separate the allocation (that relates to the buffer as a whole) with the construction of the elements (that has to happen in the already existent bufffer).
Answer: One scenario where placement new is useful is:
You can preallocate big buffer once and then use many placement new operators.
This gives you better performance(You don't need reallocations everytime) and less fragmented memory (when you need small memory chunks). Typically this is what an std::vector imlementation uses.
The downside is, You have to manually manage the allocated memory. Objects allocated by placement new require an explicit destructor invocation once they are not needed anymore.
Given that it is always advicable to profile your application for bottle necks instead of running over to placement new for pre-optimization.
Answer: Usually you use predetermined locations in embedded or driver code, where some hardware is addressed via certain address ranges.
But in this case the storage at that address isnt used for accessing, or better it is not intended (or better dont have to be used for it, as you dont know that the new operator is doing with it), as later on the new operation is executed.
You use it as initialization value (with new not really changing it).
There come two purposes to my mind: First, in case you forgot later on a new, you instantly see in the debugger your magic address (i.e. in this case 0xBAAADCAFE).
Secondly you can use in case you fiddle around with the new operator and need an init value, so you can debug it (e.g. you can see changes).
Or you have modified your new operator that it makes whatever with that magic number (e.g. you can use it for debugging, or, like mentioned above, to really indeed use memory at a specific address for certain hardware), switch between different allocation methods, ...
EDIT: To answer it in this case correct, one needs to see what the new operator really does, you should check that news source code.
Answer: This particular behaviour is useful when you know the address of a class by having a long, DWORD, DWORD_PTR or otherwise sized pointer passed as an argument to a function and need to reconstruct a copy of the class for O-O use.
Alternatively, this could also be used to create a class in pre-allocated memory or a location which you have determined is static (ie: you are linking your application with some ancient ASM libraries).
Answer: Custom allocators, realtime (no lock here), and performance.


Can I be just a Muslim rather than being a tableeqi or sunni

Question: Assalamu alaikum brother, as you are no there are number firaqas in Islam now like tableeqi Sunni , devbandi etc. And I have also heard a Hadith of prophet Muhammad s.w.a.w. that there will be about 73 firqas in Islam but followers of any one jamat will go into the jannat. My question is is if I I stay out of these things and just follow the Islam buy Quran and follow the footsteps of prophet Mohammed s.w.a.w ( e.g: giving dawat to Muslim brothers but not being strictly be called as tableeqi and not following their rules strictly) .
Can I still go to jannat.
Comment: If your question is are tableeghi right or wrong? Than this is off-topic (we are not here to discuss which view of Islam is right or wrong). If your question is do I have a chance to go to jannah, if I followed the qur'an and sunnah as good as I can, than I must ask why not?
Comment: No not at all asking weather a particular jamaat is right or wrong. All I want to ask is if I don't call myself strictly as a tableeqi or Sunni or devbandi etc , and just follow the Quran and prophet Muhammad peace be upon him can I still go to Jennat
Answer: If one reads the Mushaf al shareef and look at all the verses which mention the word "Muslim" it ALWAYS coupled with "Allah" . In other words whenever Allah is mentioned in the Mushaf al shareef the word Muslim or Muslims is associated with Allah. So being a Muslim has to do with the strict belief in God / Allah the one without any partners or anything like him. So based on the Al Mushaf the definition of a Muslim is one that who believes in the One Allah, the day of Judgement and does good ( #amala Sali7an).
So if one say the first part of the Shahadda.... La illaha illa Allah he or she becomes a Muslim. The second part of the Shahadda is for the belief in the Messenger Mohamed (PBU).
There is only one religion in the Mushaf and no plural religions.... all others are called "Millah" like the Christians and the Jews those are Millah and not religions.
Sunni, Shia and others are simply different ways to worship Allah
Those ideas and more are from Dr. Mohamed Shahroor
Salam
Comment: Wrong Islam is belief in Allah and His prophet(s) . And your claim about Millah requires some elaboration and evidences supporting your claims.
Comment: Millah is also used in a positive sense for Ibrahim. Millata Ibrahim hanifan.


According to modal realism, how many possible worlds are there?

Question: Modal realism tells us there is an infinity of possible worlds, but how many are there exactly? Is it countable infinity ℵ₀, uncountable infinity , or some other, bigger uncountable infinity?
Comment: @virmaior This is nitpicking, but all actual worlds are possible, so there can't be zero possible worlds.
Comment: Depending on what is meant (there's an equivocation potential), there may in fact be zero "possible" worlds according to MR, because all of them are actual. Assuming, you mean how many worlds are there in Lewis's modal realism, then a second question is whether you're including indistinguishable worlds as different or not. Can you clarify the second point?
Comment: @Era I don't think that's nitpicking at all, it's actually a critical mistake to call actual universes impossible.
Comment: All of them. Anything is possible... not everything is probable ;)
Answer: Actually, there's an important objection to Lewis's Modal Realism along the lines of your question. This objection was developed originally in this paper by Forrest and Armstrong I think (don't have access to this paper from home). The idea of their objection is that given some principles Lewis is committed to, it would turn out that there simply couldn't be a set of all possible worlds---it would turn out that the "set" of possible worlds wouldn't have a well defined cardinality or something. If you're interested, I can try to dig up the technical details later.
Apparently Lewis wrote a reply in the AJP in 1986, but I don't know what he says there.
Answer: Swartz[74] mentions a degenerate case of possible-worlds talk with only one possible world. A modal logic with zero possible worlds might be said to not have even our world as possible, as not even a world! But so two worlds might be styled the trivial case, with three the minimum nontrivial one.
Brunet[23] mentions David Lewis' modal realism as having ℶ2-many worlds as a lower bound; the same article discusses other attempts to number the worlds. This paper, whoso wrote it I'm not sure, poses an upper bound problem in this connection, claiming that nothing less than absolutely many worlds are required.ℵ◊
Waiving that claimed need, then, we can simply define realist modal logics in terms of how many possible worlds they work with. If the number of them forms a set, yet then it seems like we would have a set of existence claims in play, such as are not established by "denying them is contradictory by itself," so there should be nothing amiss, by itself, with a postulate of, say, 16 worlds. So modal logics would have an "ensemble number" to their name, we might say. And so we can define such logics arbitrarily, in terms of arbitrary assignments of numbers of worlds to them. For example, generically refer to a modal logic with some special metalogical parameter-number k to its name, then say that k is the number of worlds for that logic ("is the number of the logic" = "is the logic of that number," so to speak).

ℵ◊Incidentally, that paper comes to the conclusion that it does in advocating for plural quantification, but Boolos himself was apparently content with something like truncating the universe of sets at the first fixed point of the aleph function (see Kanamori[12], pg. 78).
Answer: The Lowenheim-Skolem theorem says that any axiomatization that has any infinite model at all has at least one model of every potential cardinality.
So if your notion of a possible world includes the integers, and can be described in a finite language, there are more than any given infinite number of possible universes obeying its rules.  Because if all of them were of a given cardinality or below, we could haul out the mechanism of Lowenheim-Skolem, and make one of the next cardinality up.
To see this another way, what could differ?  Obviously, the value of some untracked constant could be different, and could take any value in a range of real numbers, so there are at least uncountably many variations.  Now think about functions from the reals onto the reals.  There are 2^c of those, and clearly some irrelevant one of those could vary any way it wants, and we would not notice.  How about transformations of those functions into one-another -- there are 2^2^c of those...
Comment: I'm skeptical that a possible world could be (fully) described in a finite language.
Comment: In all actual uses, only its variation from the current world is described, right?  A Kripke world is this one with X changed.  And if you are worried about logical interpretations, as modal realism is, the difference has to be finitely stated.  So there does not need to be a full description of the possible world, only a reference in the language for a base template + a finite variation, which is a finite statement.  Worlds with infinite descriptions might have fewer models.
Comment: Besides, if there are trans-infinitely many models just for each of the ones that can be finitely described, you can add all the other ones you want.  I have still answered the question.
Comment: I guess part of what's bothering me is the fact that we don't know that much about what the *actual* world is like, so by extension we don't know what possible worlds are like. That doesn't prevent us from uniquely specifying a possible world by describing its differences with the actual world, but I don't think that constitutes a "full description" of the possible world itself. I'm not sure it's relevant at all; for combinatorial purposes all we need is to uniquely specify each possible world in a finite language.
Comment: Ok, but as noted in the return comment, no full description of the index world is necessary.  There are already trans-infinitely many new ones for any statable difference.  So in-toto there are countably many times trans-infinitely many of them whether or not you start from a given definition.  All of this just points out how mathematically naive Lewis really is.
Comment: @Era You might wanna check out Cresswell's "From Modal Discourse to Possible Worlds" (2006). From the abstract: "The argument of the paper is that the principles needed to shew that natural language possibility sentences involve quantification over worlds are analogous to those used in infinitary modal logic."
Answer: Any set of consistent propositions describes a possible world.
To have infinitely many possible worlds would require infinitely many sets of consistent propositions.
Infinitely many sets of consistent propositions would require infinitely many propositions.
Are there infinitely many propositions?  I don't know, but it seems widely accepted that no natural language can have infinitely many sentences.
Comment: You might enjoy this post & discussion: https://www.researchgate.net/post/Are_there_infinitely_many_possible_sentences_in_a_natural_language
Comment: "Sets of consistent propositions" does not appeal to natural languages, it comes from some formalization of modality supplied with semantics. Already Peano arithmetic has infinitely many well-formed sentences, and for that matter infinitely many models, which are its "possible worlds". Even the limitation of natural languages to finitely many sentences only applies to uttered ones, they all have grammatic means to generate infinitely many meaningful sentences. Because they are all capable of expressing arithmetic, among many other reasons.


Proportional hazards assumption meaning

Question: Suppose we have a Cox-PH model and death is the outcome of interest. Suppose we have the predictors $X_1, X_2$ and $X_3$. Then does the PH assumption mean that for any person (i.e. arbitrary values of $X_1,X_2$ and $X_3$) the hazard of death is $c \cdot h_{0}(t)$ where $c$ is a constant? So the hazard function is the same for everyone?
Answer: PH model:
$$ h_i(t) = h_0(t) \exp(x_{1i}\beta_1 + x_{2i}\beta_2 + x_{3i}\beta_3). $$
The baseline hazard, $h_0(t)$, is common to all individuals; it plays the role of the intercept in a linear model. But the second term, the exponential of the linear predictor, adjusts the hazard of the $i$th individual for observed risk factors.
PH assumption
According to the PH model, for any two individuals with covariate vectors $(x_{1i}, x_{2i}, x_{3i})'$ and $(x_{1j}, x_{2j}, x_{3j})'$, the hazards ratio is
$$ \frac{h_i(t)}{h_j(t)} = \frac{h_0(t) \exp(x_{1i}\beta_1 + x_{2i}\beta_2 + x_{3i}\beta_3)}{h_0(t) \exp(x_{1j}\beta_1 + x_{2j}\beta_2 + x_{3j}\beta_3)} = \exp\left((x_{1i} - x_{1j})\beta_1 + (x_{2i} - x_{2j})\beta_2 + (x_{3i} - x_{3j})\beta_3 \right),$$
which does not depend on time. This is the PH assumption.
Typically, all covariates are taken to be the same except one, say $x_{1}$, which differs by one unit, so that
$$ \frac{h_i(t)}{h_j(t)} = \exp(\beta_1).$$
This leads to a nice interpretation for the regression coefficients as (conditional) log hazards ratios.
Answer: The hazard function isn't the same for everyone. The hazard functions for each covariate need to be proportional - hence the name. So, regardless of how h(t) bounces around, the ratio of the hazard function at time t between the levels of the covariate is constant.
Comment: You can estimate the baseline hazard nonparametrically in the context of the Cox model, although noisily.  Another way to translate the PH assumption is that survival curves for any two individuals are connected by a power transformation, i.e., to get from $S_{1}(t)$ to $S_{2}(t)$ you exponentiate the first by the hazard ratio for the two.
Comment: Is this the same thing as each study group having a hazard function that is a positive multiple of the baseline hazard, $r \times h_{0}(t)$?
Comment: A somewhat problematic question given the context of a Cox model which doesn't estimate a baseline hazard.

Proportional hazards assumption meaning


Metrics / Methodology for estimating resource utilization for software in planning stage

Question: I'm looking for approaches to estimate the resource utilization of an (web-)application in a JEE environment. The overall target is to get a forecast for hardware/software requirements while the application is still under development or even in planning stage.
Is this task too complex (many different factors) to get a fairly reliable proposition without spending too much time?
Answer: It's not a question of too many factors as much as a computability problem. (The proof of this is left to the student)
You'll have to benchmark a prototype of the fundamental operation or 'kernel' of the application of your application.
This is exactly the same thing engineers in other domains do.
If you don't know what the kernel of your application looks like in the planning phase you can't do this. Moreover you can't plan a schedule either, as you don't know how much work it is to complete.
It's one of those things that experience helps with. You might be able to find a local expert to give you an estimate if you can describe the kernel.
If you can't describe it yet you are best to just design for scalability and scale it up or down after you get a prototype working. ( Decide not to decide.)
Sites like highscalability.com document some industry practices for scalability.


Creating a workflow

Question: I'm learning drupal, I create a web form for duty travel that the user submitted. Now I want to create a workflow so after submitted the webform should be sent to manager for validation or cancelling after that he add some comments and files and resend it to the user
Answer: You can use hooks to change almost anything in the webform like additional submit handlers can be handled, validation can be done, elements can be added, etc.
Refer the already existing answers, it will be helpful.
https://stackoverflow.com/questions/26174165/drupal-7-webform-submit-hook
Webform - Submit values from Drupal 7 from to external url
Answer: You can setup complete workflow using these modules with webform:
Webform Workflow

This is a Drupal 7 module which allows assigning workflow 'states' to
  webform submissions. Users can be notified when submissions change
  state. Permissions can be set to control access to submissions based
  on their state. The states themselves are fieldable Drupal entities.

Workflow

workflows are made up of workflow states. Transitions between states
  can be allowed per role. For example, a workflow with the states
  Draft, Review, and Published could be assigned to the Story node type.
  Only users with role 'chief editor' can set Stories to the published
  state. You can set up the Workflow to alter states from form, page,
  comment, a special block, and a special workflow tab. Additionally,
  the submodule Workflow Access allows you to manage view/edit/delete
  permissions for content types per User role and Workflow state.
Transitions between workflow states can have actions assigned to them.
  In our example, we could assign an action so that when the story moves
  from the Draft state to the Review state an email is sent out. Another
  action could be assigned to the transition from Review to Published so
  that the node's status is set to Published
Comment: [link](http://prntscr.com/bwypzg) thank you i try the module but i want to know is it possible to add fields in the webform for example the user sent the webform to the manager, and when the manager receive it , he download pictures and at the same time upload others pictures then he  validate the webform

Creating a workflow


Why does Krishna Vishwaroop contain all the manifestations of Adityas, Rudras, Shiva, Brahma, Vasus, Aswinis, etc., but surprisingly not Sri Ram?

Question: Why does Sri Krishna Vishwaroop contain all the manifestations of Adityas, Rudras, Shiva, Brahma, Vasus, Aswinis, etc., but surprisingly not Sri Ram?
Answer: According to Vedās it is Śrī Rām alone who manifests in numerous forms:—
रूपस्थानां देवतानां पुंस्त्र्यङ्गास्त्रादिकल्पना । द्विचत्वारिषडष्टानां दश द्वादश षोडश ॥
अष्टादशामी कथिता हस्ताः शङ्खादिभिर्युताः । सहस्रान्तास्तथा तासां वर्णवाहनकल्पना ॥
It is from the form of Śrī Rām that the forms of man, woman, Armies and weapons are conceived. All the gods are situated in Sri Ram. So they take different forms etc. and serve Sri Ram but are not different / separate from them (Rama). When Sri Ram manifests he assumes many forms, some have two hands (Śrī Krishna), some have four (Śrī Nārāyana), eight (Sri Bahuma Purusha, Swēt Dweep), ten, twelve, sixteen and eighteen hands. In the form of a Chaturbhuj, his hands are adorned with conches and other objects (Disc, Lotus & Mace). When he assume the Virat Purusha (world form), they have thousands of hands. Those different forms are said to have different colors and vehicles (like Sri Narayan has Garuda, Sri Shiva has Bull etc.)
(Atharva veda Shruti Rām Pūrva Tāpaniya Upanishad 1.8–9)
शक्तिसेनाकल्पना च ब्रह्मण्येवं हि पञ्चधा ।
कल्पितस्य शरीरस्य तस्य सेनादिकल्पना ॥
Sri Ram just manifestes different-different kinds of Powers, Armies etc. & five brahmans i.e. Sri Shiva, Sri Vishnu, Sri Ganesh, Sri Surya, Śrimati Devi Durga. And from that five forms he manifests different-different kinds of Armies etc.
(Atharva veda Shruti Rām Pūrva Tāpaniya Upanishad 1.10)
And infact according to Vedās it's Sri Ram who manifests as Lord Sri Krishna, when Sri Ram was in Dandakaranya Forest than the Sages of that forest were attracted towards the Great beauty of Sri Rāghav and they asked a boon to delight with Sri Ram & Sri Ram said he will full-fill that in his upcoming incarnation as Sri Krishna as this whole incident is mentioned in Atharva veda Shruti Krishna Upaniṣad 1.1;
यो रामः कृष्णतामेत्य सार्वात्म्यं प्राप्य लीलया । अतोषयद्देव्मौनिपटलं तं नतोऽस्म्यहम्।।
(Atharvavedā Shākhāyam Krishna Upanishad 1.1)
That Śrī Rāma, who transformed himself (incarnated) as Krishnā, attained Sarvaatmakta (सार्वभौमिकता) by his very lilā (divine exploits, pastimes); and thus deities-sages-masses were completely satisfied on this earth. I make prostration before that same Śrī Rāma.
हरिः ॐ श्रीमहाविष्णुं सच्चिदानन्दलक्षणं रामचन्द्रं दृष्ट्वा सर्वाङ्गसुन्दरं मुनयो वनवासिनो विस्मिता बभूवुः। तं होचुर्नोऽवद्यमवतारान्वै गण्यन्ते आलिङ्गामो भवन्तमिति भवान्तरे कृष्णावतारे यूयं गोपिका भूत्व मामालिङ्गथ अन्ये येऽवतारास्ते हि गोपा न स्त्रीश्च नो कुरु अन्योन्यविग्रहं धार्यं तवाङ्गस्पर्शनादिह शाश्वतस्पर्शयितास्माकं गृहीमोऽवतारावयम् ॥
रुद्रादीनां वचः शृत्वा प्रोवाच भगवान्स्वयम् । अङ्गयङ्गं करिष्यामि भवद्वाक्यं करोम्यहम्॥
The forest-dwelling sages (of Dan DakaaraNya) beholding the all handsome, all attractive Lord Shri Ramachandra whose Sachidanand Lakshan is Maha Vishnu himself, were bedazzled with surprise! On beholding the transcendental beauty of Śrī Rām, they forgot their very own existence. Then the Sages said to Lord Śrī Rām: O' all attractive Lord, we are counted in having inferior births (as we have fallen in the birth cycle), still we wish to embrace you. Then Lord Śrī Rām to sages: Let all of you embrace me (Shri Rāma; मामालिङ्गथ), after you become Gopikas (cowherd women) in (my next incarnation) another Krishnavatar.
(Here Lord Sri Ram employs 'Maam', means you will embrace 'me' (no second personality) in mood of conjugal love, so here all misconception vanishes that Rāma enters into Krishna as second person. So all devotee of Rama can embrace Rama in mood of conjugal love after being manifested as Amsha of Bhagvati-Sita.) To this sages requested: please don't make us born as Gopa (illiterate, Ganvaar) or a Stri (woman). (Thus the sages insisted with Lord in love that) We will manifest only if you grant us a constant touch of Your divine body there.
(Atharvavedā Shruti Krishna Upaniṣad 1.2)
Around same Shlokā has also been found in Padmā Purān Uttarkhañd which says;
पुरा महर्षय सर्वे दण्डकारण्यवासिन ।
दृष्ट्वा राम हरि तत्र भोक्तुमिच्छन् सुविग्रहम् ॥
ते सर्व स्त्रीत्वमापन्ना समुदभूताश्च गोकुले ।
हरि सप्राप्य कामेन ततो मुक्ता भवार्णवात् ॥
Inshort! Seeing Śrī Rāma, sages were filled with Kanta Bhaav (Priya Pritam Bhāv) than Śrī Rāma told them to wait till his next incarnation as Śrī Krishnā in Gokul, than he will full fill their desires.
नारायणोपि रामशः शंखचक्रगदाव्जधृक्। चतुर्भुजस्वरूपेण वैकुण्ठे च प्रकाशते॥
अवतारा बहवः सति कलाश्र्चांशविभूतयः।
राम एव परं ब्रह्म सच्चिदानन्दमव्ययम्।।
(Samved Bhārdwaj Saṃhitā)
Śrī Hāri Nāräyana is an incarnation of Śrī Rāma and shines in Vāikunth in the form of four arms with conch, chakra and mace. There are many incarnations of Śrī Rāma differentiating by Kalãs, Part, Vibhuti etc. But Śrī Rāma himself is Par-Brahma who devoid of Māya in his two armed form.
As Sri Ram manifestes himself as Sri Krishna & Sri Narayana so how Sri Krishna/Vishnu can assumes the form of Sri Ram in Vishwa Roop as he is himself Sri Ram.
Every single deity is manifestation of Parātpar Par-Brahma Śrī Rām that is why Srimad Rāmāyaṇa says,
नेति नेति जेहि बेद निरूपा। निजानंद निरुपाधि अनूपा॥
संभु बिरंचि बिष्नु भगवाना। उपजहिं जासु अंस तें नाना॥
(Śrīmad Rāmāyaṇam 1.143.3)
Meaning :- Whom the Vedas describe by saying 'neti-neti' (not this, not this also). Who is blissful, titleless and unique and from whose part many Lord Shiva, Brahma and Vishnu appear.
नारायणं नारसिंहं वायुदेवं वाराहं तत्सर्वान्त्समात्रान्त्सीतं लक्ष्मणं शत्रुघ्नं भरतं विभीषणं सुग्रीवमङ्गदं जाम्बवन्तं प्रणवमेतानि रामस्याङ्गानि जानीथाः ।
(Yajurvedā Shākhayam Rām Rahāshya Upanishād 1.7½)
Lord Śrī Hari Nārāyana, Lord Narasimha, Lord Vāsudev (Śrī Krishnā), Lord Vāraha etc. All are the parts (अंश) of Lord Śrī Rāma. Lakshmāna, Shātrughna, Bharata, Vibhishana, Sugriva, Angad, Jambavant and Pranav (Om ॐ) are also mere portions of Lord Śrī Rāma.
श्रीराम एव सर्व कारणं तस्य रूप द्वयं परिछिन्न मपरिछिन्नं परिछिन्न स्वरूपेण साकेत प्रमदावने तिष्ठन रास मेव करोति द्वितीयं स्वरूपं जगद्पत्वादेः कारणं तद्दक्षिणांगात्क्षाराबि्ध शायी वामांगाद्रमा वैकुण्ठवासीति हृदयात्पर नारायणो वभूव चरणाभ्यां वदरिको पवन स्थायी शृङ्गारान्नन्दनन्दन इति ।
(Atharvaveda Shākhayam Vishwambhar Upanishad Ch. 1 Verse 5)
Translating Highlighted~ Śrī Rām alone is the cause of EVERYONE. From whose heart, Śrī Hari Nārāyan manifests and whose adornment manifests as Śrī Krishnā.
Śrī Rām is alone cause of all causes the Param Kāran this is being said by non-other than Śrī Hari Nārāyan Himself;
वासुदेवादि मुर्तिनाम् चतुर्नाम् कारणं परम्।
चतुर्विंशति मुर्तिनाम् आश्रय श्रीरामः शरणं मम।।
(Brihād Brahmā Samhitā 2.7.8)
Śrī Hari Narayana says to Brahmā Ji that the supreme cause of the four vyuhas, such as Vāsudeva. Śrī Rāma, the shelter of the twenty-four avtars, is my refuge.
परान्नारायणाच्चापि कृष्णात्परतरादपि।
यो वै परतमः श्रीमान् रामो दाशरथिः स्वराट् ॥
Vashistha Samhita, Chapter 26, verse 17
The one who is beyond Śrī Hāri Nāräyana, who is beyond even Śrī Krishnā, who is the most Paratammamvarat Paramatma, that is Dashrath's son Śrīmān Rām.
ततस्त्वमसि दुर्धर्षात्तस्माद् भावात् सनातनात् ।
रक्षार्थं सर्वभूतानां विष्णुत्वं उपजग्मिवान् ॥
(Śrī Vālmiki Rāmāyaṇa 7.104.9)
"After my prayers in the begining of the creation, Oh Rāma ! You forsaken Your durdharsa (the swarupa which is difficult to be achieved for many i.e. the eternal two armed Śrī Rāma form) and assumed the form of Vīshnu for the sake of protection and sustenance of all the beings."
यस्यांशेन एव ब्रह्म विष्णु महेश्वरा अपि जाता महाविष्णुर्य्यस्य दिव्यगुणाश्च ।
स एव कार्यकारणयोः परः परमपुरुषो रामो दाशरथिर्वभुव॥
(Atharvavedā Shruti Vedsar Upanishad, Uttarkhand)
From whose Portions (Ansh) Brahma, Visnu and Mahesvara are manifested, Whose divine Guna is Mahavisnu, The only one who is the cause of all causes, The one who is higher than the highest, such is Śrī Rāma, the son of Dasratha. (Approx same shloka is also found in Vashisht Samhita Ch. 26 and Samved Sudarshan Samhita 1–5.)
And Sri Ram is the Original Form Of Vishnū Tattva or Most Ancient Form Of Hari;
द्विहस्तमेवऋञ्च शुद्धस्फटिकसन्निभम्।
मरीचिमण्डले संस्थं बाणाद्यायुधलाञ्छितम्।।
किरीट हार केयूर वनमाला विराजितम् ।
पीताम्बर धरं सौम्यं रूपमाद्यमिदं हरेः॥
(Narad Panchratra Padma Samhita)
Concluding meaning is that, In the Sun (the divine light/effulgence), there is the original primeval-form of Śrī Hāri having one face and two hands with bow and arrow."
द्विभुजो जानकीजानिस्सदा सर्वत्र एव हि।
भक्तेच्छातः पुनर्जातो वैकुंठे ते चतुर्भुज।।
(Shiv Samhita, 5th patal, chapter 2)
The two-armed Janakivallabh Shri Ram, you are always everywhere. By the will of your devotee, you take 4 handed narayan form in vaikunth.
In Everyone's Viswa Swarōop Everyone Will Present But Sri Ram Will Not, As He Is Alone Parātpar Par-Brahma From Whome Everything & Everyone Manifests.
एष रामः परंब्रह्मकार्यकारणतः परम्। चराचरजगत्स्वामीनमानुषवपुर्धरः ॥ एतद्धिब्रह्मविज्ञानमधुनाज्ञातवानहम्।
This Shri Rāmachandrā ji Maharaj is the Par-Brahma beyond Kārya and kāran (here beyond Kāran means that Lord Rāma is Swayam Bhagwān) the lord of the world, even though he comes like human being, he is not really a human being. To know him in this form is absolutely a Brahma Gyan. I have understood this Tattva now.
(Shri Padma Mahapuran 5/28/59-60)
योऽसावयोध्याधिपतिः सपरब्रह्मशब्दितः। तस्ययाजानकीदेवीसाक्षात्साचिन्मयीस्मृता ।। एनंतुयोगिनःसाक्षादुपासतेयमादिभिः ।
दुस्तरापारसंसारवारिधिंसंतितीर्षवः॥ स्मृतमात्रोमहापापहारीसगरुडध्वजः । यएनंसेवतेविद्वान्ससंसारंतरिष्यति ॥
The one who is Lord of Ayodhya Puri Maharaj Shri Ram Chandra ji, his name is Par-Brahma and the one who is his wife Janakishori Bhagwati Srisita ji, she is considered to be the visible power of Lord Shriram, ………
(Shri Padma Mahapuran 5/28/59-60)
राम एव परं ब्रह्म राम एव परं तपः ।
राम एव परं तत्त्वं श्रीरामो ब्रह्म तारकम्।।
Śrī Rāma is alone Par-Brahma, Śrī Rāma is alone highest Tapa, Śrī Rām is alone highest Tattva, He is the Tārak Brahma.
(Atharvavedā Ram Rahasya Upanishad Chapter 3/Canto 1, Shloka 6)
The Name Par-Brahma is certainly dedicated to Sri Ram alone;
अतस्त्वं जानकीनाथ परब्रह्मासि निश्चितम् ।
त्वन्मायामोहितास्सर्वे न त्वां जानंति तत्वतः ।।
(Sri Padma Mahapuran 6/242/41)
Therefore, O lord of Jānakī Śrī Rām, you are absolutely the Par-Brahman. All deluded by you do not know you truly.
तदाऽदर्शरमानाथंपूर्णब्रह्मस्वरूपिणम् ॥
Then I saw ramanath Shri Ram the Purna Brahma (पूर्ण ब्रह्म).
(Shri Padma Mahapuran 5/28/73)
Thank You For Reading
Comment: The claim "According to Vedās"  as if it's a unilateral message that resonates across vedic Shakas and its recessions, yet you use Rāmrahashya Upanishad which Sri Ram himself lists at 54th. 2nd, Upanishad doesn't have an emphasis on the second "ā" its not pronounced UpanishAd it's Upaniṣad. The same goes for Rahasya. Finally, each sect is welcome to pick those aspects of literature that help their cause and method, but using one to throw a unilateral claim overwriting Vedic families and their shakas, seem desperate when you yourself raise and answer the question.
Answer: त्वत्तो विनिर्गता भुयो वयं लीयेमहि त्वयि।
त्वमेव परमं गुह्यं त्वमेव परमं पदम्।।
त्वमेव परमं ब्रह्म त्वमेव शरणं हितः।
तत् त्वम् असि इति वेदांत महावाक्य उपपादितम्।।
निर्वक्ति मंत्र तत्व अर्थम् इति राम नमोस्तुते।
Skandpuran Nirvana khand quoted by gita press Kalyan ram vachanamrit popularly known as ram gita of skandpuran
हे श्री राम! ब्रह्मा, विष्णु, महेश आदि सारे देवता आप से ही उत्पन्न हो कर आप में ही विलीन हो जाते हैं। आप ही परम् तत्व है, आप ही परम् पद हैं, आप ही परम् ब्रह्म है और आप ही एकमात्र शरणदाता हैं। तत् त्वं असि यह वेदान्त महावाक्य द्वारा उपपादित आप के मंत्र के तत्व का अर्थ का निरुपन करता है। आपको नमस्कार है।
Hey Shri Ram! All the gods like Brahma, Vishnu, Mahesh etc. are born from you and merge in you. You are the supreme element, you are the supreme position, you are the supreme Brahman and you are the only refuge. Tat Tvam Asi This represents the meaning of the essence of your mantra as derived from the Vedanta Mahavakya. Greetings to you.
Moreover in ram gita of adbhut ramayan, shri Ram has shown viswarup to hanuman which is written again in Mahabharata van parv but this time it's shown to parshuram.
Answer: Bhagawān Shiva was not present in the the Vishwaroopam neither in Vibhootis of B.G.:

"pasyami devam stava deva dehe |
sarvams tatha bhuta-visesa-sanghan |
brahmanam isam kamalasana-stham |
rsims ca sarvan uragams ca divyan |" (BG. 11:15).

The phrase in 11.15 is "brahmanam isham kamalasana-stham". Because the word "isham" appears between "brahmanam" and "kamala-asana-stham" it is a designation of Brahma who sits on the lotus, and hence the CORRECT translation should be - "Brahma who is the lord, is found seated on his lotus seat". It very strongly proves that the sandwiched "Isham" is the quality of lordship and not a proper name. Therefore it refers to Brahma and states, "Lord Brahma is seated on a lotus".
Ramanuja and Madhva both suggest that "isha" means Shiva who is seated on Brahma who is on the lotus seat. In his Bhashya Ramanuja writes, "tatha isham kamalasana-stham kamalasane brahmani sthitam" and Madhva follows Ramanuja here. However Adi Shankaracharya CORRECTLY interprets it that "isham" refers to Brahma in this verse and not to Shiva. In his bhashya Shankaracharya writes, "brahmanam chatur-mukham isham ishataram prajanam kamalasana-stham" and all the western translators (including Robert Zaehner who followed Ramanuja throughout differs with him and adopts Shankara's interpretation as correct for this verse) follow Shankara. Brahma is "isham" because of his lordship over all creatures. Adi Shankaracharya is more reliable saint than the Ramanuja and Madhwa because of being a secular acharya. Hence here Shankara's words needs to be taken as true.
Even the great Sanskrit scholar Mr. Kesari Mohan ganguly (KMG) who translated the Vyasa Mahabharata from Sanskrit to English in the period 1883-1896; even he did not err the way Ramanuja and Madhava erred in translating verse BG 11:15. He didn't give importance of word "isha" at all. He simply translated it as follows:

"Arjuna said, 'I behold all the gods, O God, as also all the varied hosts of creatures, (and) Brahma seated on (his) lotus seat, and all the Rishis and the celestial snakes. I behold Thee with innumerable arms, stomachs, mouths, (and) eyes, on every side...."

Fixing B.G. 11.15.  Isham translation problem in respect to Sri Adi Shankaracharya, Sri K.M.G, and Sri Vaishnava scholars.:

Bhagawān Shiva is called as possessing Vishwaroopa in Vedas - "vishwaroopebhyo namah" (Sri Rudram of Yajurveda).
As for Vibhootis,
In 'Vibhooti Yoga' chapter 10 of Bhagwad Gita Sri Krishna says.:

"rudrAnAm sankaraschAsmi |" (BG. 10:23).
"Among the Rudras I'm Shankara".

In the present Kalpa the names of the eleven Rudras are.:

Mahadeva, 2. Shiva , 3. Maha Rudra, 4. Shankara, 5. Neelalohita, 6. Eshana Rudra, 7. Vijaya Rudra, 8. Bheema Rudra, 9. Devadeva, 10. Bhavodbhava and 11. Adityatmaka Srirudra.

Their 11 consorts of these 11 Rudras in this present Kalpa are respectively the following names.:

Dhee devi, 2. Dhritti devi, 3. Ushna (Rasala) devi, 4. Uma devi, 5. Neeyut devi, 5. Sarpi devi, 7. Eela devi, 8. Ambika devi, 9. Ieravati devi, 10. Sudha devi and 11. Deeksha devi

So, among these 11 Rudras he is no. 4 viz Shankara.
As for Lord Rama.:

पवन: पवतामस्मि राम: शस्त्रभृतामहम् |
झषाणां मकरश्चास्मि स्रोतसामस्मि जाह्नवी || B.G. 10.31||
Amongst purifiers, I am the wind, and amongst wielders of weapons, I am Lord Ram. Of water creatures, I am the crocodile, and of flowing rivers, I am the Ganges.

Why Lord Rama was not shown is Vishwaroop.?
It's like asking why Kurma, Matsya, Varaha, Narsimha, etc were not seen in Vishwaroop.?
Well, it's because their source Lord Vishnu was already there. That's why.
Srimad Devi Bhagwatam Mahā Puranam 5:1:12-54. says thus.:

12-54. Vyāsa said :- ". . . Śiva is the God of gods; and He is the Lord of all the causal bodies that exist; in the state of Suṣupti (deep sleep). In this respect, Śiva is the creator of Viṣṇu and Viṣṇu worships Him in this light. Rāma, Kṛṣṇa and others are all part incarnations of Viṣṇu; so there is no wonder if they worship Śiva......."

I hope this clarifies all your queries. Prd..
Comment: **Comments have been [moved to chat](https://chat.stackexchange.com/rooms/146266/discussion-on-answer-by-sri-shiva-charan-ke-ds-vishnu-why-does-krishna-vishwaro); please do not continue the discussion here.** Before posting a comment below this one, please review the [purposes of comments](/help/privileges/comment). Comments that do not request clarification or suggest improvements usually belong as an [answer](/help/how-to-answer), on [meta], or in [chat]. Comments continuing discussion may be removed.


Adding items to a List / defensive programming

Question: Explicitly checking/handling that you don't hit the 2^31 - 1 (?) maximum number of entries when adding to a C# List is crazyness, true of false?
(Assuming this is an app where the average List size is less than a 100.)
Answer: 1. Memory limits
Well, size of System.Object without any properties is 8 bytes (2x32 bit pointers), or 16 bytes in 64-bit system. [EDIT:] Actually, I just checked in WinDbg, and the size is 12bytes on x86 (32-bit).
So in a 32-bit system, you would need 24Gb ram (which you cannot have on a 32-bit system).
2. Program design
I strongly believe that such a large list shouldn't be held in memory, but rather in some other storage medium. But in that case, you will always have the option to create a cached class wrapping a List, which would handle actual storage under the hood. So testing the size before adding is the wrong place to do the testing, your List implementation should do it itself if you find it necessary one day.
3. To be on the safe side
Why not add a re-entrance counter inside each method to prevent a Stack Overflow? :)
So, yes, it's crazy to test for that. :)
Answer: Seems excessive. Would you not hit the machine's memory limit first, depending on the size of the objects in your list ? (I assume this check is performed by the user of the List class, and is not any check in the implementation?)
Perhaps it's reassuring that colleagues are thinking ahead though ? (sarcasm!)
Answer: It would seem so, and I probably wouldn't include the check but I'm conflicted on this. Programmers once though that 2 digits were enough to represent the year in date fields on the grounds that it was fine for the expected life of their code, however we discovered that this assumption wasn't correct.
Look at the risk, look at the effort and make a judgement call (otherwise known as an educated guess! :-) ). I wouldn't say there's any hard or fast rule on this one.
Answer: As in the answer above there would more things going wrong I suspect than to worry about that. But yes if you have the time and inclination that you can polish code till it shines!
Answer: True
(well you asked true or false..)
Answer: Just tried this code:
<code>List<int> list = new List<int>();
while (true) list.Add(1);
</code>
I got a System.OutOfMemoryException. So what would you do to check / handle this?
Comment: You catch OutOfMemoryException.  OOMs can usually be handled and the operation retried in a minute or to. E.g. two separate threads ask for lots of memory, only 1 gets it. Try the second later. Can sometimes occur if your app does PDF or image manipulation in memory.
Answer: If you keep adding items to the list, you'll run out of memory long before you hit that limit. By "long" I really mean "a lot sooner than you think".
See this discussion on the large object heap (LOB). Once you hit around 21500 elements (half that on a 64-bit system) (assuming you're storing object references), your list will start to be a large object. Since the LOB isn't compacted in the same way the normal .NET heaps are, you'll eventually fragment it badly enough that a large enough continous memory area cannot be allocated.
So you don't have to check for that limit at all, it's not a real limit.
Answer: Yes, that is crazyness.
Consider what happens to the rest of the code when you start to reach those numbers. Is the application even usable if you would have millions of items in the list?
If it's even possible that the application would reach that amount of data, perhaps you should instead take measures to keep the list from getting that large. Perhaps you should not even keep all the data in memory at once. I can't really imagine a scenario where any code could practially make use of that much data.


What is the best free iOS wallet out there?

Question: I only ask this question because there's so many kinds of wallets out there and I understand the difference between wallets(hardware wallets, iOS and Desktop wallets). But what is the best wallet in your opinion? would you be recommending that wallet to someone that's located in Asia?
Comment: https://bitcoin.org/en/choose-your-wallet?step=5&platform=ios
Answer: I personally like Blockstream Green as in addition to being simple to use, it has many features about security and privacy
Answer: I like Blockstream Green (they have multisig, with 2FA for larger payments, so extra security) and BlueWallet (sometimes you might prefer singlesig for enhanced privacy + they have Lightning Network support in addition to on-chain Bitcoin).


How do bicycle and motorcycles turn?

Question: How do bicycles manage to turn without falling. According to my intuition when the rider tilts the bike it should start falling down. In reality though bicycles manage to continue moving without falling because of their speed. Does speed generate a force that counter the weight?
Comment: Related: http://physics.stackexchange.com/q/506/2451 , http://physics.stackexchange.com/q/24/2451 and links therein.
Answer: Have you ever felt about to tilt when turning shapely while driving fast in a car? The biker feels the same (and this has a bigger effect on bikes and trucks with higher centers of mass), so he makes a "counter" tilt to compensate.
When the wheels on a vehicle turn, the centre of mass (CoM) wants to continue. This feeling is the well-known "centrifugal" effect. The whole vehicle tilts a tiny bit now that only the wheels are being pulled in by friction - car suspensions e.g. compress a bit at the outer wheels and elongate a bit at the inner wheels of the turn.
During this tiny tilting, the CoM is moved. It must stay between the car wheels. If it is further out than the outer wheels, the car has been tilted enough to roll over.
Same for a bike - or a truck for that matter.

A truck has larger wheel distance, but also a CoM higher up. So a small tilting moves the CoM further.
On a bike the "distance" is the contact to the road of just one wheel width. This is why a bike will never stand by itself. The driver must constantly place his weight correctly to keep the combined CoM directly above the wheel's contact point with the road. (there are some small gyro forces helping him as well that depend on the wheel masses and how fast they spin - those are the reason a bike wheel can't stand on its own, but it can roll on its own).

When the bike turns, the same tilting tendency as for the other vehicles happens, and the biker must compensate by intentionally tilting opposite. He doesn't fall down, because the swing in the turn tries to lift him up to tilt the other way out of the circle.
Comment: Strange as it may seem when a motorcyclist wants to make a turn he actually steers in the opposite direction. It's called counter steering.  The heavier the bike and the faster the speed the more counter steering is noticed and needed. At slow speeds and on a light bike a rider's lean will move the bike over. I had a 800 pound Harley and at higher speed I had to really push the handle bars hard to the left to go right and vice versa. Look it up. It's and interesting topic that will help your understand of the turning dynamics of a bike. It's called counter steering.

How do bicycle and motorcycles turn?


dark glass/liquid problems

Question: the small project I'm working on involves a glass cup with large variations in depth, but has a square of really darkened liquid/glass, and I can't seem to fix it. I've tried the many suggestions from other posts to turn up the max light bounces, but at 1024 it makes the rest appear to glow slightly, and the center is still dark. this was based roughly on blender guru's coffee cup tutorial.
Comment: that looks like it might be a case of flipped normals or duplicate faces.  Select the mesh that the dark spot is in, go to edit mode and try SHIFT-N to recalculate normals.  If that doesn't work, maybe post your blend file in your questions ([How to add a blend file](https://blend-exchange.com/help))
Answer: The biggest influencer here is Glossy parametr ... 0-1-2-3-4-5

Light Paths > Preset > Limited Global Illumination

Light Paths > Preset > Full Global Illumination

Things that makes a differens ...
... if Glass penetrates a solid object (like a floor) or not ... left T is above / right T is bellow.

... World environment ... left white color / right Image Texture.

So what worked here for Limited GI ...  Total 128, GLossy 128, Caustics enabled.

dark glass/liquid problems