Can any set of $n$ relatively prime elements be extended to an invertible matrix?

Question: Say you're given a ordered set of $n$ relatively prime elements, $a_1,\dots,a_n$ in a principal ideal domain $D$. If I relabel these elements $a_{11},\dots,a_{1n}$ in the same order, is it possible to find some remaining $a_{kj}$ in $D$ such that $(a_{kj})$ is an invertible $n\times n$ matrix over $D$?
Comment: In a more general setting, this became known as Serre's problem, and later the Quillen-Suslin Theorem.
Comment: @Gerry: Can you indicate how this is related to Quillen-Suslin?
Comment: @Soarer, sorry, it's a bit out of my depth. Some statements of the problem/theorem don't look anything like Aria's qiestion, but if you type Quillen Suslin matrix into a search engine you will probably find some references that bring out the relation.
Comment: @Soarer, Here's a reference: Moshe Roitman, Completing unimodular rows to invertible matrices, J. Algebra 49 (1977), no. 1, 206–211, MR0453779 (56 #12033). From the review: Quillen's solution of Serre's problem implies that if $R$ is a commutative ring, then any unimodular row over $R[x]$ which contains a unitary polynomial is completable to an invertible matrix. The author shows.... Other related results on this completion problem are discussed.
Answer: We can prove this by induction. For $n=1$, the set $\{a_1\}$ is relatively prime if and only if $a_1$ is a unit, and thus $(a_{11})$ is invertible.
So assume that we can extend any set of $n$ relatively prime elements to an invertible matrix, and let $n+1$ relatively prime elements $a_1,\dotsc,a_{n+1}$ be given. Let $g=\gcd(a_1,\dotsc,a_n)$. Then we can write $a_i=gb_i$ for $1\le i\le n$, with the $b_i$ relatively prime, and we can extend the $b_i$ to an invertible $n\times n$ matrix $B$. If we multiply the first row of $B$ by $g$, we can place it into the upper left $n\times n$ block of the matrix $A$ to be constructed, and we'll have $a_i=gb_i$ in the right place for $1\le i\le n$. Now place a multiple of the first row of $B$ into the $n+1$-th row of $A$, with the multiplier $r$ yet to be determined, and fill the $n+1$-th column with zeros except for the first and last elements $a_{n+1}$ and $s$, with $s$ yet to be determined. Now the determinant of the upper left $n\times n$ block is $g\det B$, and the determinant of the lower left $n\times n$ block is $(-1)^{n+1}r\det B$, so by Laplace expansion the determinant of the entire matrix $A$ is
$$\det A=sg\det B+ a_{n+1}r\det B=(sg+ ra_{n+1})\det B\;.$$
Since $a_1,\dotsc,a_{n+1}$ are relatively prime, $g$ and $a_{n+1}$ are relatively prime. Thus we can choose $r$ and $s$ such that the expression in parentheses is $1$ and $\det A = \det B$. But a matrix over a commutative ring is invertible if and only if its determinant is invertible (see Do these matrix rings have non-zero elements that are neither units nor zero divisors? and necessary and sufficient condition for trivial kernel of a matrix over a commutative ring). Thus, since $B$ is invertible, $A$ is invertible.
Comment: In the formula for $\det A$, the two plus signs should be minus signs, which is easily seen for the case where $A$ is a $2 \times 2$ matrix.  For the general case,

$\det A = (-1)^{n + 1 + n + 1}sg\det B + (-1)^{1 + n + 1}a_{n + 1}(-1)^{n + 1}r \det B  = (sg - ra_{n + 1})\det B$.

Of course, the signs of $sg$ and $ra_{n + 1}$ do not affect the validity of the proof.
Answer: There is much written on this and related problems, e.g. it is the special case $\rm\:k=1\:$ of below.
MR 82k:15013
Gustafson, William H.; Moore, Marion E.; Reiner, Irving
Matrix completions over Dedekind rings.
Linear and Multilinear Algebra 10 (1981), no. 2, 141--144.
Let  d  be any element of the ideal generated by the  k by k  minors of a
k by n  matrix  M  over a Dedekind domain  R . The authors show that  M can
be "completed" to form the top  k  rows of some invertible  n by n matrix of
determinant  d .
In fact, their proof works if  R  is any Prufer domain whose finitely generated
ideals can be generated by  $\ 1\ 1/2\ $ elements; merely precede their lemma by the
proof of the formula $\rm\  A \oplus B \cong R \oplus AB\ $  given in Theorem 4.1 of R. C. Heitmann
and the reviewer [Rocky Mountain J. Math. 5 (1975), 361--373; MR 52 #3141].
Reviewed by Lawrence S. Levy
                   91k:15028
Answer: This follows from the structure theorem of finitely generated modules over a principal ideal domain.
Consider your $n$-tuple $(a_1,\dots,a_n)$ as an element $a$ of the module $D^n$ over $D$, and form the quotient module $Q=D/\langle a\rangle$. It is clearly a finitely generated module over $D$ (since $D^n$ is), and the hypothesis $\gcd(a_1,\dots,a_n)=1$ means that the quotient $Q$ is torsion-free, since the order $d\in D$ (generator of the annihilator) of any torsion element would be is a common divisor of $a_1,\dots,a_n$. By the structure theorem, $Q$ is therefore a free module over $D$. If $[\overline b_1,\ldots,\overline b_k]$ is a basis for $Q$, consisting of images of elements $b_i\in D^n$, then $[a,b_1,\ldots,b_k]$ forms a basis of $D^n$. Since the rank of a free module is well defined one has $k=n-1$, and the $b_i$ are a possible choice for the remaining rows of your matrix.


Ik rotation Deformation Problem

Question: I am trying to use inverse kinematics but for the bone would not bend in the right direction so i tried rolling it but the it deformed the foot and leg of the mesh how do i fix this?
Comment: Please upload your .blend file to be able to help you
Comment: how do i do that?
Comment: Use this link http://blend-exchange.giantcowfilms.com/
Comment: I have uploaded the file
Comment: I've provided an answer to your problem with steps and an updated blend file. You can accept the answer and upvote the answer if it solved your problem :)
Answer: There are couple of problems in your file.
First the IK bones needs to have the deform property disabled as shown below:

Second, you need to adjust the pose position to be your rest pose to avoid bad bone roll values. To do this, switch to pose mode select the whole armature bones by pressing A then hit the space bar and write Apply Pose as Rest Pose as shown below:

Last thing is parenting your mesh to your armature. To do this, go to object mode, select your mesh first, then select your armature with right-click, then hit ctrl+P and choose With Automatic Weight and that's it, the mesh will be nicely deformed and parented to the armature as shown below:

The updated .blend file can be found here:

Ik rotation Deformation Problem


Range of a number notation

Question: If a number is chosen from $[-n,n]$ is that the same as being chosen from $\mathbb{Z}_n$? Since the operations are modular, what meaning does the negative part of the range have?
Comment: Can you provide us with context to this? (maybe a link to the paper or title + author?)
Comment: Are you sure the operations are modular? For many programming languages (Java, C etc.) the `%` operator is the **remainder** operator, not the modulo operator.
Answer: We can present $\mathbb{Z}_m$ in different manner.
For example, bellow sets are some equivalence classes of $\mathbb{Z}_3$
$$\{0,1,2\}, \{3,4,5\},\{-3,-2,-1\}. $$
Now, about your question

If you select the numbers of $[-n,n]$ module a positive integer $m$ which $m\leq 2n+1$, you can construct $\mathbb{Z}_m$:

$$\mathbb{Z}_m=\{i \pmod m \mid i\in[-n,n]\}$$
but, in above set, we may have some repetitive numbers. So we can construct $\mathbb{Z}_m$ as follows:
$$\mathbb{Z}_m=\{i \pmod m \mid i\in[0,m-1]\}=\{i\mid i \in[0,m-1]\}=\{0,...,m-1\}.$$

We have $2n+1$ numbers in the range $[-n,n]$, so we can say that $[-n,n]$ is same as $\mathbb{Z}_{2n+1}$ (not $\mathbb{Z}_n$).

Range of a number notation


Chrome Sync w/o Chrome

Question: I use Chrome on my Linux computer as well as on my Nexus 5. Is there a way I could access my bookmarks, history and open tabs from Chrome Sync on my Raspberry Pi (Chrome is too heavy) or on my server (CLI only) or maybe even on my Nexus S (Chrome too heavy)?
Comment: @DavidPostill Yeah. I should have just asked "Is there a way to access my bookmarks […]?"
Comment: I'll edit the question for you and remove my close vote ;) Happy Xmas!
Comment: @DavidPostill, it was irony. Of course the only way to accomplish that would be to have some 3rd party software, and most probably it would be open source.
Comment: Yes, but if you don't **ask for a program**, there is nothing stopping someone suggesting something in the answers. It's a way around the close issue.
Comment: @DavidPostill But I at first ask for such programs already existing, and I do not foreclose a possibility of future creation of such. Anyway — Merry Christmas :)
Answer: I would assume you've already read the following ?

https://code.google.com/p/chromium/issues/detail?id=181429
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-discuss/i50znAY1Zjw
Sync Chromium without google account
I'm using Chrome and Chrome Sync; does Google have access to my passwords?

About the closest thing to what you ask for might be the code available in http://damianblog.com/2014/02/09/inside-chrome-sync/ - http://chrync.com/
Comment: Heh, at first I was afraid that I will be now criticized for asking with my search being too little... then I clicked link after link and it turned out I had seen all of them multiple times already :) About to click the last two links now. They seem helpful, judging by just the address ;P

Chrome Sync w/o Chrome


Stripe offsite on Cognito forms

Question: Is it possible for Stripe Payments to be done like Paypal i.e. just with a button that takes you to Stripe? If I went to a site I didn't know I would much rather be taken off site to put in my details than input at that site.
Comment: Question title should not include tags. Reference: [What are tags, and how should I use them?](https://webapps.stackexchange.com/help/tagging)
Answer: Stripe does not support a dedicated checkout page like PayPal.  There are pros and cons to each approach, but from our own experience an integrated checkout process is better for customers.
At the same time, if you are embedded your Cognito Form in your website, it is important to make sure you are using HTTPS/SSL, at least to ensure your customers feel confident about the security of their transaction.

Stripe offsite on Cognito forms


Is there any way to extract keywords and keyterms of an academic field?

Question: I'm trying to do a personal research project on a field, e.g. "quantum physics" and wanted to analyse which keywords are the most important or have the most papers in a field. Is there any way to achieve this?
Comment: If you have the text files, then excel has the find() function that will find words or phrases... But other programs will be better.
Comment: @SolarMike I'm talking about a field in general. Like what are the most important keywords (or the most frequent) in the last five years in quantom physics for example.
Comment: For which publication/service provider? These stats can change greatly depending on where you are looking and who your intended audience is. I think as stated this is too broad of a question and  you need to define the problem a bit better.
Comment: @scrappedcola I'm trying to expand a dataset of academic texts that I currently have, but the domain is niche and only using available keywords in documents does not help me find significant number of similar papers (I have tried the scopus API before). I was thinking of finding better keywords in order to have better query's in scopus database.
Comment: Go find a research librarian at your university library (preferably the physics library). Politely ask them. Done.
Comment: @JonCuster Thanks, but our librarians are not as updated as you'd think they are.
Comment: @FarhoodET - you might just have to dig a bit. Not the librarian at the front desk. Ask for a research librarian. They are expert at how to extract what you want from the databases. Take several relevant articles to show what you would like to find, and take several that look like they might be relevant but aren't.
Answer: If you are looking for the last 5 years a good chance would be

a current textbook/PhD thesis (many are published on university servers and open access) on that field that has a glossary
browsing/downloading the most cited papers on journal websites (there are often tags, keywords for every paper added by the authors) and noting them down
doing text analytics/statistics on your own with such tools after converting PDF to text:

Matlab Text Analytics Toolbox
https://github.com/HamidMosalla/WordFrequencyCounter
http://www.writewords.org.uk/word_count.asp
http://neon.niederlandistik.fu-berlin.de/textstat/
Answer: You may want to check out the free software tool VOSviewer http://www.vosviewer.com/:

VOSviewer is a software tool for constructing and visualizing bibliometric networks. These networks may for instance include journals, researchers, or individual publications, and they can be constructed based on citation, bibliographic coupling, co-citation, or co-authorship relations. VOSviewer also offers text mining functionality that can be used to construct and visualize co-occurrence networks of important terms extracted from a body of scientific literature.


Handling multiple resolution

Question: I have been trying to handle different mobile phones resolutions for my game. But the scene is not fitting accordingly in some screen its perfect but in some other screens it is shrinking.
My question is how do I create a scene that will show consistent across all devices and all screen resolution.
The gaming framework I am using is limejs and for building hybrid apps I have used Ionic 3.
I have tried using window.devicePixelRatio and multiplying it with screen height and width but it did not work.
Comment: What do you mean by "consistent"? If the device has a different aspect ratio, or a different pixel density, then something will need to change — whether it's scaling content differently, laying it out differently on screen, adding padding, etc. You will need to start by defining the main resolutions you want to support, and defining exactly how your game should look on each. Then we can get into how to achieve those specific outcomes you've chosen.
Comment: @Shiv the problem is "consistent" is up to you to define. What if on a small device, a button is on the bottom left part of the screen, and behind it there's an object that belongs to the game (and not the UI), and on a device that is twice as wide, you want the button to still be on the bottom left, but the game object to remain on the same spot, so more of the game is visible. How does the game know the difference unless you tell it how to handle it?
Comment: By consistent I meant that room should look the same to all the players no matter on which device or platform they play like for example if on 1 device a button is at bottom left corner then it should be same across all devices. Right now what happening is when a device resolution increases then in that case the elements cannot scale properly and do not align. Currently I have used a condition that when window.screen.height > 500 I assigned different coordinate to elements and in else case I assign different coordinate but still its not working properly due to different screen width and heig
Comment: It sounds like you should show us what your screen looks like, and which controls you want to stick to which corners/edges as the screen changes in size and shape.
Comment: As you will see above, in some resolutions the game scene coincides completely but in some cases when resolution is large then in that case game scene does not cover the mobile screen completely.
Comment: @TomTsagk, I am not sure I understand what you said, but in my case, I wanted the  game scene to take up the full screen in case of mobile devices(not desktops), the elements within the director have their position fixed like the top left, bottom right, center etc so after setting the director to take up the full screen and scaling the elements within it, the game scene look fine across all devices, do note that lime JS does not have provision for setting width and height of game to be 100%
Answer: So after some months of trying, I came across this post-https://www.joshmorony.com/how-to-scale-a-game-for-all-device-sizes-in-phaser/ it discusses the concept of devicePixelRatio which when multiplied with window.screen.width and window.screen.height covers the entire mobile screen of all mobile devices.
the code which I used in terms of lime js when creating the director was:
<code>game.director = new lime.Director(document.body, window.screen.width *
window.devicePixelRatio, window.screen.height * window.devicePixelRatio)
</code>
(Note that my game runs in landscape mode)
For the phaser framework, it has different scale modes which we can use to cover the entire screen of mobile devices.

Handling multiple resolution


Why are my drives referred to as '(hda0,msdos5)' etc in grub instead of (hda0,5), (hda0,sda5) etc that you usually see?

Question: I'm fiddling about trying to get a multiboot system (win7, ubuntu, lion) on one drive working with grub 2, but was wondering what the msdos part meant on my system. I don't see it like that on any of the examples online.
Comment: You'll probably see it in the official GRUB documentation, though.  I believe they made that change a while back, along with some others. There's a lot of outdated examples online, not to mention many that are downright wrong or convoluted hacks.  There is no rule that people need to actually understand what they are writing about, and it shows.
Answer: It is used to distinguish between MBR-style partitions and GPT-style partitions.
For "old" MBR partitions, the prefix is msdos. For GPT, the prefix is gpt.
Note that partitions are numbered starting from 1 in Grub2, while they were numbered starting from 0 in previous versions.
See the Arch Grub2 wiki entry for more on this.


Which of those 2 bikes is better

Question:
Hey i have the chance to buy either one of those 2 bikes . which bike is better. Please help. thanks
Comment: The one that fits you better
Comment: Does the warranty transfer over for either brand ?
Answer: It doesn't matter which is "better" in terms of componentry.
What matters is fit - you should try them out but sitting on them and adjusting saddle height. Then take a 2 minute ride up and down the road.  This is normally enough to show you a poor fit immediately.  If it feels wrong, it is wrong.
If you think the bike is good, take it on a longer ride, at least an hour.  Try and get some up and downhill, and some straight+flat+fast, and a section of turns too.  That should be enough to exercise and evaluate how it feels.
Answer Ride them and see which feels best.
Personally, the Giant looks newer, but the Trek look prettier with a more-horizontal top tube.
Answer: Very hard to discern which of the two used bikes is 'better' given just a picture of each. Having information on the year and component level would really help.
They both appear to be aluminium frames, If one has substantially better components, then it would be better.
However, you also need to look at the amount of wear each has, and if there are any problems such as wheels out of true. The primary wear items to look at are the tires, chain, rear sprocket cassette and front rings. If any of those are worn out you'll need to factor in replacing them.
As others have said, all other things being equal, how each fits you is a big deciding factor, Note that the Trek has its bars set quite high so those could come down if you wanted
One thing I can say with certainty is that they are actually slightly different types of bikes, The Trek X0 is a cyclocross bike with cantilever brakes, whereas the Giant Defy is a straight road bike.
The Trek will allow wider tires and could be a good 'go anywhere' bike that will take on unpaved and rougher paved trails. however, it may have classic cyclocross geometry with a higher bottom bracket which will place you higher on the bike, which you may or may not like.

Which of those 2 bikes is better


Can female Autobots take up the position of leadership?

Question: In Transformers: the movie we know of course that the Matrix of leadership was given to Ultra Magnus, later Hot Rod receives it and destroys Unicron. But why couldn't someone like Arcee become leader and get the Matrix. Are females allowed to be leader or even have the Matrix and be the guardian of it?
Comment: Possibly of interest; http://tfwiki.net/wiki/Female_Transformer - "*Well, I remember bringing up that question early on with Hasbro, "are any of these female?" And then I think Hasbro's attitude was, 'this is a boy toy. We don't wanna have, you know, girl robots.' So, I said, "OK, just want to clarify that.*"
Comment: *"GN: Were Soundwave and Arcee the two characters you most would have liked to see in the film? ...
Orci: Those two were kind of the main ones ... I would have liked to see Arcee, but the idea of a female Transformer needs its own explanation, and there just wasn't going to be enough time. It would have been like, "Oh, that's convenient. They're trying to appease women with a pink Transformer." So rather than having that happen, let it just be a straight shot and speak for itself right now."* http://uk.ign.com/articles/2007/07/02/exclusive-interview-robert-orci?page=3
Comment: related, not dupe: [Why does only Hot Rod get magically reformatted by the Matrix of Leadership?](http://scifi.stackexchange.com/q/63059/5184). There's some good discussion about who can hold/carry/wield the matrix.
Comment: @Richard It's bizarre that they assumed the color palette would stay the same when they mangled every other 'bot and 'con except Prime.
Answer:
The concept of the Matrix originates from the brain of Marvel Comics
  writer Bob Budiansky and is a result of the "no girls"/"no gender"
  policy enforced by Hasbro regarding their then-new robot brand.
  Because there were no female robots/the robots had no gender,
  Budiansky came up with an asexual method of reproduction in the form
  of the Creation Matrix, a "Primal Program" housed within the Autobot
  leader that could bring new Transformers to life, which would also
  prove a helpful plot device when he was required to introduce new
  characters to the series

Transformers Wiki
As the concept of the Matrix predates female Autobots, it was never shown in the hands of a female Autobot in the comics. In the cartoons since, there has never been a female holder of the Matrix of Leadership -- but there is no indication that this is due to any sort of a rule; the Matrix has been passed to the next most qualified (present) individual in each case that it has come up -- and in almost every situation, there were no female Autobots there to be considered!
Perhaps the best support for female Autobots being able to assume the Mantle Matrix of Leadership is the fact that there have, through history, been several female Autobot resistance leaders.  Elita One and Beta were the highest ranking Autobots on Cybertron in their time (Elita because Prime was gone, Beta because she was one of the first Transformers to rebel against the Quintessons). The Autobots are clearly an egalitarian society suffering from a severe shortage of females -- but as they don't sexually reproduce, they probably never saw a need to have more made.
Final thoughts: in Prime's final words in the movie, the Matrix is destined to fall in the hands of an Autobot who would use its powers to light their darkest hour. He didn't designate a gender.
Comment: @Elizabeth She's literally the lowest ranked person there, though.
Comment: That does make sense, but in the movie Arcee is there. Which is why it is a little confusing.


Solar power charging problems

Question: Is it possible to power a 12v power board with a lithium battery, while keeping it charged via a solar panel. Or would I need to have two batteries and somehow automatically change them over when the battery was running low?
Comment: Practically speaking, the way to do this is to get a solar panel, a battery pack, and a solar charge controller. The charge controller should have 3 separate connection points. One for battery, one for panel, and one for load. And you only need one battery.
Comment: I'm voting to close this old abandoned question as too broad because the question is effectively meaningless: the goal is something that *can* be done but has large amounts of *practical* difficulty.  To say "yes" is pointless; to explore what would actually be involved goes far beyond the bounds of an SE question and answer.
Answer: Without any sizing details, the question becomes "is the solar panel output greater than the input required for the board plus the charge required by the battery plus the losses" .
The solar panel output is dependant on sunshine hours and that can be estimated from data ygat can be found.
The load you should be able to work out from what your board consumes, what the battery needs and the losses - which, if the panel is close to the board and battery should be small anyway.
One battery should be sufficient anyway.

Solar power charging problems


Canning prepared and refrigerated jelly the next day

Question: Stored 6 pints of prepared jelly in frig overnight. Can I now place jelly into canning jars and follow water bath processing?
Or, do I need to eat it quickly?
Answer: No, from the point of view of food safety, you can't.
"The complete book on small-batch preserving" by Ellie Topp and Margaret Howard has a chapter describing the water bath canning process. It says:

It is important that the jars be processed immediately following the cooking stage.

Canning processes have to be extensively tested to guarantee safety. Deviations mean that your canned goods are no longer safe.
As an aside, your jelly can be frozen, so you don't have to eat it at once. The canning jars work fine for freezing too, but leave more headspace than for canning.


RJ45 Type Connector With 10 Lines

Question: What is the name of the connector that is similar to an RJ45 but instead of eight lines, it has ten?
Answer: RJ50
From wikipedia

The 10P10C connector is commonly referred to as an RJ50 connector,
  although this was never a standard registered jack in the Universal
  Service Order Codes. The 10P10C has 10 contact positions and 10
  contacts.
The most common uses of the 10P10C connector are in proprietary data
  transfer systems,[19] such as the Digiboard[20] and Equinox
  Super-Serial multi-port TIA-232 adapters.[20] 10P10C connectors are
  also used to implement RS-485 interfaces, and for data link
  connections in APC and Eaton uninterruptible power supplies. In the
  latter case, a keyed 10P10C plug with a protrusion on the pin 1 side
  near the back is used.
Answer: If you are asking about the connectors commonly used for Ethernet, the "correct" name for an RJ45 connector is 8P8C. So a ten-position connector would be 10P10C often incorrectly referred to as RJ50.
The RJ standards are for telephony and, though similar, are mechanically incompatible.
Comment: Technically if the pins of an RJ45 male connector and an RJ50 female connector are both centrally distributed (and thus align) then you can often use the two together. However, this is uncommon, and not recommended even when that's the case, as it could lead to damaging the device, the female connector, the male connector, or all three.

RJ45 Type Connector With 10 Lines


CiviMail click through links and Browse Site button not working.

Question: We are running Civi 4.7.22 on WordPress 4.8.1.
We are having a problem with CiviMail.  I have included a link to a MP4 demo video to highlight what is happening.  Please watch for what happens when I click the "Browse Server" button and when I run the Preview and click the link in the preview.
We have contacted our host and they assured us that nothing in the server is blocking or restricting those php functions.  I suspect it is a path issue, but I don't know where to look or how to resolve it.
Please see link to video below.
Thank you
http://meatcuttersclub.org/demomp4.mp4
Comment: Is nobody familiar with this problem?
Answer: Problem solved with much much back and forth with our host.    I noticed this issue is all over the forum with no solution, so finally here is the solution: If anyone runs into this issue in the future, check your permissions for /wp-content/plugins/civicrm/civicrm/extern/url.php  The permissions should be 755. For some reason, ours was 775.  As soon as we changed it to 755 the problem was solved.


Is there a maximum limit on the number of customer groups?

Question: Is there any upper limit on the number of customer groups in Magento CE?
Answer: 99999, if we follow the maximum index in the db. A large amount can influence performances as customer pages are most of the time not cached but else, I do not see any problem to set that amount.
Here is the creation script of the table. The customer_group_id is a smallint with a length of 5 so the maximum index is 99999.
<code>CREATE TABLE IF NOT EXISTS `customer_group` (
`customer_group_id` smallint(5) unsigned NOT NULL COMMENT 'Customer Group Id',
`customer_group_code` varchar(32) NOT NULL COMMENT 'Customer Group Code',
`tax_class_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Tax Class Id'
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='Customer Group' AUTO_INCREMENT=4 ;

ALTER TABLE `customer_group`
ADD PRIMARY KEY (`customer_group_id`);

ALTER TABLE `customer_group`
MODIFY `customer_group_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT  COMMENT 'Customer Group Id',AUTO_INCREMENT=4;
</code>
Comment: Can you please tell me in which file this written
Comment: you can find it in the customer_group table in you db. I edit my answer to complete it.


Why does Photoshop CS6 keep complaining of scratch disks being full?

Question: I'm trying to resize a 640x1096 psd file that contains about 20 layers. Photoshop is already taking about 1GB with its scratch disks even though I only have this file open. If I try to increase the canvas space. I get scratch disks full error and have to free up more space on my drive. I got 16gb ram and about 1.5gb free disk space. Why does photoshop need so much scratch disk space for such a simple operation when I have a lot of free ram?
Comment: Have you checked to see how much RAM Photoshop is configured to use? Is your Photoshop 32 bit?
Answer: Realistically the solution is to free up a reasonable amount of space on the scratch disk (which doesn't have to be your primary drive, often putting it on a secondary drive yields better performance) - with only 1.5GB of free space on the scratch disk, seeing that error isn't surprising.
Personally, I always maintained at least 10GB free on my scratch disk to minimize issues.
Answer: If Photoshop says the scratch disk is full and you have plenty of free space on your computer: If you're trying to crop an image in Photoshop, make sure it's in PIXELS and not inches, that could be a quick problem fix! See this solution:
http://helpx.adobe.com/photoshop/kb/error-scratch-disk-full-cropping.html
Comment: Can you give a more detailed description of the linked content, and explain how it relates to the question? This will help ensure that this answer remains useful in the event the link becomes invalid.


I unintentionally said Jesus is Lord

Question: One day I accidentally said Jesus is Lord but then I immediately asked  for forgiveness and even retoke my shahada but even after all that I still worry Allah(SWT) hasn't forgiven.I still want to ask will I be forgiven
Answer: There is no blame on someone who does a sin out of ignorance to the ruling or out of forgetfulness.

It was narrated from Ibn 'Abbas that the Prophet (ﷺ) said :
"Allah has forgiven my nation for mistakes and forgetfulness, and what they are forced to do."

See reference here
so there is nothing to worry about Insha Allah.
And Allah knows best
Answer: Assalamu alaikum and jazakallah khayrun for your question
We should never lose hope of Allah's mercy for it is greater than any sin we could ever commit, and that is even the same ruling for someone who commits shirk intentionally but then regret their sin, repent to Allah and do everything to stay away from that sin.
So for someone who does it unintentionally they are even more likely to get the forgiveness of Allah
Talking of those that commit sins intentionally, including shirk; interpretation of the meaning:
"Say: 'O 'Ibaadi (My slaves) who have transgressed against themselves (by committing evil deeds and sins)! Despair not of the Mercy of Allaah, verily, Allaah forgives all sins. Truly, He is Oft‑Forgiving, Most Merciful'" [al-Zumar 39:53]
Someone doesn't get forgiven if they die in the state of shirk but if they commit shirk and then regret what they did and turn to Allah in repentance changing their ways for the best while doing everything to stay away from that sin, Allah will then forgive them. Alhamdulillah
His mercy is such that He will even turn their bad deeds into good deeds in shaa Allah.
Qu'ran 12:87 And do not lose hope in the mercy of Allah; indeed none lose hope in the mercy of Allah except the most ungrateful people
And Allah knows best

I unintentionally said Jesus is Lord


Windows: How to view *.mvb extension files?

Question: I have mvb extension files for an ebook I had downloaded. One file per page of the book. Which program can I use for viewing these files?
Comment: Is there a .hlp file somewhere? Maybe you're supposed to use winhlp32.exe to open the .hlp, which will refer to each mvb files
Answer: <code>.mvb</code> proper is an ancient format used by Microsoft Multimedia Viewer for Windows 3.1 (!). E.g. here's a book about it from 1994.
So, chances are, you have something different.
You can look inside the file for any keywords to look up (e.g. binary formats typically start with some specific "magic bytes" for easy identification). If it's for some specific e-book, you can look it up in its documentation or wherever you got the file from.
Answer: *.MVB file extension (Multimedia Viewer book file) are commonly used to store Video or Audio information.
Not sure if you can view these files using RealPlayer, but it's worth a try!
If the file is not corrupted, then it should play.


Grinding/rattling Noise from engine accelerating on both idling and driving Suzuki G10 3-cyl Engine

Question: I am facing an issue of a rattling/grinding noise from engine left/lower side particularly in warm engine. Car is Suzuki cultus with 3-cylinder non-efi G10 engine and running on petrol. Inside cabin while driving it feels like exhaust leak noise when accelerating but noise from open engine bay is like metal grinding noise. I feel it more when I put my ear close to the timing belt cover.
One mechanic said it is from crank while one said it is from piston rod. I want to avoid unnecessary trials by mechanics and wish to have a proper diagnosis first. I have uploaded the video showing engine noise. Please have a look and advise. Thanks in advance.
https://youtu.be/b-lIc33GJfY
Comment: Locate the noise by using a long screwdriver as a stethoscope or get a stethoscope.
Comment: Can you please guide where on engine should I put stethoscope more specifically?
Comment: Put the stethoscope all over the engine until you find where the noise is :-)
Answer: The knocking sound (if that is the sound you are talking about) is likely coming from the inside of the engine.  To properly diagnose the exact wear that is causing the noise will require some dismantling of the engine.  It will be impossible to say that it is crank wear or piston rod wear without some dismantling.
You may be able to locate more precisely the location of the noise by getting the car on a lift to listen underneath, but I can't see anyone being willing to guarantee which part is at fault without dismantling.
Depending on the design of the car, it may be possible to just remove the sump (oil pan) and look for play in the components, but on some cars even doing that can be a fairly big job.
I think that a 'proper diagnosis' is going to cost money, which will require a mechanics time.
By the time a mechanic has dismantled the engine to diagnose the issue, there should be no 'trials' necessary.  They should be able to tell you exactly which components need replacing.
If the noise is coming from the bottom of the engine, you may find that it would be cheaper to just have a second hand engine fitted than repair the original.
Comment: Thanks very much for your kind advice. Appreciate it!


Export multiple reports to Excel

Question: I have a c# windows form that opens up a report viewer (using visual studio reports). The first report shown is an overview report displaying various figures split by year. Each year can then be clicked on and a drill through report is opened up passing the date as a parameter where a more detailed view is shown.
Is there a way of exporting this overview report and its drill through reports to one excel workbook with the reports separated as worksheets? I can save each report separately but I need the option of saving them all to one workbook automatically. So the excel file looks essentially the same as it does on the report viewer. I've searched everywhere and not found a clear solution.
Any help is much appreciated.
Answer: I don't believe it, u probably will need to write you own xls writer to make it work.

Export multiple reports to Excel


How can I remove smoke from a bag of holding?

Question: If I fill a bag of holding with smoke, could I remove all of the smoke by reaching in, or would I have to turn the bag inside out to release the smoke? I feel like removing the smoke by hand wouldn't work because the smoke particles aren't connected, so whatever I could "grab" is all I'd be able to pull out.
Comment: How did the smoke got into the bag?
Comment: After you get smoke out, I think the real question is how to address the lingering odor. Is a bag of holding dry clean only?
Comment: What is the source of the smoke?  Depending on its source, there may be another way to get it out.
Comment: I think the real question is whether smoke would be able to just drift out of the bag while it's open.
Comment: @BenjaminKuykendall And after you wash it, how do you get the water out?
Answer: No, smoke isn't an item
Bag of Holding says:

Retrieving an item from the bag requires an action.

Smoke is not an "item" in any sense of the term, as it cannot be bought, sold, grasped, etc.
You could, however, turn the bag inside out to get the smoke out:

If the bag is turned inside out, its contents spill forth, unharmed, but the bag must be put right before it can be used again.
Answer: This Is Not Explicitly Covered by the Rules of D&D 5e
You probably can't just reach in and extract the smoke with an action, but you can potentially get some or all of the smoke out by other means—it's all up to your DM.
What We Know About Bags of Holding
There are a few sources that give us information about how a bag of holding behaves. For one, we have its item description in the Basic Rules and Dungeon Master's Guide—which are the same, as far as I can tell.

This bag has an interior space considerably larger than its outside dimensions, roughly 2 feet in diameter at the mouth and 4 feet deep. The bag can hold up to 500 pounds, not exceeding a volume of 64 cubic feet. The bag weighs 15 pounds, regardless of its contents. Retrieving an item from the bag requires an action.
— Bag of Holding, D&D Beyond

This gives us the interior dimensions of a bag of holding, and a rule about using an action to retrieve an item. It also uses the phrases "[t]his bag" and "the bag," to describe the bag of holding, so I think it's reasonable to infer that a bag of holding is also a bag, and everything that being a bag entails. (In the same way that a magic sword is also a sword, and generally follows the rules for using a sword.)
There are also references to the bag of holding in the item descriptions for (Heward's) handy haversack and portable hole.

Placing the haversack inside an extradimensional space created by a bag of holding, portable hole, or similar item instantly destroys both items and opens a gate to the Astral Plane.
— Handy Haversack, D&D Beyond

Placing a portable hole inside an extradimensional space created by a bag of holding, handy haversack, or similar item instantly destroys both items and opens a gate to the Astral Plane.
— Portable Hole, D&D Beyond

We can take from this that the inside of a bag of holding is an extradimensional space. The only source I could find describing extradimensional spaces is the section on demiplanes in the Dungeon Master's Guide.

Demiplanes
Demiplanes are extradimensional spaces that come into being by a variety of means and boast their own physical laws. Some are created by spells. Others exist naturally, as folds of reality pinched off from the rest of the multiverse. …
A demiplane can be as small as a single chamber or large enough to contain an entire realm. For example, a Mordenkainen's magnificent mansion spell creates a demiplane consisting of a foyer with multiple adjoining rooms…. When a demiplane is connected to the Material Plane or some other plane, entering it can be as simple as stepping through a portal or passing through a wall of mist.

This doesn't say definitively that the extradimensional space inside a bag of holding is a demiplane, but they can be created by relatively simple magic (compared to creating a bag of holding), and can be about the right size—4 ft × 4 ft × 4 ft (64 cubic feet) is a little more cramped than what I imagine when I hear "chamber," but it's roughly the size of a small closet.
If we assume that a bag of holding does contain a demiplane, and that its opening connects it to the Material Plane, then entering it can be as simple as stepping through the portal—things can potentially move in and out as they would through any other opening.
Can You Extract the Smoke as an Action?
One thing I think we should clear up right away is that the rules of the bag of holding don't give you a special ability to retrieve items in the bag as an action. Rather, the sentence

Retrieving an item from the bag requires an action.

is a specific restriction on your general ability to retrieve an item from a bag or backpack for free as part of movement or another action.

Other Activity on Your Turn
You can also interact with one object or feature of the environment for free, during either your move or your action. … Some magic items and other special objects always require an action to use, as stated in their descriptions.
— Chapter 9: Combat, D&D Beyond

Interacting with Objects Around You
Here are a few examples of the sorts of thing you can do in tandem with your movement and action:
…

withdraw a potion from your backpack

— ibid

So retrieving things from your bag of holding follows the normal rules for retrieving things from any other bag, except that retrieving an item always costs an action and can't be done for free. If you couldn't retrieve smoke from a normal bag by reaching in with your hand and pulling it out, you probably can't with a bag of holding either.
Are There Other Ways to Get the Smoke Out?
We're now firmly entering ask your DM territory, because there aren't any explicit rules (to my knowledge) about getting smoke out of a bag—let alone out of a bag of holding. However, if we're still assuming that a bag of holding contains a demiplane and connects it to the Material Plane, then it's reasonable to assume that (outside of combat time) things can generally move through the bag's opening as they would any other opening to a chamber. And in that case, I think we can come up with some potential approaches to suggest to your DM.
(Again, to be completely clear: We can't assume any of these will work. Your DM will make the final decision for your game.)
Turn the Bag of Holding Inside-Out
As you point out in your question, turning the bag of holding inside out will expel everything in the bag.

If the bag is turned inside out, its contents spill forth, unharmed, but the bag must be put right before it can be used again.
— Bag of Holding, D&D Beyond

This is the least debatable option, because it's right in the item description. It even says "contents" rather than "items," which should cover smoke.
Leave the Bag of Holding Open for a While
It seems reasonable that if you leave your bag of holding upright and open for a while, the smoke should disperse. I couldn't find any explicit rules for smoke or gasses dispersing, but I did find a wondrous item in the Basic Rules called an eversmoking bottle that describes its smoke dispersing naturally after a time.

Once the bottle is closed, the cloud [of smoke] disperses after 10 minutes.
— Eversmoking Bottle, D&D Beyond

So it's reasonable that the smoke in your bag of holding may disperse after a time as well—though maybe longer than 10 minutes, since it's only open to fresh air on one end.
This is entirely up to your DM, and it's also kind of reasonable that it might not work. The description of a demiplane does say that they "boast their own physical laws."
It's actually somewhat debatable whether air circulates through the opening or not. The description of bag of holding says

Breathing creatures inside the bag can survive up to a number of minutes equal to 10 divided by the number of creatures (minimum 1 minute), after which time they begin to suffocate.
— Eversmoking Bottle, D&D Beyond

I'd always assumed that meant when the bag was closed, but that's not written. Perhaps, because the bag has its own internal physics (e.g., gravity always pulls toward the bottom of the bag inside, regardless of the bag's exterior orientation), air does not circulate well.
But at the same time, if creatures suffocate after being in the bag for 10 minutes regardless whether it's open or closed, does each creature get their own 10 minute timer? (That seems a bit ridiculous.) Or does something reset the timer—e.g., the bag being opened?
Note that 10 minutes is much longer than a creature could survive if there were just no air in the bag.

A creature can hold its breath for a number of minutes equal to 1 + its Constitution modifier (minimum of 30 seconds).
When a creature runs out of breath or is choking, it can survive for a number of rounds equal to its Constitution modifier (minimum of 1 round).
— Basic Rules, Chapter 8: Adventuring, D&D Beyond

10 minutes is twice as long as a creature with a Constitution of 18 could even hold its breath, let alone go without air. This seems to imply that there is air in the bag to breathe initially, but that it runs out. Since the item description doesn't say 10 minutes and then never again, I think that lends some support to the theory that air does circulate and refresh.
Send a Small Spellcaster into the Bag of Holding to Cast Gust of Wind
The spell gust of wind has specific rules regarding gasses and vapors.

A line of strong wind 60 feet long and 10 feet wide blasts from you in a direction you choose for the spell's duration. … The gust disperses gas or vapor ….
— Gust of Wind, D&D Beyond

It's not explicit that smoke counts as a gas or vapor, but most effects that create smoke do explicitly state that a strong wind disperses them. For example, the eversmoking bottle mentioned in the previous suggestion has such a rule.

A moderate wind (11 to 20 miles per hour) can also disperse the smoke after 1 minute, and a strong wind (21 or more miles per hour) can do so after 1 round.
— Eversmoking Bottle, D&D Beyond

So, assuming you can find a small spellcaster who can fit inside your bag of holding (a 4 ft × 4 ft × 4 ft space) with room to make the somatic gestures required for gust of wind, they could conceivably disperse the smoke from inside the bag in about six seconds. (They might even eject themselves with the spell, but otherwise please let them out within 10 minutes.)
There's debate to be had here too whether gust of wind can clear the smoke if air can't circulate—see the previous suggestion for more details. I think this is a separate debate, because even if air may not circulate naturally, it could still potentially be forced out at high speed, since we've assumed that things can move through the bag's opening normally.
Place a Portable Hole or Handy Haversack in Your Bag of Holding
There will no longer be smoke in your bag of holding.
Comment: Oh, fair enough, I'd forgotten that turning out the bag was in the question, not just some of the other answers.  And re: having the bag open for Gust of Wind: in that case it should also work to cast from outside, blowing fresh air in through the opening, so you don't need someone to climb in.  But unlike the portable hole, the bag of holding's survival time limit for creatures that need to breathe doesn't say anything about only when the bag is closed, so maybe we should infer that air doesn't exchange freely, but instead stale air is fully replaced whenever a creature enters it...
Comment: Your list of ways to get the smoke out omits turning the bag inside out.  That dumps out all the contents without destroying it or them.  Also, yes RAW gust of wind disperses cloud-type things, but that's because normally there's somewhere for it to disperse into.  I think the inside of a 4x4x4 demiplane or bag filled with smoke would be a special case the DM should rule on, like whether you're replacing the air with fresh air from the plane of air (and inflating the bag? or removing the smoky air somehow?) vs. just creating movement in the existing smoky air, unless you open the bag.
Comment: @PeterCordes I skipped mentioning turning the bag inside out because OP already mentioned it in the question, and seemed to be asking about alternatives. I could include it for completeness.
Comment: @PeterCordes And yeah, everything in that last section is up to the DM. Though re: *gust of wind*, presumably the bag would be open at the time and my assumption is that things (air and smoke included) can move back and forth freely.
Comment: @PeterCordes I've updated the answer to mention turning the bag inside out, and to include some discussion about air circulation. I think it's a good point, and I actually misread/misremembered the item description in my previous comment. (I still think my interpretation is possible, but it's definitely not the only interpretation.)
Answer: Smoke is not an item
The description of Bag of Holding says that you can use your action to take out items out of it:

Retrieving an item from the bag requires an action.

Smoke is an environmental phenomenon, or if you want a dictionary definition:

"a visible suspension of carbon or other particles in air, typically one emitted from a burning substance"

Smoke is not an item it any definition of the word.
You would have to turn the bag inside out to get it out.
Answer: TL;DR
That's an interesting question. I would consider that a setting issue for the GM to answer, since it isn't clearly addressed in the rules.
Explanation
The rules specify that an 'item' takes an action to retrieve from the bag. it isn't stated in the rules what constitutes an 'item' for Bag of Holding purposes, or for any other purposes AFAIK. I would certainly consider a specific cloud of smoke an 'item' in everyday speech.
The question then is how Bags of Holding are understood to work in context. I can think of two possibilities: either the Bag makes it magically possible to extract any item as an action (in which case this would also apply to other edge cases like picking out one grain of sand from a bucketload you dumped in); or the action cost is just intended to be a guideline and the Bag of Holding follows ordinary common sense when removing items from it.
Conclusion
Therefore it needs to be determined by your game's GM, based on their determination of what is best for the game and their understanding of the setting you are playing in.
Personal Opinion
If I were your GM, I would disallow it purely because Bags of Holding are so easily abused that it's become boring to me instead of fun when somebody comes up with a clever use for one.
Comment: Welcome to the stack! Be sure to take the [tour] to get a nice shiny badge, and visit [help] for more information. Re: "It isn't stated in the rules what constitutes an 'item'..." We actually have a question that references that concept [here](https://rpg.stackexchange.com/questions/204774/what-is-the-definition-of-an-item-in-5e). The TL;DR is, since there *isn't* a specific definition, we have to use context clues and English definitions to help us out. And smoke is not a singular "countable" noun, it is a "mass noun", such as water and dirt (i.e. you don't say "A smoke" or "A dirt").
Comment: Re: action cost of removing an item: see [Handy Haversack vs. Bag of Holding](https://rpg.stackexchange.com/q/53131) - summary: in previous editions, only the Handy Haversack had magic retrieval of a requested item, that was what made it useful despite the smaller capacity vs. a standard bag of holding, instead of just being strictly worse.  5e put some action-economy rules into the item descriptions, but unfortunately(?) used the same 1 action language for both.
Comment: @PeterCordes Two thoughts on that: For one, *handy haversack* still has the feature that your desired item is on top when you reach in. Also, *bag of holding* doesn't say you *can* retrieve a given item in an action, just that an item can't be retrieved *without* using an action. It's still a 4ft-deep container, and if you fill it to the brim it would be reasonable to say you can't just pull out the item on the bottom with an action.
Comment: @ChrisBouchard: Interesting, I don't think any of the answers on that Q&A suggested that interpretation of the bag of holding description "*Retrieving an item from the bag requires an action*." as a minimum, rather than a guarantee.  You could post an answer there.
Comment: @PeterCordes I'm working on one right now! Thanks for linking to it.
Comment: ([Link](https://rpg.stackexchange.com/a/209415/20855) if you're curious.)


Optimal MTU settings ADSL for PPPoE over ATM/LLC

Question: Is 1446 optimal for PPPoE over ATM/LLC as this forum post describes?
Answer: The maximum MTU you can expect that all network nodes will allow is 1500, so calculate whatever additional overhead there is and subtract that from 1500.  In this case it appears to be 54 bytes so yes 1446 is fine.
If set too high, you will know - noticeable degradation in performance due to inevitable fragmentation.


Common ground wire for multiple circuits with different wire sizes

Question: I'm wiring my workshop and want to use a common ground wire for multiple circuits.  I've found several answered questions here about using a common ground wire but I haven't found one for my specific situation.  The wires are running in 1-1/4" PVC conduit under the slab from the breaker panel on one wall to another wall about 50 feet away.  I have one 50-amp breaker feeding a 240v outlet and six 20-amp breakers feeding 120v outlets, all with THHN.  The 50-amp circuit will use 6 AWG power wires and an 8 AWG ground wire while the 20-amp circuits will use 12 AWG for power, neutral, and ground.  I know 12 AWG for a 20-amp circuit may be overkill but I was able to buy a few thousand feet of 12 AWG still on the spools from a local school auction for $100 so I'm going to use it :) All the wires from the conduit go to first a 6x6x4 electrical enclosure and then to the individual outlets.  From other questions here, it seems that having a single ground is not a problem but I'm wondering if it's OK to tie that many circuits into the 8 AWG ground wire.  I'm planning to use a ground bar to connect the ground wires in the 6x6x4 enclosure.  In case the description above isn't clear, I included a diagram of what I have in mind.  Please ignore the color of the lines/wires in the drawing; I'll use the correct wire colors for the installation.  The conduit fill calculation is good but I've seen some posts that mention other adjustments that need to be made if there are a certain number of current-carrying wires in conduit, e.g. de-rating.  Any feedback on all this would be appreciated.
Comment: Where did you get the idea that "12 AWG for a 20-amp circuit may be overkill"? It's the bare minimum (assuming copper obviously; for aluminum you'd need even bigger - #10).
Comment: All Conduit, or some NM or SE cable? Metal or PVC? Are you familiar with MWBC configuration?
Comment: Is this a standalone building? Because if it is, you can't run multiple circuits to there of the same type and will need to install a subpanel to get this many circuits.
Comment: Code reference for what I mentioned is 225.30: https://up.codes/s/number-of-supplies
Comment: Please break your multiple questions into multiple questions. You have an answer about sharing the ground already, so leave that one here. You have a humongous problem with derating by running 7 circuits in a single conduit; you can solve that problem with  multiple conduits or a sub-panel, or by buying some vastly larger wire for all the circuits. Buying just enough vastly larger wire to feed a sub-panel is usually the smarter path.
Comment: Thanks for the info.  Looks like derating is a bigger problem than I expected.  For clarification, my shop has a standalone 200-amp service and breaker panel so the power isn't running from another building.  I'll post a separate question on derating.
Answer: Having multiple circuits share a grounding wire is A-OK
NEC 250.122(C) permits you to have multiple circuits in the same conduit or cable share a single grounding conductor:

(C) Multiple Circuits
A single equipment grounding conductor shall be permitted to be installed for multiple circuits that are installed in the same raceway, cable, trench, or cable tray. It shall be sized from Table 250.122 for the largest overcurrent device protecting circuit conductors in the raceway, cable, trench, or cable tray. Equipment grounding conductors installed in cable trays shall meet the minimum requirements of 392.10(B)(1)(c).


Is a smooth injective map an immersion?

Question: I am trying to work out some basic properties of immersions/submersions/embeddings etc. Is the following reasoning correct?
Let $M,N$ be smooth manifolds, and $f:M \rightarrow N$ a smooth injective map.
 Since $rk (f_*)$ is equal to the dimension of $M$, then $f$ is a map of constant rank, and hence an embedding.
Answer: The conclusion $rk(f_*)$ is equal to the dimension of $M$ is not correct.
Consider the map $f : \mathbb{R} \to \mathbb{R}$ given by $f(x)=x^3$.
The rank of its derivative at $x=0$ is 0.
Consider a map $f : M \to N$. Let $f_*$ denote the derivative of $f$. Let's recall some definitions:

Immersion: $f_*$ is everywhere injective
Embedding: $f_*$ is everywhere injective + $f$ is a homeomorphism onto its image.

Example of immersion that is not an embedding: immersing the circle as a figure eight on the plane $\gamma : (-\frac{\pi}{2},\frac{3\pi}{2}) \to \mathbb{R}^2$ given by $\gamma(t)=(\sin(2t),\cos(t))$.
It is injective. But it is not an embedding: the figure eight is not compact in the subspace topology of $\mathbb{R}^2$, whereas the domain is compact in the subspace topology coming from $\mathbb{R}$.
On the other hand, if a smooth injective map has constant rank then it is an immersion. This follows from the constant rank theorem, i.e. that in local coordinates any smooth map $f : M \to N$, $m=\dim M$, $n=\dim N$, with constant rank $k$ can be written as $(x_1,\cdots,x_k,x_{k+1},\cdots, x_m) \mapsto (x_1,\cdots,x_k,0,\cdots,0)$.
Finally, if $f: M \to N$ is an injective immersion and either $M$ is compact or $f$ is proper, then $f$ is an embedding.
Comment: I see, thanks. What if I also demand that $f$ has a smooth inverse (i.e. f is a diffeomorphism between $M$ and its image)?
Comment: If $f$ is a diffeomorphism then $f$ is, thus, a homeomorphism, so $f : M \to N$ is a homeomorphism onto its image. To see that $f_*$ is everywhere injective, note that since $f$ is a diffeomorphism, $\operatorname{id}=f \circ f^{-1}$. So, taking local coordinates $(x_1,\cdots,x_n) \in U \subset \mathbb{R}^n$ about a point $x \in M$, and using chain rule: $\operatorname{Id}_{\mathbb{R}^n} = f_*^{-1}(f(x_1,\cdots,x_n))f_*(x_1,\cdots,x_n)$. This means that $f_*(x_1,\cdots,x_n)$ must have full-rank at every $x \in M$ (since $\operatorname{Id}_{\mathbb{R}^n}$ has obviously constant full-rank).
Comment: Got it, thanks a lot.

Is a smooth injective map an immersion?


Can I improve something I borrow?

Question: If I borrow something may I do something which I believe improves that thing, without the owners consent? For example if I borrow a library book and find an error in one of the facts printed there can I write a correction in the margin?
Comment: One man's improvement is another man's damage.  I would be surprised if "I believe it's an improvement" is strong enough to permit.
Comment: Would the question be any different for "if I see an error in a book at a book store would I be allowed to write a correction in the margin?"?
Comment: How about adding a diamond to a ring?
Comment: @WAF might be harder to sell a book that was written in, even if the writing improves the book
Comment: @not-vram Might it not be similarly harder to lend out the book in the case of a library?
Comment: @WAF I don't see why. 1. part of the assumption of the library is a certain amount of wear and tear 2. My kids borrow books all the time that were written or or torn etc. Its obviously not ideal but it happens.
Comment: @not-vram I think the basis of the question is whether it is ideal or not. If not, then how could the law allow any less than the ideal?
Answer: The Chofetz Chaim in Ahavat Chessed part 2 chapter 22 writes about a borrower

He must beware not to break the terms stipulated by the lender. If he
  does, he is termed a gazlan (robber). He may not use the borrowed
  article for any purpose not stipulated, nor may he retain beyond the
  allotted time. [...] Frequently, too, the article is broken through
  the borrower's neglect. Even if he pays for it, this is still an
  injustice. The lender did not, in the first place, give him the
  article for such a purpose.

As such, one should ask the lender whether such an improvement is indeed beneficial to him. Absent such approval, I don't think one can make the hypothesis the improvement is always wanted (e.g., some people might be particular about not writing in their books).
A practical option is to write the correction on a note which you add to the book, and once you return it to ask whether they would like you to leave the note or correct the book directly.
Of course, consult your rabbi
before implementing anything you learn here.
Comment: Hi, nice answer! I want to mention that there are some cases where an improvement could be made to another's property without their consent and still be entitled to compensation, although at a lower rate(where warranted and beneficial; like a repair). Although it seems to apply only to land and not metaltelin. See Shulchan Aruch Choshen Mishpat 375 for more. Generally speaking though, the halacha is that it's forbidden to use an item other than for it's purpose(and in normal fashion) without consent of the owner. In the case above, the library is the owner of the book and not the lender.

Can I improve something I borrow?


Great Comment "votes"

Question: Next to comments there are two options - one is to flag it, the other is an up arrow ("this is a great comment"). Other then letting users know which comments are valuable, do  the up arrows "votes" have any other role?
Comment: You had two questions in here. This site works better when there is only one question per question. That way, it's easier for other people to find solutions if they have the same problem. I've edited out your second question, but feel free to ask it separately.
Comment: You might want to enter the [now removed] second question as a feature request, BTW, although there are some longstanding reasons why I expect it will be turned down.
Answer: The only other function they serve is that, in cases where a question or answer has many comments, and the displayed list is abridged and the Add/Show x More Comments link appears, up votes are used to determine which contents remain displayed while others are hidden.
Beyond that, it has no other mechanical effect, other than providing a visual indicator to other users that some number of people thought a given comment was worthy of additional attention in some way.

Great Comment "votes"


What is Declarative UI?

Question: I keep seeing this term being thrown around in blogs about frameworks. While I understand the difference between declarative and imperative programming, how does this apply specifically to UI? Why does there appear to be a special term for it? Are these different 'things'? If so, what is the alternative to Declarative UI and why would I want to use it?
Comment: @Telastyn. Imperative and declarative are very different things. It is "what" vs "how".  An HTML layout would be declarative. A sequence of drawing instructions would be imperative.
Comment: @mike: The OP asked if imperative/declarative UI was different from imperative/declarative programming. They're not.
Comment: @Telastyn The OP is asking the difference between declarative UI and  UI (such as "imperative UI"), and if an alternative to declarative UI even exists.
Answer: "Declarative UI" means you describe in some kind of language what elements you need in your UI, and to some degree how they should look, but you can leave out details like the exact position and visual style of the elements. For example, in HTML you can describe that you want an input field, but how and where this field will be placed in the UI is highly dependent on the browser you are using.
Today, the term is more often used for UI frameworks with a strict separation of the look of the UI from the behavior, which means the code reacting to UI events. For example, using XAML, you declare the look of your UI in a specific XML dialect, but you implement the behavior in separate program code.
Comment: Good answer. Nitpick: whether details like the "exact position" are specified or not, is orthogonal to the declarative/imperative divide. However, in practice the approach of letting the computer handle the details is more common in declarative systems (though I'm not sure why).
Answer: Declarative UI is a UI that's designed in a declarative way (you describe what it should be like) rather than an imperative way (you code the steps to create it.)  It's really nothing special or unusual; it's been around since at least the 1990s, when you had Visual Basic and Delphi with visual form designers that let you lay out the user interface of your program in an intuitive, WYSIWYG manner.

What is Declarative UI?


Why is $0^i$ undefined?

Question: Wolfram Alpha returns nothing. I tried working out the algebra on my own and I am stuck. Let $0^i=x$. Then $i=\log_0(x)$. $i=\ln(x)/\ln(0)$. $\ln(0)=-\infty$. Any number $n$ over complex infinity is $0$ so I end up with $i=0$. Or I could multiply both sides by $\ln(0)$ which is $-\infty$. So I end up with $i\cdot(-\infty)=\ln(x)$. Yielding $x=e^{-\infty\cdot i}$. I know I took quite a few liberties there in defining functions but having no answer at all just seems strange. Any insights?
Comment: You are doing supreme algebraic gymnastics that has never been seen before. On a serious note : You also have to be very cautious about which operations you are doing. Some of the operations may not be legal.
Comment: You have done so many "beyond imagination" things., though I think $0^i$ is undefined because $0^0$ is undefined. Have a look: https://www.youtube.com/watch?v=12Nae7qYxs4
Answer: The standard definition for exponentiation of complex numbers is
$$a^z=\exp(\ln(a^z))=\exp(z\ln(a))$$
Now, this definition works perfectly when $a\in\mathbb{R}$ and $a>0$. It still works when $a$ is a non-zero complex number, but you have to be careful to define which branch of the logarithm you are working with, something that might be above your level of expertise (I base this off your initial question). However, there is no way to define $\ln(0)$ as there is no complex number $z\in\mathbb{C}$ such that
$$e^z=0$$
But you ask, why isn't
$$0^i=\exp(\ln(0^i))=\exp(i\ln(0))=\exp(-i \cdot \infty)=0$$
since $\ln(0)=-\infty$ (I know, infinity isn't a number but it is useful for this demonstration). However, if this were the case, then
$$0=0^i=(0^i)^i=0^{-1}=\infty$$
which is a contradiction. Another way to look at is why isn't
$$\exp(-a\infty)=0$$
Well, if $a$ is a positive real number then it is zero. However, if $a<0$ then
$$\exp(-a\infty)=\exp(-(-|a|)\infty)=\exp(|a|\infty)=\exp(\infty)=\infty$$
That is, it depends on what is "multiplying" the infinity which determines what the final value is. Since $i$ isn't real, there is no way to get this final value.
Answer: Well, exponentials regarding complex numbers are tricky to handle. How would you define an expression such as $a^b$ for complex numbers $a$ and $b$? The usual definition is $$a^b:=\exp(b\log a)$$ where $\exp$ is the exponential function and $\log$ is the complex logarithm---which is multivalued, so in order to make $a^b$ well-defined we must have chosen a branch. Here we run into a problem: there is no way to assign a meaningful value to $\log0$, hence no way to assign value to such an expression as $\exp(i\log0)$. So the expression is indeterminate.
You might ask: how is this consistent with the fact that $0^x=0$ for any real $x>0$? Well, if we think of $0^x=\exp(x\log0)$, along the positive real axis it makes sense to think of $\log0$ as essentially $-\infty$ (more precisely: $\lim_{\epsilon\to 0^+}\log\epsilon=-\infty$), and so $\exp(x\log0)$ can be thought of as essentially $\exp(-\infty)$ which is essentially $0$ (again more precisely, $\lim_{\epsilon\to-\infty}\exp\epsilon=0$). But there is no such thing in the complex plane. If we now treat $\log0$ as "essentially $-\infty$" we will end up with an expression such as $0^i=\exp(-i\infty)$. The only meaningful way to interpret this is as the limit $\exp(-i\infty)=\lim_{z\to\infty}\exp(-iz)$, but this simply doesn't exist.
In summary: $0^a=0$ for real $a>0$ because we can say $0^a=\exp(a\log0)$ which is "essentially" $\exp(-a\infty)$ which is "essentially" $0$ if $a$ is a positive real. In the general case for complex numbers $a$ however, this expression is not well-defined.
Answer: The function $f:\mathbb{R}^+\to\mathbb{C}$ defined by $f(x)=0^x$ for positive real numbers $x$ has a unique analytic continuation to a function $f:\mathbb{C}\to\mathbb{C}$, namely $f(z)=0$ for all $z$. So in that sense you can say that $0^i=0$.  But of course you've relinquished some of the other conventions of exponential notation, such as $0^{-1}=1/0=\infty$.
Remark: In going from $0^i=x$ to $i=\log_0(x)$, the OP implicitly assumes the function $0^z$ is invertible. But as this answer shows, that's not the case.
Answer: There are various answers already addressing the issue, but I will try to go into more depth to provide a satisfying answer.
When it comes to $x$ being a real number (or more generally, an element of a monoid in $\cdot,$) defining $x^n$ is very straightforward if $n$ is a natural number (or $0,$ but in higher-level mathematics, $0$ is, more often than not, also treated as a natural number). We say that $$x^n:=\prod_{m\in{n}}[x],$$ where $[x]$ is the constant sequence whose output is $x.$ This can easily be extended to integers $n,$ as long as $x$ is an element of a group. For real numbers, this translates to $x$ being nonzero. However, if we try to go any further and extend this for rational $n$ instead, things begin to fall apart, and we no longer have a good way of giving a definition without achieving some undesirable situations or inconsistencies. Still, when it comes to complex to complex numbers $x,$ we try to make the best of it, and we work in terms of roots of unity and the $n$th root of a complex number. However, it becomes completely hopeless if we try to extend it to real exponents, let alone complex exponents, and let us not mention exponents in other algebraic structures. The only way to make these latter work is if we restrict what $x$ can be to a specific set of values, which is not satisfying, and what that set of values is may not be unique, and even if we do the restriction, there may not be a unique value that exists that one can assign to $x^c$ when $c$ is real or complex, even despite the restrictions. So working with expressions like this is something mathematicians tend to avoid, due to how inconvenient it is.
Nonetheless, you may see that in some circumstances, the definition $z^w=\exp[w\log(z)],$ provided a suitable definition of $\log,$ is quite useful, but this comes at the cost of defining $0^z.$ Here, we arrive at a situation where the definition of exponentiation based on rational or integer exponents is just incompatible with the definition for complex eponents. The expression $0^i$ is right where these incompatible definitions meet each other, and because of this, none of the definitions can possibly work for it. $i$ is a complex number, but $\exp[i\log(0)]$ does not exist, and none of the previous definitions give an unambiguous extension of $0^x$ to $0^i.$ Because of this, the notation is just extremely problematic.

Why is $0^i$ undefined?


Ubuntu 16.04 - Cannot reboot laptop if the lid is closed?

Question: I'm using an old laptop of mine as a media server, as such the lid is almost always closed.  There is no display other than the lid hooked up.  I have configured Ubuntu to not suspend or shut down if the lid is closed while it is booted and that works fine.  However, if I remote in and trigger a reboot then the system does not reboot properly, it just shuts down, if the lid is closed.  The lid must be open to reboot the system.  How might I change this behavior?  Ideally I'd like to be able to trigger a reboot from anywhere that I can SSH into the system from.
Answer: I cannot directly answer your question but might be able to point you in the right direction.  ACPI is likely involved.  A quick test would be to boot without it by adding acpi=off to your grub kernel line.
How do I disable ACPI when booting?
Conversely, you might need to tweak an ACPI script to make reboot not actually do the equivalent shutdown -h now
Likely also a good time to learn more about ACPI, it's actually pretty neat.
http://manpages.ubuntu.com/manpages/bionic/man8/acpid.8.html


Feature request: Timer presentation

Question: Here and there, timers apply in connection with editing. As editing can require extensive research in parallel, a presentation of still left time would be very helpful. This would prevent well-elaborated comments from being refused and prevent the frustration because of the refusal.
Answer: Only comments are on a timer. Remember, comments are meant to be ephemeral and temporary. If you are performing "extensive research," you should probably be summarizing that research in an answer, not a comment. Answers can be edited for days or weeks – or even months or years.
Comment: "comments are meant to be ephemeral and temporary", but in reality they're often more than that. I see often comments containing crucial information, which could be answers (if we disregard their form). I wonder why it is like that but it teaches me somehow not to be too quick with posting answers and to provide research results in comments. As if someone was to take all the valueable comments some day, to compile them and to present a community answer... Well, I'm still a newbie here. And your answer teaches me to change my approach. Thanks.

Feature request: Timer presentation


Interpolation of Zero rate curve

Question: I have the zero rates at certain time nodes, say 3-month, 5-month, 8-month,...,2-yr,... Now I want to interpolate the curve so that the implied one-month forward rates are piecewise linear. That is, between two nodes, the forward rates are linear. I have no idea where to start. Can someone help?
Answer: Suppose that you interpolate your zero curve, i.e. your discount factors at time $k$, $v_k$, using a log-quadratic approach:
$$\ln(v_i) = \alpha + \beta D_i + \gamma D_i^2 $$
where $v_i$ is a discount factor between two known discount factors, $v_k$ and $v_{k+1}$, and $D_i$ is the day-count-fraction between the dates associated with $v_k$ and $v_i$.
Note that in order to derive the parameters $\alpha$ $\beta$ and $\gamma$ you need boundary conditions for your interpolation, for example endpoints alining and one initially zero derivative:
i.e. if $D_k=0$ then $\alpha = \ln(v_k)$
i.e. for $D_{k+1}$ then   $\; \ln(v_{k+1}) = \ln(v_k) + \beta D_{k+1} + \gamma D_{k+1}^2$
i.e a derivative is assumed at start (e.g. zero derivative): $\implies \beta=0$
Consider the discount factor on the day following $v_i$, $v_{i(+1d)}$:
$$\ln(v_{i(+1d)}) = \alpha + \beta (D_i+\frac{1}{360}) + \gamma (D_i+ \frac{1}{360})^2 $$
Then the overnight continuously compounded rate for the date associated with $v_i$ is:
$$ r_i = 360 \ln (\frac{v_i}{v_{i(+1d)}}) = -\beta -\gamma (D_i + \frac{1}{360})$$
You can observe that this is linear in $D_i$ indicating that continuously compounded overnight rates are linearly interpolated between dates $k$ and $k+1$.
Does this mean that your implied one-month forward rates are piecewise linear. No, but its not going to be far off. If you want to derive a curve interpolated in terms of rates then you will need a configured optimiser I expect.

Interpolation of Zero rate curve


Animal euthanasia in Halacha

Question: According to Halacha, is it prohibited or permissible to do animal euthanasia on sick or injured animals? Or would it be prohibited as a violation of Tzaar Balei Chayim?
Answer: It is permissible.
aish.com writes here

We are permitted to put an animal to sleep to avoid its suffering. The
reason is because the Torah requires us to alleviate the pain of
animals (based on the verse obligating us to help our fellow unload
his overladen donkey (Exodus 23:5)). On the other hand, we are allowed
to kill animals when we have a good reason – such as for their meat or
if they are threatening us. Putting the two points together, we are
allowed to euthanize an animal for the good justification of
minimizing its pain. (See Rema E.H 5:14, Noda BiYehuda 2 Y.D. 10,
Techumim X p. 258.)

ohr.edu adds

I asked Rabbi Chaim Pinchas Scheinberg, shlita, about the ruling in
this case, and he told me that it would be Halachically permissible to
put an animal to sleep since it is a painless procedure. However,
there is a Kabbalistic tradition, he notes, that forbids the ending of
any life.

See also here.

Animal euthanasia in Halacha


Contour triangulation

Question: I write my study and is stuck when i try triangulate the contour of surface. When it is in 2D its ok. When it in 3D a have trouble with triangle angle detection, i tried with:
Triange have 3 Vertices v1,v2,v3
I create 2 vectors(vec21, vec23) from v2v1 and v2v3
then vec21 x vec23 and obtain a det of matrix
on the stand which I define Span angle
I also check if edges do not crossing and if any point isnt in area of triangle.
But when it in 3D i choose point around polygon then this metod didn't work
Points of contour i want triangulate to flat polygon: https://docs.google.com/open?id=0Bw5-VXnqutXBckRJMGNJMW9JaXc
Bad resoult: https://docs.google.com/open?id=0Bw5-VXnqutXBMzV5elIxX1FaeDQ
In 2d:
Points on 2D :https://docs.google.com/open?id=0Bw5-VXnqutXBWVE4bWJsZ09mOVk
Good resoults:https://docs.google.com/open?id=0Bw5-VXnqutXBdGFKM2Z4UnFRdXc
Where i made mistake? Can u explain me this?
Greetings!
PS. Im interested in algoithm at 2 last case:http://www.cosy.sbg.ac.at/~held/projects/triang/triang.html
Answer: Typically one would use a Delaunay Triangulation for the 2D case. For the 3D case you can project the points to 2D, triangulate and project the triangles back to 3D. This will of course only work if the patch to be triangulated can be projected to 2D (without selfintersections).

Contour triangulation


How to implement turn based multiplayer using only LAMP stack and http client?

Question: My web hosting solution is a very cheap cpanel account - I can only run php scripts in response to http requests or cron jobs at long intervals (I think 10 minutes). I'd like to implement a multiplayer game wherein:

a lobby is created by the game creator
other players join slots in the lobby
the creator decides when to start the game, whilst looking at the slots
whilst the game is in progress, the clients all swap their scores regularly - say every few seconds (this is the only interaction between players during gameplay)
when the game is complete (due to the time being up) a summary is sent out to all players

Using PHP and MySQL I can sort of accomplish this, but the fact that all my php scripts are running in different processes is making me wonder what the best way to do this is. Does anyone have any advice? I know about table locking, but am wary of a solution which relies heavily on this feature in case it doesn't scale.
Thanks,
Charlie.
Answer: You're looking for Comet.
Comment: Thanks for this, it looks interesting but a little heavyweight for my needs. Also, it looks like I can't implement using my current hosting situation?
Comment: Long polling can always be implemented, unless you have a screwy web server.


Firewall that allows only smtp

Question: I have a network that at the moment is isolated from the internet. We are going to connect it to an existing adsl line that has a firewall,but we want to add another firewall behind it as we do not have total control over the existing firewall. The only thing we want to allow is smtp access for one computer. Can we then just put in the new firewall and only open up for port 25 outgoing?
The firewall that I want to use is a
POWERBIT SAFEGATE FIREWALL IX78 is this an acceptable choice to use?
Answer: I think TCP 25 OPEN should be enough, however if you're dealing with only one server, you can limit the connection from that specific machine (PC) to that specific server; for the sake of extra security.
Answer: i think in your firewall there is a location that is related to your policy and in this situation there are a lot of features and services for controlling smtp,imap,http,ftp ,etc.you can use smtp settings part for solving this problem.in additional, behind this location you can limit your  accessibility from a specific pc or specific server.

Firewall that allows only smtp


Accessing a CentOS 7 server running on VirtualBox from outside

Question: Is it possible to access my Apache server from outside the VirtualBox on Google Chrome browser on my host computer? Its running on CentOS 7 on VirtualBox. I have tried connecting to the ip address of the CentOS virtual machine but it didn't work. Its using 'Bridged Adapter' networking in the VM settings and i checked the ip address using the 'ip addr' command. Thanks.
Answer: I met the same issue. I fixed it as the following:

In the VM network settings, using 'Bridged Adapter'.
Turn on the port of CenOS7: using the following command in terminal(for example port 8080):

$ firewall-cmd --permanent --add-port=8080/tcp
$ firewall-cmd --reload

My environment:
Host : Win7 64bit
Guest:CenOS 7
Comment: Works great, thanks. Interestingly this step doesn't seem to be necessary on Debian-based systems.
Answer: You can use a single NAT (without a second adapter):
Set adapter No1 to NAT, then click "Port forwarding", type (for example) 8080 in Host port, and 80 in Guest port (no ip addresses needed).
You may also (optionally) wish to map SSH here to a different port.
Then in the CentOS 7 VM, once your Apache or NGINX server is installed and running (eg: yum install nginx, systemctl start nginx, systemctl enable nginx), configure the firewall as niaomingjian suggested, but perhaps more properly:
sudo firewall-cmd --zone=public --add-service=http --permanent
sudo firewall-cmd --reload

Then navigate on your host machine to http://127.0.0.1:8080 and check you get the welcome page.
If this doesn't work straight away, try stopping and starting the firewalld service, or rebooting the VM.
Comment: It worked for me! Thanks a lot!
Answer: You can divide the problem into smaller parts that will help troubleshooting:

Use 'ping ' from the host to the guest to determine if you can reach it.
Check if there are firewalls running on the guest that blocks ping and/or www ports (e.g. 'iptables -L'.
Open the web page with a browser within the guest to check that it's actually running and accessible.
Comment: Sounds like a reasonable strategy, though rather short on details. For example, in step 1, what ip/name do I ping?


Convert Helios-44 m39 mount to use it as magnifying lens

Question: I own a Helios-44, it has a m42 screw mount and does not own a focus ring.
Is it possible to use this lens as a magnifying lens for analog prints, with a standard photo enlarger for analog prints.
With a m42 to m39 adapter it could be screwed on the enlarger, will it give a decent quality compared to real magnifying lenses like a lower quality 50mm 3.5 Rodenstock Trinar.
Comment: No, I like to use it as a analog magnifying lens to make analog prints.
Comment: Do you mean, use it as a macro lens at the front of a bellows?
Comment: Ahhh, an enlarging lens :)
Answer: It is unclear from the wording of your question, how you intend to use this lens. That being said, likely this lens is a Russian-made camera lens -- probably 58mm (focal length).
Camera lenses can be mounted on an enlarger in lieu of a proper enlarger lens.  Camera lenses generally perform substandard for this application. What is needed is a flat-to-flat projection lens which is the specialty of an enlarger lens. A camera lens often yields blurred edges, but many find such a presentation to be acceptable.
You might be attempting to make copies of photographic prints using your camera. Most cameras will perform this task without the need to make optical modifications.  If your camera won't allow close-focusing, a simple fix is to buy an inexpensive close-up lens. These you mount before the existing camera lens.  Consider buying a +3 close-up lens.
The tried and true solution to make close-up pictures is to buy a macro lens.  These can be quite costly and therefore out-of-reach for your budget.
Could this Helios lens work for your camera? You would need to figure out how to mount and how to focus. This could be a daunting task and costly. Keep in mind, your existing  camera lens and camera will likely allow you to make close-up pictures. It won't do you any harm if you read your camera manual to find out how this is accomplished.
Comment: Sorry, for the misunderstanding. I like to use this lens on an analog enlarger to make analog prints. I have m39 screw mount lenses from Schneider and Rodenstock which I use for this task, but this Helios is a much better corrected lens as my Trinar 50mm f/3.5. With an adapter I could use the lense there, but would it make sense?
Comment: This lens will work as an enlarger lens however an enlarger lens is corrected to work from a flat negative and project an image onto flat photo paper. A camera lens is corrected to work a curved field and project on flat film. I don't think you will gain however, as an experiment, go for it!


Sitecore 9.1 and Active Directory compatibility question

Question: I was looking into installing Sitecore 9.1 and was reviewing the modules compatibility table for XP (https://kb.sitecore.net/articles/541788) and was surprised to see no support for Active Directory modules. That would be a deal breaker for us. Did they replace it with something else to allow you to configure connectivity with Active Directory?
Please and thank you.
Comment: I reached out to Sitecore shortly after 9.1 was released and asked about just this very thing. At this time they have no production ready support for using Active Directory. There is something in the works but nothing published officially.
Answer: Sitecore 9.1 uses an Identity server to handle logins instead of the old methods.
"With federated authentication now in widespread use across the industry, Sitecore finally provides user authentication and authorization through a centralized federation service. Built and run as a separate application, Identity replaces the traditional Sitecore login process, and provides federated authentication options and single-sign services in one portal."
9.1 sitecore updates
Sitecore 9.1 Identity Server
Comment: It would be good to potentially show how you would connect Active Directory to Sitecore 9.1 using Identity Server
Answer: Sitecore Experience Platform 9.1.0 or later does not support the Sitecore Active Directory module. You can use the Sitecore Identity server as a federation gateway to let users log in to Sitecore through an external provider. Below are the steps to integrate Azure Active Directory(AD) with the Sitecore identity server. This will enable the user to log in to Sitecore via organizations credentials using SSO.
Azure AD set up

Go to the Azure portal and look for the Active Directory module and create a new tenant by providing the organization name and domain.
Go to your directory and click on 'App registration' then click on 'New Registration'. Give this app a name and select the tenant we have created and give Sitecore identity server URL (append /signin-oidc) in 'Redirect URI' field.

Note down the Client ID and tenant ID. You'll need these when configuring Sitecore Identity.
Go to the Manifest tab and edit groupMembershipClaims setting to SecurityGroup.

Setup Sitecore Identity

Navigate to the identity server instance and go to this path \sitecore\Sitecore.Plugin.IdentityProvider.AzureAd\Config.
Open Sitecore.Plugin.IdentityProvider.AzureAd.xml for edit. You can change the display name. Give the values of client ID and Tenant ID which we noted down from Azure AD. Don't forget to change Enabled to true.

Restart the Sitecore identity server and try to login to CMS. You should see the below screen.

Click on the Azure AD button and it will take you to the Microsoft sign-in (organization SSO) page. Since we did not map any user (who will be authorized to log in ), we will not be able to log in. To do that you'll need to map the AD users with Sitecore.

Reger to my blog to see this implementation in detail: https://sitecorewithraman.wordpress.com/2021/01/01/sitecore-cms-azure-ad-integration/


Wave Function concept

Question: What do we mean when we say wave function of electron? Does it mean wave nature of electrons? I am really confused.Without clearing this confusion i cannot proceed to molecular orbital theory.I am just a beginner .I just want a theoretical concept of wave function of an electron not involving too much of modern mathematics.
What is a wave function of an orbital? is it same as wave function of an electron??
Comment: Related: [Is the wave-particle duality a real duality?](http://physics.stackexchange.com/q/46237/50583)
Answer: A wavefunction of a quantum system is the system's state written in a particular form - no more nor any less than that. Here the word state has an exactly analogous meaning to the state of a classical system insofar that the state at any time uniquely defines the state at any other time and contrariwise. The state's evolution with time in either a quantum or classical system is utterly deterministic. Any linear system - classical or quantum(see footnote 1) - has a state whose time evolution is defined by a first order equation of the form $\mathrm{d}_t\,\psi = A\,\psi$ - in the case of a quantum system the operator $A$ is skew-self-adjoint - i.e. of the form $i\,H$ where $H$ is self-adjoint - so that the state vector's $L^2$ (Pythogorean) length is preserved(see footnote 2).
The difference between a classical and quantum system is that for the classical system, knowledge of the state uniquely defines the system's behavior and what measurements we shall take from the system, whereas for a quantum system the state defines probability distributions for measurements. Moreover, straight after a measurement, the state of a quantum system is uniquely determined by the actual measurement one gets.
By dint of the experimentally observed behavior that a quantum system is in an eigenstate of the measurement operator (observable) straight after the measurement, it is convenient to write the state vector with the eigenvectors of the measurement operator in question as basis - in such a basis the measurement operator is diagonal (a "multiplication operator") with the measurement values (eigenvalues) along its diagonal.
Some people reserve the word "wavefunction" strictly for a one-particle state and when the state is written with the eigenvectors of the position operator as basis. In that case the wavefunction's square modulus can be loosely interpreted as a probability to find the "particle" in question at the position named by the eigenvalue. This is what people mean, for example, when they say that the photon has no wavefunction, because it is very difficult to define a position operator for a relativistic particle, and there is no nonrelativistic description of the photon. However, many other people (myself included) simply take the wavefunction as a synonym for "quantum state". You need to be aware of both usages in reading. I am fairly old and I get the impression - from some of the younger active members on this site- that the strict reservation of the word to mean "state in position co-ordinates" is the more modern and current one - particularly in education and so I tentatively recommend you should probably adopt this one.
Footnotes:
[1]. These comments hold in the Schrödinger picture, where measurement operators are constant and states time varying. A unitary transformation shifts us into the wholly equivalent Heisenberg picture, wherein states are constant and measurement operators time varying.
[2]. Preservation of the Pythagorean length makes sense in the Born interpretation - it's simply saying that the probability for the system to end up in some state is unity!
Comment: Interesting stuff Rod. I don't know if you've seen http://arxiv.org/abs/quant-ph/0604169 or stuff by Jeff Lundeen et al, see http://www.photonicquantum.info/ and [Nature](http://www.nature.com/nature/journal/v474/n7350/full/nature10120.html). Maybe your "quantum state" usage might become more prevalent in future.
Answer: In quantum mechanics we use a wave function to describe the quantum state that an electron is in. It basically tells you where you are likely to find a particle. Notice how it is typically introduced as a function of position. That is because by taking the value at a certain location and squaring it we get the probability of finding it there.
Answer: The "wave function of an orbital" is just referring to "the wave function for electrons the corresponding state". When speaking of electron levels in an atom, it is commonly accepted the Copenhagen interpretation of Quantum Mechanics, where a wave function of an isolated system, contains all the information relevant for its full description.
Rigorously you would need to describe the whole atom (nucleus and electrons) with a unique wave function, but the fact that their behaviors can be decoupled, based on experimental evidences, and this means we can write separate wave functions for the nucleus and for the electrons. Even more, we generally give separate wave functions for each of the electron levels, which we distinguish by specifying the distinctive properties, which are level energy $n$, total angular momentum $l$, and angular momentum projection $m$ (Orbital names)
These wave functions contain the information of the electron in an atomic level, which are given generally in terms of the spatial coordinates, and they provide information on the spatial distribution of the electrons, i.e. the squared modulus is the probability density function of finding the electron in space, according to the Copenhagen interpretation of Quantum Mechanics.

Wave Function concept