what is the differences between sql server authentication and windows authentication..?

Question: What is the difference between SQL Server Authentication and Windows Authentication?
Is there a specific use case for each type of authentication?
Answer: SQL Server has its own built in system for security that covers logins and roles. This is separate and parallel to Windows users and groups. You can use just SQL security and then all administration will occur within SQL server and there's no connection between those logins and the Windows users. If you use mixed mode then Windows users are treated just like SQL logins.
There are a number of features of each approach -

If you want to use connection pooling you have to use SQL logins, or all share the same Windows user - not a good idea.

If you want to track what a particular user is doing, then using the Windows authentication makes sense.

Using the Windows tools to administer users is much more powerful than SQL, but the link between the two is tenuous, for instance if you remove a Windows user then the related data within SQL isn't updated.
Comment: Same windows user for connection pooling isn't a bad idea if they are services (or web services) and you still get a benefit for individual users too (but you'll have a lot more connections in a lot more pools)
Answer: SQL Authentication
SQL Authentication is the typical authentication used for various database systems, composed of a username and a password. Obviously, an instance of SQL Server can have multiple such user accounts (using SQL authentication) with different usernames and passwords. In shared servers where different users should have access to different databases, SQL authentication should be used. Also, when a client (remote computer) connects to an instance of SQL Server on other computer than the one on which the client is running, SQL Server authentication is needed. Even if you don't define any SQL Server user accounts, at the time of installation a root account - sa - is added with the password you provided. Just like any SQL Server account, this can be used to log-in localy or remotely, however if an application is the one that does the log in, and it should have access to only one database, it's strongly recommended that you don't use the sa account, but create a new one with limited access. Overall, SQL authentication is the main authentication method to be used while the one we review below - Windows Authentication - is more of a convenience.
Windows Authentication
When you are accessing SQL Server from the same computer it is installed on, you shouldn't be prompted to type in an username and password. And you are not, if you're using Windows Authentication. With Windows Authentication, the SQL Server service already knows that someone is logged in into the operating system with the correct credentials, and it uses these credentials to allow the user into its databases. Of course, this works as long as the client resides on the same computer as the SQL Server, or as long as the connecting client matches the Windows credentials of the server. Windows Authentication is often used as a more convenient way to log-in into a SQL Server instance without typing a username and a password, however when more users are envolved, or remote connections are being established with the SQL Server, SQL authentication should be used.
Comment: @MSIS It depends ! The SQL user has to have some rights on each database to access them, but if the user has some special rights (sysadmin or so) it may have access to each db
Comment: You can also use Windows Authentication without providing UserName and Password (so SQL Server Management Studio uses the User that launched the application) to connect to distant SQL Server.
Comment: @Camille G , If you are authenticated with SQL authentication, does that allow you access to any database in the system?
Answer: Ideally, Windows authentication must be used when working in an Intranet type of an environment.
Whereas, SQL Server authentication can be used in all the other type of cases.
Here is a link which might help.
Windows Authentication vs. SQL Server Authentication
Answer: When granting a user access to a database there are a few considerations to be made with advantages and disadvantages in terms of usability and security. Here we have two options for authenticating and granting permission to users. The first is by giving everyone the sa (systems admin) account access and then restricting the permissions manually by retaining a list of the users in which you can grant or deny permissions as needed.  This is also known as the SQL authentication method. There are major security flaws in this method, as listed below. The second and better option is to have the Active Directory (AD) handle all the necessary authentication and authorization, also known as Windows authentication. Once the user logs in to their computer the application will connect to the database using those Windows login credentials on the operating system.
The major security issue with using the SQL option is that it violates the principle of least privilege (POLP) which is to only give the user the absolutely necessary permissions they need and no more. By using the sa account you present serious security flaws. The POLP is violated because when the application uses the sa account they have access to the entire database server. Windows authentication on the other hand follows the POLP by only granting access to one database on the server.
The second issue is that there is no need for every instance of the application to have the admin password. This means any application is a potential attack point for the entire server. Windows only uses the Windows credentials to login to the SQL Server. The Windows passwords are stored in a repository as opposed to the SQL database instance itself and the authentication takes place internally within Windows without having to store sa passwords on the application.
A third security issue arises by using the SQL method involves passwords. As presented on the Microsoft website and various security forums, the SQL method doesn't' enforce password changing or encryption, rather they are sent as clear text over the network. And the SQL method doesn't lockout after failing attempts thus allowing a prolonged attempt to break in.  Active Directory however, uses Kerberos protocol to encrypt passwords while employing as well a password change system and lockout after failing attempts.
There are efficiency disadvantages as well. Since you will be requiring the user to enter the credentials every time they want to access the database users may forget their credentials.
If a user being removed you would have to remove his credentials from every instance of the application. If you have to update the sa admin password you would have to update every instance of the SQL server. This is time consuming and unsafe, it leaves open the possibility of a dismissed user retaining access to the SQL Server. With the Windows method none of these concerns arise. Everything is centralized and handled by the AD.
The only advantages of using the SQL method lie in its flexibility. You are able to access it from any operating system and network, even remotely.  Some older legacy systems as well as some web-based applications may only support sa access.
The AD method also provides time-saving tools such as groups to make it easier to add and remove users, and user tracking ability.
Even if you manage to correct these security flaws in the SQL method, you would be reinventing the wheel. When considering the security advantages provided by Windows authentication, including password policies and following the POLP, it is a much better choice over the SQL authentication. Therefore it is highly recommended to use the Windows authentication option.
Answer: If you wish to authenticate the users against windows system users [created by Administrator] then in that case you will go for Windows Authentication in your Application.
But in case you want to authenticate the users against set of users available in your application database, then in that case you will want to go for SQL Authentication.
Precisely if your application is an ASP.NET web-app, then you can use standard Login controls which depend on Providers like SqlMembershipProvider, SqlProfileProvider. You can configure your login controls and your application whether it should authenticate against windows users or app-database users. In the first case it will be called Windows Authentication and the later will be known as Sql Authentication.
Comment: Hey, you look a little young to be using terms like "domain infrastructure" - should I fear the upcoming generation? :-)
Comment: Hi Pax, I agree that's not the correct word. I will edit that with proper remark. Thanks for the comment.
Answer: I don't know SQLServer as well as other DBMS' but I imagine the benefit is the same as with DB2 and Oracle. If you use Windows authentication, you only have to maintain one set of users and/or passwords, that of Windows, which is already done for you.
DBMS authentication means having a separate set of users and/or passwords which must be maintained.
In addition, Windows passwords allow them to be configured centrally for the enterprise (Active Directory) whereas SQLServer has to maintain one set for each DBMS instance.
Answer: I think the main difference is security.
Windows Authentication means that the identity is handled as part of the windows handashaking and now password is ever 'out there' for interception.
SQL Authentication means that you have to store (or provide) a username and a password yourself making it much easier to breach.  A heap of effort has gone into making windows authentication very robust and secure.
Might I suggest that if you do implement Windows Authentication use Groups and Roles to do it.  Groups in Windows and Roles in SQL.  Having to setup lots of users in SQL is a big pain when you can just setup the group and then add each user to the group.  (I think most security should be done this way anyway).
Answer: SQL Server Authentication Modes
SQL Server 2008 offers two authentication mode options:
Windows authentication mode requires users to provide a valid Windows username and password to access the database server. In enterprise environments, these credentials are normally Active Directory domain credentials.
Mixed authentication mode allows the use of Windows credentials but supplements them with local SQL Server user accounts that the administrator may create and maintain within SQL Server.
Answer: Authentication is the process of confirming a user or computer's identity. The process normally consists of four steps:
The user makes a claim of identity, usually by providing a username. For example, I might make this claim by telling a database that my username is "mchapple".
The system challenges the user to prove his or her identity. The most common challenge is a request for a password.
The user responds to the challenge by providing the requested proof. In this example, I would provide the database with my password
The system verifies that the user has provided acceptable proof by, for example, checking the password against a local password database or using a centralized authentication server
Answer: Mssql Authentication is highly preferable where possible. It allows you to conform with an existing windows domain already used at your workplace, and you don't have to know your user's passwords.
However, It seems that it would not be possible for use in the occasion that the server's machine does not authenticate to your local workplace's intranet.
If you use sql authentication, security will be entirely up to you.
If you use microsoft authentication, security is essentially taken care of for you, but you'll be dealing with additional restrictions.


How to prevent Jupyter Notebook download PDF from printing outside of margin?

Question: In Jupyter Notebook, via "File- Download as - PDF via LaTeX (.pdf)", I downloaded my notebook as a pdf file. However, many of my code blocks get printed outside of the PDF page margins - i.e. for longer code lines, they get cut out at the pdf page right border. Any way to fix this so that I can have a readable PDF doc (other than manually add hard returns for each line or the way suggested in this post? Thanks!
Answer: I was having the same problem.  Ultimately, I found the answer at:
http://www.markus-beuckelmann.de/blog/customizing-nbconvert-pdf.html
Basically, it involves adding a custom latex template that wraps lines.  He also adjusts some of the font sizes so that the need for wrapping is less.
I did find one bug.  His code is missing the final end macro line:
<code>((*- endmacro *))
</code>
I put the file in ~/anaconda2/lib/python2.7/site-packages/nbconvert/templates/latex .  The location will vary depending on your installation. I'm using anaconda 4.3.1 (Jupyter 4.3.1 as well?)
Actually what I did was rename the existing article.tplx, changed the "extends 'article.tplx' " reflect the new name, and wrote the new template as article.tplx .  That way I can change the templates without having to restart the server.


Where/how does innodb store tables in files?

Question: I read somewhere that InnoDB can store all the tables in a single file or in separate files. Is this a configuration option? What is the default setting? A file for all tables or a file per table? What is the recommended setting?
Answer: The setting is innodb_file_per_table, and it's default 0 (ie. use one big file) up to MySQL 5.1, and then in either 5.5 or 5.6 the default changed. Changing this value will not affect tables which already exist.
Even with innodb_file_per_table set to ON you still need the shared tablespace file (ibdata1 file by default).
There is no one recommended setting, it depends on your databases. Some advantages:
- It's easier to reclaim space from the file (you only need to reimport one table)
- It can be faster on ext* filesystems as they use inode level locking, and so splitting the accesses over multiple files will be alleviate this a little
Some disadvantages:
- It takes more space, as reclaimed space can only be used in the same table
- It takes longer to recover from an unclean restart
- It can be a big problem if you have a large number of tables (as you can hit an open files limit)
- I might be wrong with this one, but if the temporary tables aren't in the system tablespace a drop table can take a long time
What problem are you trying to solve?
Answer:
Innodb_file_per table controls if a single tablespace is used by InnoDB. If set to "1" a tablespace will be created for each table. It has effect from the time it was applied - existing tables are not changed. Using multiple tablespaces is in particular useful if you often drop large objects (tables or databases) as files will be deleted and the disk space reclaimed by the OS. With the setting of "0" dropping an object will not return diskspace to the OS.
A set of files with names such as ibdata1, ibdata2, and so on, that make up the InnoDB system tablespace.
Each InnoDB table created using the file-per-table mode goes into its own tablespace file, with a .ibd extension, inside the database directory. This file contains the table data and any indexes for the table. File-per-table mode, controlled by the innodb_file_per_table option, affects many aspects of InnoDB storage usage and performance, and is enabled by default in MySQL 5.6.7 and higher.

Conclusion:
So, it's always better to use InnoDB_file_per_table option and if are turning on this option in my.cnf make sure that you have taken a backup of InnoDB tables and restore those tables after service restart.Now, you will have all InnoDB tables with separate .ibd files


What are the eigenvalues of $L_+$ and $L_-$?

Question: I'm studying angular momentum in quantum mechanics. My question involves the operators $L_+=L_x+iL_y$ and $L_-=L_x-iL_y$; in a problem I have a Hamiltonian, $H$, depending an $L_y$, $L^2$ and $L_z$. The solutions suggest to write $L_y$ as a combination of $L_+$ and $L_-$ and then, using the eigenvectors of $L_z$ and $L^2$, write the matrix associated with $H$, and then diagonalize the matrix. How is this possible? How can $L_y$ and $L_z$ be diagonalized in the same basis?
 Sorry for bad English.
Comment: After you diagonalize the Hamiltonian  the resulting eigenfunctions will no longer be eigenstates of both $L_y$ and $L_z$.
Comment: Note that the ladder operators $L_{\pm}$ are _not_ [normal operators](https://en.wikipedia.org/wiki/Normal_operator), and hence are _not_ diagonalizable in an orthonormal basis (except for the singlet representation).
Comment: Perhaps you can post the question exactly and not "rephrase/interpret" it here?
Answer: If you write the matrix representation of $L_y$ in a basis where $L_z$ is diagonal, you should get (assuming $\ell=1$) something like
$$
\hat L_z=
\left(
\begin{array}{ccc}
 1 & 0 & 0 \\
 0 & 0 & 0 \\
 0 & 0 & -1 \\
\end{array}
\right)\, ,\qquad
\hat L_y=\frac{1}{2i} \left(
\begin{array}{ccc}
 0 & 1 & 0 \\
 -1 & 0 & 1 \\
 0 & -1 & 0 \\
\end{array}
\right) \tag{1}
$$
Of course $\hat L_y$ is not a diagonal matrix there is nothing to prevent you from writing the Hamiltonian and diagonalize the resulting matrix.  The eigenstates will not be eigenstates of either $L_y$ or $L_x$ but that's not a big deal: they will be expressed as combinations of your basis eigenstates of $L_z$
However, since $a L_y+b L_z$ commutes with $L^2$, the latter will still be diagonal.


Why can't you @reply more than one user?

Question: Why can't you @reply more than one user? It seems like I should be able to @reply at least two users. I've run into this problem several times now. Is there a reason why you can only @reply one user?
Answer: This would be useful on occasion, I can't deny...
But the rationale is simply that comments aren't meant for tangential discussion. The author of the post you're commenting on is always notified, regardless of whether he's "@-replied" to explicitly in a comment. Responding to one of these comments requires only a single @-reply. Allowing comments to notify multiple people could result in obnoxious behavior or harassment.
As Diago notes, this has been discussed several times over on MetaSO - this is a good example.
It's worth contrasting the design of comment @-notifications with those of chat, where you can notify multiple users in a single message:

Comments always notify the post-author, regardless of @... Chat messages appear to anyone in the room.
Comments can @-notify anyone who has ever commented / edited the post... Chat messages can notify anyone who has been in the room recently.
Comment notifications persist in your global SE inbox... Chat notifications produce a small indicator within chat, with an entry in the SE inbox only if you don't respond.
You can only leave one comment every 15 seconds... You can post multiple chat messages within that timespan.

In short, chat messages will only notify people who are probably expecting them, having recently joined a chat room for the purpose of chatting. Comments might notify people who've long ago forgotten about the topic. Making it easier to mass-notify multiple users via comments has a much larger "harassment" potential.
Comment: but then one could say chat is even more hidden than the comments, and there is no chance at all of a comment on chat bring invited enough that it gets out of the hidden section. If the both places you can have a conversation are hidden and both will require the answer to be edited in order for the answer to be corrected, you might as well have the conversation in the easiest to unhindered place, in the comments.
Comment: Basically what most people would like to use comments for, the powers that be don't like. Annoying, but you can get round it by making a second comment with the 2nd person's name and some random characters following it, then when they reply you can delete it or not.
Comment: Right. Because the idea is to have a question, followed by one or more answers, without a lot of extraneous chit-chat in between them. There *is* [a full-on chat system available](http://chat.stackexchange.com/) if you need a lot of back-and-forth with someone.
Comment: Compared to the main sites the chat sites aren't very used. Part of the point of StackExchange sites is to be a reference for people searching in the future, it's not a great reference if the discussion (which can help five an answer) is no longer there or is somewhere else you don't know about. Also the site hides long comment discussions so it doesn't create any mess.
Comment: Jonathan, you put your finger right on the problem of hosting long discussions on the main site: they're hidden. So it doesn't matter if there's some great conclusion arrived at eventually - the casual reader won't see it. For reasonably short discussions, the system's ability to "float" up-voted comments works pretty well, but before long you reach the point where the only good solution is to simply edit the answer to reflect the outcome. Which you can just as easily do in response to a conversation in chat (I've seen this done many times).
Comment: Except that, as you noticed, comments are fairly *hindered*. Y'know - only one @reply at a time, gotta wait 15 seconds between posts, manual refresh...
Comment: However they are imposed limits and could easily be removed. It would be better if the comments became like chat. So you still have the general chat rooms for each site etc, but specifc question/answer chats are found below the relevant question or answer. Making the whole UX more fluid and less broken up. Make the comments real time, allow more than @reply, and remove the limit, exactly like chat. And instead of clicking a link to go a to a seperate chat site (with a different UI than most users know on SE sites), the link simply expands the comment section as it does now.
Comment: Well, yeah, the comment system could have been expanded until it resembled what chat became... But that would have been a major, major change to the system - the system that is, after all, supposed to be centered around **Q&A**. I rather expect we'll see chat become more integrated into the site as time goes on, but there are significant challenges, both technical and social, to doing so properly. So for now, [comments are light-weight "Post-It notes"](http://apple.stackexchange.com/privileges/comment), and if you want serious discussion try using Chat.
Answer: From this Meta SO answer

You can explicitly notify one (1) other commenter or editor, by using @name, where name is the username with all spaces removed.

It contains most of the details behind the system, however the short answer is that it is related to the lack of display names, and it was really a system put in place as an afterthought, since it is not a defining feature of SE.


Overlapping spheres

Question: Say you have two spheres that are partially overlapping. How would I find the volume of the portion of one of the spheres that is not overlapping with the other based on how far apart the two spheres are and the spheres' individual radii?
Answer: You can see this at Mathworld or $V^{(2)}$ under Application in Wikipedia

If $d<r_1+r_2$ is the distance between the two sphere centers ... of two intersecting spheres of radii $r_1$ and $r_2$, ...
  $$V^{(2)} = \frac{\pi}{12d}(r_1+r_2-d)^2\left(d^2+2d(r_1+r_2)-3(r_1-r_2)^2\right)$$
  is the sum of the two spherical caps of the intersection.
Comment: I edited your answer to include the formula, as it is preferable that answers be self-contained. I also want to point out for the benefit of the asker that (i) the volume of the portion of one sphere not overlapping the other is simply the volume of the former sphere *minus* the intersection volume above, as in @rlgordonma's answer, and (ii) the formula will only work correctly if the *surfaces* of both spheres are intersecting, i.e. $\lvert r_1-r_2\rvert\le d\le r_1+r_2$.
Comment: @ℝⁿ. : Thanks ....
Answer: Assume that the 2 spheres have equal radii.  The volume of the intersection is given by
$$V_I = 2 \pi \int_{-a}^{-d/2} dx \: (a^2-x^2)=\frac{4 \pi}{3} a^3-\pi d \left (a^2-\frac{d^2}{12}\right)$$
where $a$ is the radius of each sphere and $d$ is the separation between the centers of the spheres.  So the volume in a sphere outside of the intersection is
$$\pi d \left (a^2-\frac{d^2}{12}\right)$$
For the general case, assume that the spheres have radii $a$ and $b>a$.  The geometry of the intersection is a lens of thickness $d$, the thickness of the lens surface of radius $a$ being
$$t_a = \frac{a^2-(b-d)^2}{2 d}$$
and that of the lens surface of radius $b$ is
$$t_b = \frac{b^2-(a-d)^2}{2 d}$$
The volume of the lens is then
$$\begin{align}V_I &= \pi \int_{a-t_a}^a dx \: (a^2-x^2) + \pi \int_{-b}^{-b+t_b} dx \: (b^2-x^2)\\ &=\frac{\pi}{12 d}(a+b-d)^2 \left(2 d (a+b)+9 (b-a)^2+d^2\right) \end{align}$$
To get the volume outside of this lens in either sphere, subtract $V_I$ from either $\frac{4 \pi}{3} a^3$ or $\frac{4 \pi}{3} b^3$.
Comment: I don't think the answer specifies that the radii are equal. // Even if they are, your solution doesn't match the references in Ross's answer, and gives zero volume of intersection when the spheres are coincident.
Comment: @$\mathbb{R}^n$: thanks, error corrected.  Limiting cases check out.  As for the spheres being equal, well, I'll leave it to the OP to verify the scope of the problem.
Comment: So what if the radii are not equal? Replace 'a^2' with 'a*b' for each radius?
Comment: @Waffle: I don't think it is that simple.  The geometry gets somewhat complicated.  It is doable, and if you interested, I will show it.
Comment: What I'm really trying to do is have one sphere come out of another sphere at a constant speed, where after the sphere is completely out of the other sphere, the total volume (with half the mass of the overlapping space) never changes, and the two spheres end up with equal volumes. This was the first possible equation I thought I might need, but I'm not exactly sure if I'm going the right way.

Overlapping spheres


Calculating amount of CPUs for running Virtual Servers

Question: I am looking to replace 2 servers with one server and run the original servers as virtual machines. I am looking to use Windows Server 2016 as the hardware server and the VMs also running Windows Server 2016. I am wondering about the math that goes into the amount of memory and CPUs I need for each VM that the hardware server should have. Currently both servers run 8 CPUs and 48GB or RAM. I done some research and they are saying to have 4 extra cores besides each VM to run the hardware server. Many hardware manufacturers only look like I will be able to run 2 or 3 Virtual Servers on them. Is my math or understanding wrong or is there a rule of thumb to calculation the amount of CPUs and RAM to run virtual servers on a hardware server.
Comment: Possible duplicate of [Can you help me with my capacity planning?](https://serverfault.com/questions/384686/can-you-help-me-with-my-capacity-planning)
Comment: @AndrewSchulman I would tend to agree but I am looking for some understanding or rule of thumb for replacing actual hardware with virtual based on the hardware specs only. Not load or usage.
Answer: The most important factor in this is not what resources the physical machines have but instead what they actually need. Depending on your performance requirement you can move between two extremes:

If you absolutely require the performance of the 8 physical cores, you must reserve an equal amount of cores in a virtualization host (and of course, have some left for the host OS). At that point, you also have to make sure that the virtual cores deliver a similar performance.
The other extreme is that you see you are on average have e.g. 5% CPU utilization. Then you could run 15-20 virtual machines on the same 8 physical cores (again with spares for the host OS) and expect on average similar performance (and a lot worse one if they happen to all peak at the same time).

In reality, you have to find a middle ground that makes sense for your specific application.
Similar calculations can be done for memory requirements.
Comment: Wouldn't running all those machines on 8 cores make them run EXTREMELY slow?
Comment: Why should this be the case? The VM host will divide the CPU time between the VMs just like the kernel schedules time for many processes even on a single core. 5% utilization means the system is idle 95% of the time...
Comment: so if I am looking to run 2 8 core Servers with 48GB RAM each they can share the same CORES?
Comment: Potentially yes, depending on the load pattern.
Comment: load is constant up to 25% to 50% and up to 75% based on day. Would that warrant giving each VM its own set of CPUs?


Yumdownloader downloads packages of different architecture also

Question: On a x86_64 machine, if I run the command - yumdownloader <pkg_name> , it downloads both i686 and x86_64 arch packages whereas on a i686 machine, it only downloads the i686 package. How to fix this ? Any other solution other than giving the archlist option,please
Answer: To automatically exclude i686 packages:
yumdownloader -x '*i686'

Comment: nice answer, exactly
Comment: Similar question and answer https://unix.stackexchange.com/a/770024/95675
Answer: One possibility: in /etc/yum.conf, you can change multilib_policy from "all" to "best" if by default you want to match x86_64.
You can also specify the architecture after pkg_name. For example yumdownloader guile.x86_64.
But here's what's going on which indicates how to "fix". When you don't use --archlist or give the architecture, a package like "guile", "guile" will match the two packages "guile.x86_64" and "guile.i686" provided all the dependencies each package needs is provided.
So the lousy feedback loop you have here is the more times you install two versions of a package, such as not by giving --archlist or by indicating the arch in the download, the more likely in the future installing or downloading will match more than one package because that will more likely that you will have both dependencies satisfied.
So the another more tedious way to handle this is to find the dependencies of a package and in those cases where there are i686 versions, remove those. That will require you to remove more and more i686 package and you'll probably want to make sure there are x86_64 versions of those. In some cases, there might not be, or it might be okay not to have that other package.
If you built this system in in an automated way such from a script fed into anaconda or a configuration management system like puppet or chef, when you list the packages to load, you'll probably want to add the arch x86_64 after package names (e.g guile.x86_68 rather than guile) to reduce the problem of every package getting installed in both a 32-bit or 64-bit way.
Finally, I should note that there are no doubt some packages that only exist in 32-bit forms.


Is this the correct formula for dopamine?

Question: Google says that $C8H11NO2$ is the correct formula for dopamine. Is this so?
Comment: I'm voting to close this question as off-topic because it is trivial to answer with a search engine.
Comment: Without meaning to be rude, you could work this out, given that you know how to use google. Search for the molecular structure. To help you along, the CAS number for dopamine is 51-61-6.
Comment: Do you have a particular reason to suspect that google is wrong?
Answer:
Take a look at the structure, you can easily work it out for such a small molecule.
Lets start with the really obvious ones:
Oxygens: 2
Nitrogens: 1
You then have to recognise that in a skeletal formula, the carbons are simply represented by 'corners' (i.e. where two lines meet):
Carbons: 8
Finally, you need to work out how many hydrogens are present. Hydrogens attached to heteroatoms (Oxygen and nitrogen) are shown, hydrogens attached to carbon are not, and hence you have to rely on your chemistry knowledge to work out how many should be attached to each carbon:
Hydrogens: 11
In short, yes, the formula is right for dopamine.


Does Soft Proofing to a different profile modify the actual photo

Question: Am I right in thinking the difference between using Soft Proofing  to a different colour profile (in Photoshop for example) and just changing the colour profile is that with Soft Proofing use of the Relative/Perceptual options (in Photoshop) actually modifies the values of the pixels before changing profile so when the profile is changed more of the pixels are properly mapped to the new colour model.
Answer: Usually not, although I guess it could be done that way. Normally though, pixels are passed though a color transformation on the display path. Some software use a full color matrix but most and certainly hardware based solutions use a 3D LUT (Look-Up-Table) for efficiency.
This means that the same pixel values remain in the image but go through the LUT which sends different values to the display. The 3D LUT does not cover every possible point in the input space so we usually interpolate in-between.
Comment: My plan was to use soft proofing to firstly display version of the image with the same cmyk profile (fogra27) as used by the printer so I can confidently see whether there were any issues, then make adjustments if there were and then export with fogra27 profile.  You seem to be implying its just a display only thing but if I just export as rgb and there are values in there that when converted to CMYK colour space cannot be converted to the fogra7 profile Im the at the mercy of what the printshop does (and there seems to be an issue with blue/greens)
Comment: I think my question was bit unclear it was about the difference between the image displayed when you softproof and the image created when export image using a particular colour profile, I think I should ask a new/different question.


In this sentence she gets depressed/disappointed when she says the last sentence or just the last words?

Question: In the sentence 最後の言葉の時だけほんの少し俯いたけど when she says she got depressed or disappointed, it refers to how many words of the last sentence she said (or maybe the whole sentence as she had said 3 long sentences in a row).
Comment: It totally depends on context.
Comment: 言葉 is "a piece of speech" so it can really mean anything from a single particle to a 90-minute lecture. If you believe a certain part is independent or outstanding enough from the other, then it could be that piece.
Comment: Without any context it just means the last words? The girls makes a sigh and the last words are separated by the ellipsis (...) so normally it would just refer to that? (you can tell me just the general use).
Answer: Generally, when someone is emotionally affected by 最後の言葉, it means not the exact the last word, but the last whole sentence or some of last sentences which convey one meaningful content.
We use the similar expression like this as

結婚式{けっこんしき}で新婦{しんぷ}はお父{とう}さんの最後{さいご}の言葉{ことば}の時{とき}だけ少{すこ}し涙{なみだ}が出{で}た.

In this case general translation will be like;

The bride cried a little only at the last part of her father's speech at the wedding ceremony.


Difference between INNER JOIN and WHERE?

Question: First Query:
Select * from table1 inner join table2 on table1.Id = table2.Id

Second Query:
Select * from table1, table2 where table1.Id = table2.Id

What is difference between these query regarding performance which should one use?
Comment: As far as the optimizer is concerned, there is no difference. The optimizer will select identical plans for both your queries. Personally, I prefer the `inner join` syntax.
Answer: The two statements you posted are logically identical. There isn't really a
practical reason to prefer one over the other, it's largely a matter of
personal style and readability. Some people prefer the INNER JOIN syntax and
some prefer just to use WHERE.
Refering to Using Inner Joins:

In the ISO standard, inner joins can
  be specified in either the FROM or
  WHERE clause. This is the only type of
  join that ISO supports in the WHERE
  clause. Inner joins specified in the
  WHERE clause are known as old-style
  inner joins.

Refering to Join Fundamentals:

Specifying the join conditions in the
  FROM clause helps separate them from
  any other search conditions that may
  be specified in a WHERE clause, and is
  the recommended method for specifying
  joins.

Personaly, I prefer using INNER JOIN. I find it much clearer, as I can separate the join conditions from the filter conditions and using a seperate join block for each joined table.
Comment: +1 for preferring the inner join syntax.  I find it much more reasonable as it explicitly states what you are trying to do.
Answer: To amplify @Akram's answer - many people prefer the inner join syntax, since it then allows you to more easily distinguish between the join conditions (how the various tables in the FROM clause relate to each other) from the filter conditions (those conditions that should be used to reduce the overall result set. There's no difference between them in this circumstance, but on larger queries, with more tables, it may improve readability to use the inner join form.
In addition, once you start considering outer joins, you pretty well need to use the infix join syntax (left outer join,right outer join), so many find a form of symmetry in using the same style for inner join. There is an older deprecated syntax for performing outer joins in the WHERE clause (using *=), but support for such joins is dying out.


Using Times New Roman for academic paper without license?

Question: As far as I understand Times New Roman is not a free font but a license to use it for personal purposes is included in products like Microsoft Word. Suppose I do not own a copy/license to any such product that includes the font. Can I legally just download the font from the internet and use it to write and publish an academic paper?
Comment: Usually when someone "publishes" a paper, it goes through a publisher, who owns the fonts. What do you mean "publish," if not that?
Answer: It is not legal to copy fonts that happen to be findable on the internet but not licensed for your use: that is copyright infringement. Certain fonts may be automatically sub-licensed to you via the operating system, but let's say that you found a font on a pirate site and downloaded it. That is copyright infringement, which is illegal. Personal-use infringement often receives the benefit of the blind eye so you may be able to "get away with it".
"Publication" is a very broad and non-legal term. You can submit a manuscript created with a pirated font, and a professional publishing house will substitute licensed fonts. But these days, many publications are self-publications, so it is possible (depending on format) but rare to actually embed a font in a document. That would be infringement as well, and more likely to get the attention of the copyright holder. It would definitely be infringement to upload the pirated fonts along with the document and encourage people to copy those fonts illegally along with the document.
Comment: Im not following your discussion of embedding fonts here. Are you saying embedding fonts is always prohibited unless you have a license specifying it is allowed? Or is it always allowed but not okay if you didnt acquire the font legally? If embedding is prohibited without a license can you elaborate on how this violates copyright given that the US doesnt extend copyright protection to character glyphs? Does it depend on how the font is embedded?
Comment: Copying in the first place is prohibited. Embedding is just another instance of copy, except it is more likely to catch the rights owner's attention, when you distribute the work with the embedded file. The file, *qua* software is protected, even when the shapes are not. "Embedding" generally means "insert a copy of the software inside the file", so if you mean something else, you should explain what other meaning you have in mind.
Answer: The question of whether publishing a document that uses a font is a violation of the copyright of that font depends on the method used for publication, but leaving that aside, in the specific case of the font Times New Roman, the answer is a qualified yes.
Times New Roman was one of the fonts included in Microsoft's Core Fonts for the Web package in the late 1990s. This was a package of specific fonts which Microsoft made available for free distribution. The license that was used specifically allowed redistribution of the fonts as long as they remained in their original form and were not sold or bundled for profit.
Microsoft discontinued the project a few years later, and newer versions of the fonts are no longer available under the same license, however the original font license remains in effect for the specific versions which were released under it.
This version of Times New Roman is quite old and has a limited character set, but it's still usable. As long as you distribute the original font package unchanged with the EULA intact, and do not sell it, you are allowed to distribute an unlimited number of copies of the font.


Gamma Ray Spectroscopy in detecting hydrogen

Question: My professor explained saying that bombarding the surface with cosmic rays breaks off a few neutrons from nuclei and the nucleus, having undergone a change in energy level, emits a gamma photon. The neutrons thus emitted are typically of two categories- the fast-moving ones that have undergone little or no interaction with other nuclei, and thermal neutrons that are much slower. Apparently measuring the ratio of fast-moving and thermal neutrons tells us a lot about the surface.
He went on to say that a low value of this ratio indicates the presence of lighter elements on the surface, particularly hydrogen. (Basic mechanics tells us that momentum transfer is maximum if the colliding objects have the same mass). This technique, he says, has been instrumental in detecting the hydrogen in water present in the Southern polar caps of Mars.
1)The hydrogen in water is not free. When the neutron collides with water, it collides with the water molecule as a whole, not just the hydrogen atom. This is no different from colliding with a heavy atom of the same mass. In that case, the neutrons shouldn't slow down much, at least, that's what I think. Help?
Answer:
When the neutron collides with water, it collides with the water molecule as a whole, not just the hydrogen atom. This is no different from colliding with a heavy atom of the same mass. In that case, the neutrons shouldn't slow down much, at least, that's what I think. Help?

The de Broglie wavelength of a massive particle is given by:
$$\lambda = \frac{h}{p} = \frac{h}{mv}.$$
Planck constant $h$ is really small (6.626 $\times 10^{-34}$ J s), so we can guess that the wavelength is small as well.
The slowest (and therefore longest wavelength) neutrons here will be thermal neutrons. At a temperature of say 100 Kelvin with
$$k_B T = \frac{1}{2} m v^2$$
and a mass of 1.675 $ \times 10^{-27}$ kg that thermal velocity is 1280 m/s.
That slow, "long wavelength" neutron has a wavelength of 3 Angstroms!
So in the case of thermal neutrons with kinetic energies of ~1/100 eV, they really do just elastically scatter off of atoms or molecules; the binding energies are much larger than this, so for scattering the recoil will really be the whole molecule.
But sometimes thermal neutrons are absorbed!
Sometimes thermal neutrons will be absorbed by nuclei, some of them have huge thermal neutron cross-sections like lithium-6, boron-10 or cadmium-113. In this case it immediately becomes a nuclear process and the decay sequence localized to the nucleus in question.
But what about protons (hydrogen) scattering energetic neutrons?
For energetic neutrons, say 1 MeV with a kinetic energy of say 1.3 $\times 10^{-13}$ joules, the wavelength is now about 0.0003 Angstroms or 30 femtometer (fermi) which means it will likely be localized at one nucleus within the molecule.
Most of the time it will either elastically or inelastically scatter off of the nuclei, be it a proton (hydrogen) or an oxygen nucleus.
Answer: The neutron collides with a nucleus, and it doesn't matter what atom or molecule that nucleus is part of. Collisions between particles of equal mass lead to more energy loss than collisions with a heavier particle, and therefore hydrogen nuclei slow down the neutrons the fastest.
The method detects elemental concentrations, not chemical species. However, if the concentration of H-nuclei is very high, then H2O is the only H-carrying species that is plausibly abundant enough.


Magento 2 - Tax remove from Grand Total

Question: How to i'll tax calculate in Magento 2. My tax prices is already added in catalog products prices. I just want to show 5% Vat tax on subtotal but don't want to add in Subtotal and Grand Total. Please help me regarding this issue. Thanks in advance. Please check below screenshot what's showing right now. subtotal and tax is showeing is ok but adding in Total.
Answer: If you want to display subtotal without tax.
Navigate to Admin > Stores > Settings > Configuration > Sales > Tax and under section called "Shopping Cart Display Settings" you can decide how to display tax.
Answer: If you want to Include Tax In Order Total.
admin >> store >> configuration >> sole >> tax and under section called "Orders, Invoices, Credit Memos Display Settings" you can decide Include Tax In Order Total or not

Magento 2 - Tax remove from Grand Total


Replacing light fitting with a lot of wires

Question: I've tried changing the lighting in a room and I found a set of wires that I don't know to to connect in order to have a live, neutral and earth. Can anyone explain?
Comment: What is this a picture of? Is this behind a light switch, or one of the lights?
Comment: Behind the lights
Comment: Will the new fixture fix to the ceiling if you leave the original rose in place [the bit that has all the wires out of the ceiling, not the cover necessarily. If not, we need to see a picture of what is going to replace it. **Don't take the existing rose/wiring apart until you know what to do with the wires.** You'll lose track of what is what.
Comment: BTW, this is **really** important, because whoever wired that in the first place used completely the wrong cables, so the colours are lying to you.
Answer: Firstly, note that the three groups of wires are effectively bundled by their respective brass contact sets (buses) and kept in isolation.
Based on my understanding of U.K. wiring convention...

Red is hot (live). Likely one comes in and two go out to switches and other circuit branches. In your case, the red next to the yellow may be outbound to the switch.
Blue is neutral. It appears connected to black neutrals, which are common in older wiring.
Yellow is probably the return hot from the switch.
Yellow/green is ground (earth). The existing light doesn't appear to be grounded. This is common as many fixtures are "double insulated" and don't require ground. If your new fixture has a ground wire it should be connected to that screw.

Therefore, by connecting a new light fixture as this one is, you'll have neutral to neutral and hot to switched hot.
You'd be wise to own and use a multimeter to confirm all this.
Comment: The new fixture is ready to take the place of **only** the drop to blue & brown from your old fixture [plus a new jumper earth you'll have to make up.] The wiring in the ceiling is a confusion of 'wrong colours' you do not want to mess with. You cannot be certain which is which from the colours alone, only by their positions in the old rose/bus bar.
Comment: In order to change the light fitting we need to remove the existing brass contact sets.
The white plastic behind it won't fit with the new fitting.
Comment: Ok. And? Is there a question in there? If reconnecting those wires in the same configuration with new connectors is challenging you may not be qualified for this task.
Comment: Please see the other picture
Comment: Of course I'm not qualified. My husband changed all the light fittings in the house but this look a little too complicated. I thought someone will be able to help
Comment: Your new fixture seems to have two simple screw connectors for (L)ine (hot) and (N)eutral. Where's the confusion? You haven't said what you intend to use to reconnect the various wires to each other, so I'm not sure how to help further.
Answer: Your old fitting is a standard UK ceiling rose with connector groups for earth, neutral, loop (live in), and light (switched live). Your new fitting has only got three terminals: live, earth, and neutral. In order to replace the rose with the new fitting, you MUST fit a new junction box above the ceiling.
It looks like you have 3 cables coming into that rose. 2 are 2-core+earth (read and black). These will be power in (from the consumer unit) and out (to other fittings on the same circuit). There is also a 3-core+earth cable (red, blue, yellow). This will be the switch cable.
You will need a new piece of 2-core+earth to go from the new junction box to the new fitting. This will have brown and blue wires in it.
In the junction box, the connections are as follows:

All bare wires (earth)
All 3 red wires (live)
both black wires and both blue wires
yellow wire and brown wire

In the light fitting, the new brown connects to the L terminal, the new blue to N, and the bare to the earth symbol.
The 5A lighting junction boxes can be difficult to use properly. It is very easy to lose the terminal screws or to fit them badly and damage the terminals. If you are at all nervous about this, get a professional in.
Comment: The rose is the section currently mounted to the ceiling. This has a cover that screws on. The new fitting has no threads to screw onto the existing rose, and is unlikely to be the same size. The new fitting has a pair of slots which hook over screws on a bracket that needs to be fitted in place of the existing rose. Having worked with that general sort of fitting before tells me that the bracket will not have any terminals for cables. hence the need to introduce a new junction bx for the switch loop.
Comment: I'm confused. Why is a new box warranted. It seems like this "rose" is mounted to a box, which may well be suitable. No?
Answer: The ground (middle) terminal on the new light should be connected to the spare ground terminal on the left side of the ceiling box with a new piece of yellow/green wire.
Disconnect the brown and blue wires from the old fixture in your hand. If they are not removable, cut them as close to the old fixture as possible.
Connect them to the empty terminals on the new one.  Brown to L and blue to N.
Pay attention to the routing of the blue and ground wires through the strain relief studs. Do that.
But.
The old fixture looks like it's threaded and screws onto the ceiling rose.  The new one looks like it wants a couple of screws sticking out the sides to hang on.  I'm not sure what the solution is to that. You may have to replace the whole ceiling rose.  Probably a job for an electrician if you're not comfortable with it.  Start by taking the light to an electrical supply store and buying an appropriate ceiling attachment.


Magnitude of a vector in spherical and cylindrical coordinates

Question: The magnitude of a vector in Cartesian coordinates is just the length of the vector. But what about a vector in spherical coordinates and cylindrical coordinates? Do we just take the root of its dot product with itself?
Answer: The magnitude of a vector in spherical coordinates is quite tricky, as you need to distinguish between points in $\mathbb R^3$ and vectors in $\mathbb R^3$. For example: The point $(r=0, \theta =0, \phi = 1) $ technically does not exit, but if it did it would be at a distance of 0 units from the origin. But the vector $\pmb{ \hat \phi }$ does exist, and has magnitude 1, like all unit vectors.
Now for the magnitude of a vector in spherical coordinates (in cylindrical coordinates it will be similar):
Starting with $\mathbf r = r\pmb{ \hat r }+ \phi\pmb{ \hat \phi }+\theta\pmb{ \hat \theta}$, and plugging in the following:
$$\pmb{\hat r} = \sin\theta\cos\phi \pmb{\hat x} + \sin\theta\sin\phi\pmb{\hat y} + \cos\theta \pmb{\hat z}$$
$$\pmb{\hat \theta} = \cos\theta\cos\phi \pmb{\hat x} + \cos\theta\sin\phi\pmb{\hat y} - \sin\theta \pmb{\hat z}$$
$$\pmb{\hat \phi} = -\sin\phi \pmb{\hat x} + \cos\phi \pmb{\hat y}$$
(Taken from the back of Introduction to Electrodynamics 4th edition by David J. Griffiths. )
we get
$$\mathbf r = r(\sin\theta\cos\phi \pmb{\hat x} + \sin\theta\sin\phi\pmb{\hat y} + \cos\theta \pmb{\hat z}) + \phi(-\sin\phi \pmb{\hat x} + \cos\phi \pmb{\hat y}) + \theta(\cos\theta\cos\phi \pmb{\hat x} + \cos\theta\sin\phi\pmb{\hat y} - \sin\theta \pmb{\hat z})$$
after rearranging as multiples of the rectangular unit vectors, we can find the magnitude of r by taking the root of its dot product with itself, or equivalently by taking the root of the squares of the xyz-components. Then after a lot of simplification, we come to the following:
$$|\mathbf r| = \sqrt{r^2+\phi^2 +\theta^2}$$
What a surprise! (To me at least) If you do not believe it, I suggest you work it out yourself.
Comment: This is the correct answer and agrees with the answer to a problem I found elsewhere that I struggled with for a while before finding my way here. Thank you.
Answer: The "magnitude" of a vector, whether in spherical/ cartesian or cylindrical coordinates, is the same.
Think of coordinates as different ways of expressing the position of the vector. For example, there are different languages in which the word "five" is said differently, but it is five regardless of whether it is said in English or Spanish, say.
Think of the coordinates then as different languages in which you are expressing the position of the vector. In each language, you must know how to find the magnitude.
For example, in cartesian coordinates $(x,y,z)$ you would take the dot product with itself and then take the square root i.e. $\sqrt{x^2+y^2+z^2}$.
In spherical coordinates, one of the coordinates is the magnitude! Recall $(r,\theta,\phi)$ are the Spherical coordinates, where $r$ is the distance from the origin, or the magnitude. You can see here.
In cylindrical coordinates $(r,\theta,z)$, the magnitude is $\sqrt{r^2+z^2}$. You can see the animation here.
Comment: Yes but the spherical coordinates vector has three components, the theta unit vector, phi unit vector and the magnitude unit vector
Comment: So I thought just take the sum of square of the  components and find its root
Comment: The sum of squares of the *Cartesian components* gives the square of the length. Also, the spherical coordinates doesn't have the magnitude *unit vector*, it has the magnitude as a *number*. For example, $(7 , \frac \pi 2, \frac \pi 2)$ makes sense in spherical coordinates. The first coordinate contains the length of the vector.


Cancelling variable factors in a rational function

Question: Consider the function $\displaystyle\frac{2x−1}{x+5}$. The domain of this function is all real numbers except $x = -5$. Now consider that I do this: $\displaystyle\frac{2x−1}{x+5}⋅\frac{x}{x}$. This changes the domain of the function to all real numbers except $x = 5$ and $x = 0$. Why is this allowed? Technically x / x is just 1, but the two expressions end up having different domains just from multiplying by 1 = x / x. I just don't see why this is allowed considering that f(x) changed domains just from multiplying by that factor. In addition, why is the reverse situation allowed? For example, if we have a function defined by $\displaystyle f(x) =\frac{2x−1}{x+5}⋅\frac{x}{x}$, this means that the domain is all reals except -5 and 0. However, just by cancelling the x's, we have a whole new function, where x = 0 is now defined. However, this simple cancellation means that f(x) is no longer the same function, but a new function with a new domain, such that if $f\displaystyle (x)=\frac{x(2x−1)}{x(x+5)}$ then $\displaystyle f(x)≠\frac{2x−1}{x+5}$. I am just confused as to why this cancellation is allowed.
Comment: $\frac{x}{x}$ is not just $1$. You're missing a subtle point. This does not hold if $x=0$.
Comment: They are two different functions because they're defined on two different domains. But they're related. For example, the one defined on the bigger domain is the unique function that agrees with the one defined on the smaller domain and is also continuous.
Answer: The domain of the original function is $x \in \mathbb{R}, x \neq 5$ because that makes the denominator equal to 0. The other function is defined on the domain of all $x \in \mathbb{R}, x \neq 0, 5$ because the original one (like I said) would have a denominator of 0, and the appending one will also have a denominator of 0. $0 \times 0$ is still 0, so if you simplify the function, the denominator would still be undefined for $x = 0, 5$.
Hope this helps!


What does {0} mean in this Python string?

Question: The following program uses {0} in a string, and I'm not sure how it works, it came up in an online tutorial about iteration for Python, and I can't seem to find anywhere explaining it.
import random

number = random.randint(1, 1000)
guesses = 0

print("I'm thinking of a number between 1 and 1000.")

while True:
   guess = int(input("\nWhat do you think it is? "))
   guesses += 1

    if guess > number:
        print("{0} is too high.".format(guess))
    elif guess < number:
        print("{0} is too low.".format(guess))
    else:
        break

print("\nCongratulations, you got it in {0} guesses!\n".format(guesses))

Thank you!
Answer: It's an indicator to the format method that you want it to be replaced by the first (index zero) parameter of format. (eg "2 + 2 = {0}".format(4))
Answer: It's a boon for placing same arg multiple times
print("When you multiply {0} and {1} or {0} and {2}, the result is {0}".format(0,1,2))

Isn't this nice!!!
Comment: It's nice, except that when you add 0 to 1, the result is 1, not 0;)
Answer: http://docs.python.org/release/3.1.3/library/stdtypes.html#str.format

Perform a string formatting operation. The format_string argument can
  contain literal text or replacement fields delimited by braces {}.
  Each replacement field contains either the numeric index of a
  positional argument, or the name of a keyword argument. Returns a copy
  of format_string where each replacement field is replaced with the
  string value of the corresponding argument.
Comment: +1 for linking to the explanation that op couldn't seem to find.
Comment: +1 for linking to the docs that the answer on top (with three times the number of votes!) didn't bother pointing to.
Answer: It's a placeholder which will be replaced with the first argument to format in the result. {1} would be the second argument and so on.
See Format String Syntax for details.
Answer: That is the new python formatting style. Read up on it here.
Answer: year = int(input("Enter the year: "))
if year%4 == 0:
    if year%100 == 0:
        if year%400 == 0:
            print("{0} Year is Leap Year".format(year))
        else:
            print("{0} Year is Not Leap Year".format(year))
    else:
        print("{0} Year is Leap Year".format(year))
else:
    print("{0} Year is Not Leap Year".format(year))

here I can place the year argument in multiple lines using .format(year)
output :
> Enter the year: 1996
> 1996 Year is Leap Year

AND Another example:
name = 'sagar'
place = 'hyd'
greet = 'Good'
print("my name is {0}. I am from {1}. Hope everyone doing {2}".format(name,place,greet))

output:
> my name is sagar.
> I am from hyd. Hope everyone doing Good

OR
print("my name is {0}. I am from {1}. Hope everyone doing {2}".format('Sagar','Hyd','Good'))

Output:
> my name is sagar. I am from hyd. Hope everyone doing Good


Unexpected results when using compound path to combine objects with strokes

Question: I can't for the life of me figure out how to fix this. Just finished a logo design for a client and am trying to make all of the white areas a compound path with the circle, so that it's fully transparent when overlayed on a background. The screenshot below shows the before and after. As you can see I've lost detail in the rough line inside the circle but picked up a lot of unwanted detail in the letters. Has anyone ever encountered this before? I put a yellow background behind so you can see it. Any ideas on how to fix this?
Answer: It looks like you had strokes applied to some (or all) of the components before you applied the compound path. If this is the case then you need to proceed as follows:

Select the objects and go to Object > Path > Outline Stroke. This will covert the strokes to filled shapes.
You now need to combine the outlined strokes with their objects. The easiest way to do this is using Unite in the Pathfinder palette. You may need to do some ungrouping and/or tackle each shape individually for this to work depending on how you built your artwork.
Once you have done this for all the elements of your design, the compound path should work as expected and you will have a compound object with transparent 'holes' that respects your original design intent.

Sometimes the effect that you are seeing can be fixed by reapplying the stroke after creating the compound path, but I'm not sure if this would work in this case.
Comment: Thanks. The "after" logo was with everything created as paths and outlined strokes and united with the Pathfinder. The Opacity Mask solution worked best in this case.


Texas Accelerated Rent

Question: I have to pay $7,022 in accelerated rent charges. Due in 30 days, does anyone have any experience with this? I asked the apartment for a payment plan and haven't heard back. What are ways I can save my credit.
Comment: According to http://www.lexology.com/library/detail.aspx?g=04d237c9-5937-4d23-ae5f-74ce94910e2c "An acceleration of rent provision gives the landlord the right, **after a default by the tenant**, to demand the entire balance of the unpaid rent" Of course they won't give you a payment plan, because they don't think you'll honor it.
Comment: Try to find the management company a tenant to take over your lease ASAP, and that they agree that that mitigates the issue.
Answer: In this case, your best bet will be to either discuss your options directly with your landlord / leasing office / property management office (Whichever applies here), or to discuss your options with a lawyer.
The leasing office / property manager / landlord may be willing to work with you on this, but usually clauses like this only apply if you've gone into default - Find and read your lease to see the specifics in your agreement, including any limitations or remedies available.
If there's absolutely nothing you can do to avoid the accelerated payments, and you simply want to know the answer to "What can I do to avoid damaging my credit?" , the answer is going to be fairly straight-forward: Pay the bill.
If you owe this money, the best option to avoid it being reported as a missed payment or defaulted balance (Disregarding any un-stated circumstances such as an existing default that led to this scenario) is going to be to pay the balance in full.
If you don't have this amount in cash, you may need to take out some sort of loan to pay it off.
I'm not recommending you do this, but I'm saying it's something you can attempt to do to pay off this balance you owe to the landlord before they report it as a missed payment.
Of course if you did that, you'd end up paying interest on a loan; You'll need to decide for yourself what's more important to you in this scenario.
To summarize, definitely try to work things out directly with your landlord / leasing office. Read your lease, in its entirety, to understand the obligations you've agreed to.
If all else fails, investigate what options are available to you to get the balance paid in full A.S.A.P, to meet your stated goal of protecting your credit.

Texas Accelerated Rent


Documenting and handing over Source Code

Question: I have recently left my previous student job as a part time developer for at small ERP management firm.
During my time at the firm i have developed several modules for integration with the ERP system. Furthermore i have developed an application, and a backend for said application.
I have been asked to document the complex parts of my codebase, so that another developer might be able to take on further development.
Is there any best practice in handing over source code, how should i document, and to what extend should i document?
As a last note i have not been making any tests, or any documentation of the code, other than comments to help navigate the code structure. The product owner simply did not want me to spend time on those activities.
Any input is appreciated !
Comment: Did I get this right? You already left, and now they want some documents from you, though before you left they told you not to write such documentation? And they did not even clearly tell you what they want, so you come here to this site and ask us? Honestly, is there a compelling reason why you are going to invest any effort into this (like payment, future job offer, testimonial)?
Answer: There are really three aspects to this question, as I understand it.

You were a part-time developer for a company while you were a student. During the course of the work, the product manager did not want you to spend time on test and documentation.
This, alone, is a huge risk to the success of a product.
Some level of documentation is important for many reasons, from onboarding new team members to helping the existing team members understand what they did in the past and why they did it. The level and detail of the documentation depends on various factors, such as the complexity of the system under design and development, organizational size and structure, compliance requirements, and more.
Neglecting tests, which can also be a form of documentation, has a huge risk to product quality. Writing automated tests not only capture the current intended behavior of the system at various levels of abstraction, but as the design changes, a failing test will raise a flag if a change to the code causes a change in behavior. This will force the developer to think about the change and make sure it's appropriate while, with well-written tests, highlight the scope and impact of the changes.
Since you were a student and not a full-time employee, I don't think you were in a position to push back too hard on this request. However, I would make sure that if documentation is ever neglected, to raise it as a risk for the future and make sure that it's documented and tracked. How that's done varies by team and organization.

At some point, you've left this position and are no longer employed by this organization, but they are asking you to do work.
This situation falls into the realm of navigating the workplace and your career, which is a better fit for The Workplace than Software Engineering. However, I would suggest that you never work for free. As I mentioned earlier, the organization took a risk by deferring documentation. And instead of just deferring it to a reasonable point, they deferred it beyond your employment. I am opposed to working for free, so I would say that you are no longer obligated to support a previous employer and find diplomatic ways to avoid this work, making the organization eat the costs associated with their decisions.

Now, you're looking for good practices going forward with respect to documenting software that you are responsible for building.
I would recommend reading Martin Fowler's writing about UML Modes, especially UML As Notes and UML As Sketch. This doesn't just apply to UML, but any standardized modeling language. The general idea is that just because a formal modeling language gives you a vast set of tools doesn't mean you need to use all of them. You can use the core language correctly to have advantage of recognized and commonly understood symbols, but at various levels of abstraction and detail that are appropriate for your audience.
Next, I'd look at a variety of modeling notations from standard flowchart notation to UML and SysML to the C4 model to IDEF. These are notations that have documentation associated with them. The advantage is that you can find an appropriate type of diagram, call it by name, and perhaps provide a link or reference to how to read it for people who don't know the modeling language. This saves you the time of having to define a language and communicate both a software design, but also the design language used to document the software design. In addition, you aren't limited to graphical notations - text and tables go a long way, too.
Finally, I'd look at the techniques of Agile Modeling. It's a set of principles and techniques to align the creation of software design documentation with the lean and agile values and principles. There are techniques out there to balance creating working software with creating appropriate and useful documentation.
Answer: This is a case for minimal, though professional, effort. Make an automatic listing of all classes/components.
A kind of "completeness."
Then make a structured rich-text document bringing everything in context, what is a controller, what an entity class, how they are used together.
Maybe a glossary too.
And at the top tools, architecture.
Menus, screenshots and other things you still can/want to collect.
In this way a future developer can find hishers way in the software.


Is it possible to use a color gradient as the color of the \rule command?

Question: I have an image which is just colors in a gradient pattern and I would like to apply this pattern to the \rule command instead of just choosing one color for it. Is it possible to use an image as the color of the rule? Like if the rule was a stripe cut off from the image.
Comment: You could include the image itself with an appropriate crop value to only select the colour gradient.
Answer: Let's assume this is your image and call it colour_gradient.png:

You can crop out a portion of this image and use it as a rule in your document:

\documentclass{article}

\usepackage[export]{adjustbox}

\setlength{\parindent}{0pt}% Just for this example

\begin{document}

\rule{\linewidth}{10pt}

\clipbox{0 0 0 \dimexpr\height-10pt}{\includegraphics[width=\linewidth]{colour_gradient}}

\end{document}

The above example sets a \rule of width 10pt. Using \clipbox from the adjustbox package, we clip the bottom 10pt from colour_gradient.png so that it resembles the colour gradient of the actual image. Depending on the layout of the image, you'll have to play around with the clipping dimensions.


C++ DLLs: how to create the corresponding include headers?

Question: Problem
I have a C++ project and create a library A from it. If I now link another project B with this library A, I of course also have to provide an include path for A's headers, so I just use A's source folder. But A's headers contain symbols that aren't exported. I feel like this is not the correct way to do it, but don't know better. A specific thing that makes me feel like this is incorrect is that my IDE suggests the symbols that aren't exported.
I'd guess the solution would be to create an include folder besides the source folder where the same headers are in but only with the exported symbols. So at build-time, every symbol with PROJECTAPI should be automatically copied over to the corresponding headers in the include folder. But if I google, I don't find such a function for e.g. cmake.
So what would be the recommended way here? Is there a functionality to create such an include folder?
Example
example.cpp of project B
#include

int main() {
    ex::World w("Earth");
    w.say_hello();
    //IDE wouldn't see this as error: w.private();
}

main.cpp of project A
#include <iostream>
#include "main.hpp"

namespace ex {
void World::say_hello() {
    std::cout << "Hello, World from " << m_name << std::endl;
}

World::World(std::string name)
    : m_name(name)
{}

void World::hidden() {
    std::cout << "Not exported" << std::endl;
}
}

main.hpp of project A
#include <string>

#ifndef PROJECTAPI
#  ifdef example_EXPORTS
#    define PROJECTAPI __declspec(dllexport)
#  else
#    define PROJECTAPI __declspec(dllimport)
#  endif
#endif

namespace ex {
class World {
private:
    std::string m_name;
public:
    void PROJECTAPI say_hello();
    PROJECTAPI World(std::string name);
    void hidden();
};
}

Edit: private isn't a good method name
Comment: these are special `.h` for export
Comment: This is not just about symbols, since your example features a class. You can't create a header containing a different definition of a class than was used to compile the library.
Comment: @Frank I can create an interface.hpp within project A that is the same as main.hpp but doesn't contain void hidden() and import the interface instead of main header.
Comment: @VincentHilla In C++, a header is not just a list of the symbols to link against, the language **requires** that all copies of a class's definition be identical accross all translation units. It might "work" but it's undefined behavior. So it working is just lucky happenstance you should not be relying on.
Answer: You are looking for the PIMPL idiom. "PIMPL" is short for "Pointer to IMPLementation". The idea is that, at the cost of a pointer indirection, you hide the implementation data and private methods in an inner class whose definition is opaque to the API consumer.
This approach is especially effective if you need to provide ABI stability.
Herb Sutter has a great GOTW on this here: https://herbsutter.com/gotw/_100/

Here is a full example that's close-ish to your code:
$ tree
.
├── CMakeLists.txt
├── include
│   └── world.h
├── main.cpp
└── src
    ├── world.cpp
    └── world_priv.h

In ./include/world.h (the public header)
#ifndef WORLD_H
#define WORLD_H

#include <memory>
#include <string>

#include "world_export.h"

namespace ex {

class World {
public:
  WORLD_EXPORT World(std::string name);
  WORLD_EXPORT ~World() /* = default */;

  void WORLD_EXPORT say_hello();

private:
  class Impl;
  std::unique_ptr<Impl> pImpl;
};

} // namespace ex

#endif

In ./src/world_priv.h:
#ifndef WORLD_PRIV_H
#define WORLD_PRIV_H

#include "world.h"

namespace ex {

class World::Impl {
public:
  Impl(std::string name) : name(std::move(name)) {}

  void say_hello();
  void hidden();

private:
  std::string name;
};

} // namespace ex

#endif

In ./src/world.cpp:
#include <iostream>

#include "world_priv.h"

namespace ex {

World::World(std::string name)
    : pImpl(std::make_unique<Impl>(std::move(name))) {}
World::~World() = default;

void World::say_hello() { pImpl->say_hello(); }

void World::Impl::say_hello() {
  std::cout << "Hello, World from " << name << "\n";
}

void World::Impl::hidden() { std::cout << "Not exported" << std::endl; }

} // namespace ex

In main.cpp:
#include <world.h>

int main() {
  ex::World w("Earth");
  w.say_hello();
}

Finally, here's the build:
cmake_minimum_required(VERSION 3.21)
project(pimpl_example)

option(BUILD_SHARED_LIBS "Build world as shared rather than static" ON)

# Library

include(GenerateExportHeader)

set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)

add_library(world src/world.cpp src/world_priv.h include/world.h)
add_library(world::world ALIAS world)

target_include_directories(
  world PRIVATE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>"
        PUBLIC  "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
)

generate_export_header(world EXPORT_FILE_NAME include/world_export.h)
target_compile_definitions(
    world PUBLIC "$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:WORLD_STATIC_DEFINE>")
target_include_directories(
    world PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>")

# Application

add_executable(app main.cpp)
target_link_libraries(app PRIVATE world::world)

This doesn't include install rules or anything, but it's ready for those to be written.

Building it:
$ cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
...
$ cmake --build build
$ ./build/app
Hello, World from Earth
$ $ nm ./build/libworld.so | c++filt | grep ' T ' | uniq
0000000000001460 T ex::World::say_hello()
00000000000012e0 T ex::World::World(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
00000000000013c0 T ex::World::~World()

You can see that only the API of ex::World is exported by the library. All the private details are hidden both in the code and in the library itself.
On Windows:
>dumpbin /EXPORTS build\world.dll
Microsoft (R) COFF/PE Dumper Version 14.28.29915.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Dump of file build\world.dll

File Type: DLL

  Section contains the following exports for world.dll

    00000000 characteristics
    FFFFFFFF time date stamp
        0.00 version
           1 ordinal base
           3 number of functions
           3 number of names

    ordinal hint RVA      name

          1    0 00001390 ??0World@ex@@QEAA@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
          2    1 00001550 ??1World@ex@@QEAA@XZ
          3    2 000015D0 ?say_hello@World@ex@@QEAAXXZ

  Summary

        1000 .data
        1000 .pdata
        2000 .rdata
        1000 .reloc
        1000 .rsrc
        2000 .text

Answer: Normally, a simple way to tackle that would be to create separate public and private headers ahead of time, and only expose the public ones to the user.
Here's a simple project structure that would accomplish that:
- lib_a
 - include
   - main.hpp
 - src
   - main_private.hpp
   - main.cpp

Now, obviously, that won't work for the code you posted, since the declarations you want to separate belong to the same class. But that's just a symptom of the fact that what you are trying to do is unfortunately not allowed.
From the standard basic.def.odr:

There can be more than one definition of a
(13.1) class type ([class]),

[...]

in a program provided that each definition appears in a different translation unit and the definitions satisfy the following requirements.

[...]

Each such definition shall consist of the same sequence of tokens [...]

In other words, if you put a class in a public header, it has to be identical to the one that was used when compiling the library.
As much as it would be convenient, putting "half-a-class" in a public header is just not allowed.


If gravity was lower but air density was the same, how would evaporation be affected?

Question: I'm confused about the relationship between air density, air pressure and gravity.
Does water evaporate faster under low air pressure simply due to the air density being lower? If the air pressure was lower due to lower gravity rather than lower air density, how would that affect evaporation? I'm imagining an alien planet with 75% of earth's gravity, but the same air density.
Comment: Do you only want to keep the surface density the same, or do you want to change temperature so the exponential decay in density also has the same length scale, so the density is the same as in the real world regardless of altitude?
Comment: J.G. - I want to keep the surface density the same. But I don't undersatnd the second part of that sentence. What do you mean " so the density is the same as in the real world regardless of altitude"? Do you mean mimicking the atmospheric density gradient of Earth, so it's the same as earth at every altitude? I assume this wouldn't happen because my atmosphere would be expanded due to weaker gravity. Also how does temperature affect the exponential decay in density?
Comment: See [here](https://en.wikipedia.org/wiki/Barometric_formula#Density_equations).
Comment: J.G. -  It says, "In these equations, g0, M and R* are each single-valued constants," so they're based on earth's gravity, right? Also, honestly I'm not great with math (nor do I have anything better than a simple phone calculator), so if you have an idea what the answer to this question might be, lmk: If surface gravity was lower, but surface air density was the same, do you think that would affect evaporation? And how? Thanks so much for the help, btw!
Answer: Simple answer A phase diagram shows how the phase of water varies with pressure and temperature. Reduced pressure, regardless of cause, increases evaporation at the surface temperatures common on Earth (excluding those that form ice).
Complication On your low-gravity planet, each extra kilometre of altitude gives less density reduction (the length scale for an $e$-fold reduction is proportional to $1/g$) and more temperature reduction (this time proportional to $g$), so the atmosphere is colder and thicker than Earth's at a given above-surface altitude. These have opposing effects on how readily high air holds evaporated water. If we try to calculate the overall effect, we encounter further complications. For example, at reduced temperature the air thins more slowly, and moist air has a more complicated rule for how temperature falls at increasing altitude.
Comment: Thanks for that explanation! Hm maybe there are too many factors involved here. What if I'm okay with less surface air density... So the air density is less at surface, changing more slowly w/ increase in altitude. How would that affect precipitation? I know air at lower pressures holds more vapor before condensing, so would that mean the clouds would condense higher up than Earth clouds? Also, normally I think of cold air as being drier. I'm a little confused because when you lower the pressure, temperature is also lowered - but in this case, even with cooler air, you get more humidity?
Comment: "the air density is less at surface, changing more slowly w/ increase in altitude" - the lower pressure would increase evaporation further, but the relative change would be the same. I'm not sure about the rest of your questions.


Portugal to USA by cargo ship?

Question: So I'm planning a hitchhiking trip and I wounder if there is any chance
to get a job on a cargo ship in Portugal and work there till I get to USA (in order to get there without spending any money on tickets). I speak a little bit Portuguese as well.
Answer: Do you have a valid work visa for Portugal?
Do you have any qualifications to work on a freighter? Ordinary / Able Seaman? Deckhand? Cook (with ship experience - it's not a hotel)?
Given that you asked here, I would guess no.
You can try the larger ports, but the days of just walking up to a ship and getting a short-term job are ling gone. Have Plan B ready before your visa expires.
Comment: I'm under the impression work visa isn't needed, the ship is very likely to be flagged somewhere offshore (not and not Portugal) that has lenient regulations for shipping.
Answer: You'll see several agencies offering you cargo ship trips, but they mostly look scammy.
For cargo ships it is cumbersome to take tourists. They would have to feed them, include a doctor (if there are more than 12 pax on board), give them some safety instructors, evacuate them in case of fire/accidents, make sure they are not terrorists, and so on.
For tourists to travel by cargo ship is not very convenient. There are very probably no tasks to assign to them, so, they'd also charge $100/day. There won't be any amenities on board, so it will be boring.
If you want to work on a ship, it's much more probable that you get hired by a cruise. They need literally thousands of employees and have all sorts of jobs. There are cruise ships that cross the Atlantic, so it's a matter of research into companies and hiring procedures.
Comment: "they mostly look scammy" source?

Portugal to USA by cargo ship?


What should I wish for?

Question: The Christmas tree is asking me to choose a wish. I can choose a multiplier or more wishes. What's the best option?
Answer: The choose more wishes wish simply generates a new wish in its place and lets you wish again.  You won't get duplicate wishes though.
If you like the multiplier on offer a lot, you should take the multiplier and leave the free wish for when the generated wish is something you don't want.
If you don't want the multiplier on offer, take the free wish and it will give you a different option.
Answer: I'm not in the Christmas multipliers get but, here's a strategy.
Option 1:I think you should get multipliers and when your done you can go back on getting wishes.
Option 2 (I think I prefer this one better):Maybe you can just buy a multiplier and then after make a wish and then alternate it.

What should I wish for?


Digital image correlation libraries for a mac

Question: I'm working on a project to develop a Digital Image Correlation tool for measuring surface strains. Does anyone know of any Mac compatible libraries that I can use to do the DIC processing. I was thinking that this might be something where there is a Python library but I have not yet managed to find one.
Answer: Have a look at this thread Image Processing, In Python?
Then there is the OpenCV with Python interface
Don't know about the MAC-part though...


Maimonides and the Allegory of the Cave

Question: Does Maimonides ever refer to the Allegory of the Cave from Plato's The Republic?
Comment: Why would you think he does? I do know he mentions a cave in a different context that is when the society around you is extremely immoral he says you should go live in a cave
Comment: @SimchasTorah It is well known that HaRaMBa"M often cites and draws from Aristotelian philosophy. Aristotle was one of Plato's chief disciples.
Answer: The Rambam (Maimonides) writes in The Guide for the Perplexed Part II Chapter VI:

I wonder at the expression "contemplating", which is the very expression used by Plato. God, as it were, "contemplates the world of ideals, and thus produces the existing beings."

To me this sounds like the same idea expressed in the Allegory only from a different perspective. Looking at footnotes to this passage may lead you to find a direct reference if such exists.
B'Hatzlacha
Comment: How is this the same idea as the Allegory?
Comment: From my limited understanding of both sources there seems to be a connection. This is a quote from Wikipedia: "The Allegory is related to Plato's Theory of Forms, according to which the "Forms" (or "Ideas"), and not the material world of change known to us through sensation, possess the highest and most fundamental kind of reality. Only knowledge of the Forms constitutes real knowledge". This is the same idea the Rambam seems to be referring to in his discussion of angels from which I brought the above quote.
Answer: While not a direct reference to Plato's cave, Rambam expresses an idea that is somewhat similar in his discussion of Jacob's ladder:
Guide for the Perplexed 1:15

This ladder all may climb up who wish to do so, and they must ultimately attain to a knowledge of Him who is above the summit of the ladder, because He remains upon it permanently. It must be well understood that the term "upon it" is employed by me in harmony with this metaphor. "Angels of God" who were going up represent the prophets. That the term "angel" was applied to prophets may clearly be seen in the following passages: "He sent an angel" (Num. xx. 16); "And an angel of the Lord came up from Gilgal to Bochim" (Judges ii. 1). How suggestive, too, is the expression "ascending and descending on it"! The ascent is mentioned before the descent, inasmuch as the "ascending" and arriving at a certain height of the ladder precedes the "descending," i.e., the application of the knowledge acquired in the ascent for the training and instruction of mankind. This application is termed "descent," in accordance with our explanation of the term yarad (chapter x.).

This is similar to one of the themes of the cave, wherein the philosopher escapes from the cave and acquires knowledge and then must return to the cave to impart his knowledge to the other prisoners.
Answer: I'm not sure why no one mentioned this yet, but the Rambam uses imagery very similar to the Platonic cave at the very beginning of his Guide (Introduction, p. 7-8, Pines edition), when discussing the degrees of wisdom that separate people:

You should not think that these great secrets are fully and completely known to anyone among us. They are not. But sometimes truth flashes out to us so that we think that it is  day, and then matter and habit in their various  forms conceal it so that we find  ourselves again in an obscure night, almost as we were at first. We are like someone in a very dark night over whom lightning flashes time and time again. Among us there is one for whom the lightning flashes time and time again, so that he is  always, as it were, in unceasing light. Thus night appears to him as day. That is the degree of the great one among the prophets, to whom it was said: But as for thee,  stand thou  here by Me, and of whom it was said: that  the skin of his face sent forth beams, and so on. Among them there is one to whom the lightning flashes only once in the whole of his night; that is the rank of those of whom it is said: they prophesied,  but they did so no more. There are others between whose lightning flashes there are greater or shorter intervals. Thereafter comes he who does not attain a degree in which his darkness is illumined by any lightning flash. It is illumined, however, by a  polished body or something of that kind, stones or something else that give light in the darkness of the night. And even this small light that shines over us is not always there, but flashes and is hidden again, as if it were the flaming sword which turned every way. It is in accord with these  states that the degrees of the perfect  vary. As for those who never even once see a  light, but grope about in their night, of them it is said: They know  not, neither do they understand; They go  about in darkness. The truth, in spite of the strength of its  manifestation,  is entirely hidden from them, as is  said of them: And now  men see not the light  which is bright in the skies. They are the vulgar among the people. There is then no  occasion to mention them here in this Treatise.

Like the distinctions of light in Plato's allegory (those enchained who only see shadows off the fire vs. the escapee who eventually sees the light of the sun), we have here distinctions of people. Instead of a cave, we are all in the darkness of night. Like Plato, the Rambam sets the philosopher at the rarest, loftiest level, the one who can see the kind of light that emanates from lightning (i.e., knows truth, understands ultimate reality). Most of us, however, either see no light, or, in rare intervals, only the kind of light displaced by degree (refracted from stones).

Maimonides and the Allegory of the Cave


Video Quality Loss after Rendering in VSE

Question: I rendered an animation in a 720p-png format and the images looked HQ. After re-rendering them into video in VSE the video lost its quality and looked blurred. (I tried higher bitrates and different formats but nothing worked). How to keep my video quality as good as images?
Comment: related: http://blender.stackexchange.com/questions/40569/what-settings-will-preserve-quality-when-i-output-an-edited-mp4-for-youtube-upl/41005#41005
Comment: Have you tried using H.264 and the H.264 preset? I had similar issues and this worked just fine.
Answer: Rendering with the file format AVI Raw should help you retain your Quality ;-)
But if you don't want to have your file sizes explode try H.264 instead.

You can reduce your Bitrate to 5000 for your 720p video. Change your GOP Size to half your Frame Rate.


Can I award a bounty to myself if I provide the best answer?

Question: I finally found the solution to a problem that was killing me. Before I found it, I asked an SO question about it, and had even started a bounty on the question. Can I now post a self-answer and, if no better answers get posted before the bounty expires, award myself the bounty?
Comment: Sha Dow Wiz Ard's answer is right. Just one extra note: old Meta posts may imply that you can award bounties to yourself. It was possible to do that a long time ago, but the behavior was deemed not useful and was removed.
Comment: @Pops thanks, I added that to my post. By the way, when you posted the comment it was less than a year after the change was done, not really "long time ago". ;)
Answer: No, you can't assign the bounty to yourself.
However, you can add your own answer and accept it so that other people will know that's what solved the problem.
If the answer is good enough, it will get upvotes then it may even earn a separate bounty at some point from another user who finds it exceptionally useful.
Worth to mention that in the past it was possible to grant ourselves a bounty (example), resulting in +[rep] to show besides the answer but no actual reputation gain which was just confusing. It was removed back in July 7, 2011. (Four months before this question was asked)
Comment: @Peter nope, answer written by the bounty owner is not candidate for the automatic reward. In such a case the bounty will just expire into the void.
Comment: @Lawand sorry, the answer became confusing after title was changed. Original title of the question was "Where should I ask questions about use of Stack Exchange sites". Reworded my answer to fit the edited question now. As for your question, we can't grant ourselves a bounty and it did not change since writing this answer.
Comment: @ShadowWizard does that mean the point are lost? Seems wrong after working hard to find and post an answer.
Comment: @ShadowWizard but it is not a chance. An actual answer was received (and given). Points should be given (and received) IMO, just as always. Also as I understand there is an option of 50% awarded points, so it is not like "free meal" as some complain.
Comment: @David even so, this will cause massive abuse and undermine the value of bounties in general. Like I said, if the answer is really good, points will be given by upvotes. 5 of them will cover the standard bounty amount.
Comment: Is this still valid? I asked a questions and started a bounty then I was the only one to answer and got one upvote but didn't get awarded my bounty when it expired... (http://stackoverflow.com/questions/20004821/how-to-import-c-cobertura-coverage-reports-into-sonar)
Comment: @ShaWizDowArd: Thanks for the clarification :)
Comment: @ShadowWizard What about the case where you've answered the question after creating the bounty and it's the only new answer and it has more than two upvotes.  Does the "default behavior" result in half the bounty being returned to you?
Comment: @David indeed, in such case the points are lost. Many discussions were started here on Meta to address this, personally I agree with the current behavior. You pay in advance for the *chance* to get what you want, kind of paying for advertising something.