Temperature dependence of emission spectra?

Question: Since an emission spectra represents electrons moving back down to different energy levels and releasing a photon with the energy difference, wouldn't the emission spectra of a star be temperature dependant? Wouldn't the hotter stars have more electrons in higher energy states and so have larger energy releases when they fall back? So my question is do we see that hotter stars have a more pronounced emission spectra in the high frequency range of light, if not, why?
Comment: [Wikipedia - Doppler broadening](https://en.wikipedia.org/wiki/Doppler_broadening)
Answer: This is not how stars emit light. Stellar emission is thermal radiation for the most part. So while it is true that stars with higher temperatures emit spectra that are shifted to the shorter wavelengths of light, it has nothing to do with excitation and recombination processes in atoms.
There are often certain lines missing in stellar spectra, which is due to the inverse effect you are describing. Atoms on the outermost layers and surrounding a star can absorb some of the thermal radiation to excite electrons in their shells. These lines can be used to determine which elements are present in the vicinity of a star.
Comment: Would it be the case for the emission of light from a hot gas?
Comment: Whenever the term "hot" is relevant in the emission, that's a pretty big hint towards thermal emission. Electronic excitation and relaxation of atoms is ususally a "cold" process, since whenever things are hot, they tend to ionize and form a plasma. Of course "hot" and "cold" are relative, but I think you get the idea.
Comment: Ah I was asking because in my course we were told atomic spectra depends also on the density of the source, hot and dense (i.e stellar) results in the thermal radiation or continuous spectrum as you mention, hot and not very dense  objects (hot gas) have radiation which consists of only particular colours or frequencies. It was introduced as the first two of Kirchhoff's radiation laws. In that sense I'm not sure I understand why the emission of a hot gas is mainly thermal or continuous as it seems to conflict with what I've been taught.
Comment: From wikipedia about star temperature: "Main-sequence stars vary in surface temperature from approximately 2,000 to 50,000 K, whereas more-evolved stars can have temperatures above 100,000 K. "  So I think we do see that hot stars have higher frequency light, but thermal radiation in wiki is only in the range of about 3000 to 6000K.  Thermal radiation is due more to smaller bands gap transistions between the higher orbitals, stars also have hydrogen which involves a lot of core electron activity which technically is not thermal.


How can I ensure the user can insert and edit data while updating table

Question: I am designing schema. Any idea is welcome!
Right now I have tableA, tableA_cache, tableB, tableC, tableD. If any row insert to tableB tableC or tableD, the trigger will insert data to tableA.
For data integrity, periodically I have to delete all the rows in tableA then re-populate data from tableB, tableC...etc.
Normally, user query tableA_cache so that even if tableA has no data, user can query tableA_cache. However, during re-population, tableA will be keep writing. At the same time, if user insert a row in tableB (or C, D), the trigger should insert data to tableA. Since tableA is locked, the response time for insert will be extremely slow.
Is there a better way to handle this case? or a direction I can look into. (There is no guarantee that in specific timing no user will use the system.)
Answer: Get rid of all the complex design.
Plan A:  Get rid of A and A_cache and the trigger and the rebuild; run queries against B and C.  Perhaps you need better indexes?  Or "Summary tables"?
Plan B:  (More directly in line with your design.)  Get rid of A_cache. Do this, which will avoid A ever being unreachable:

Create A_new from B and C
RENAME TABLE A TO A_old, A_new TO A;  -- atomic and instantaneous
DROP TABLE A_old;
Answer: You can use SERIALIZED LEVEL of transaction for data integrity.
SQL:
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
START TRANSACTION;
...make you sql job...
COMMIT;
SET TRANSACTION ISOLATION LEVEL <as needed>;


How long should it take for a well pump to fill the tank after a power outage?

Question: Power out for 11 days. Just came back and well pump is running but no pressure inside house or outside. How long for 50 gallon tank to fill. will that give us pressure when tank is full?
Comment: If it is a pressurized bladder tank it will not fill all the way because of the bladder.it should have pressure right away even without the tank. The pump should provide the pressure.
Comment: Is pump primed? What is capacity in gpm of well, and pump?
Answer: Is the pump a submersible type (pump down in the well) or a jet type pump with the motor and pump in the house or above the ground? If it an above ground pump, you probably need to prime the pump which means that you will need a pump guy shortly to fix an upcoming problem. If it is a submersible are you sure that the pump is running? The tank should fill in a couple minutes. The actual time depends on the size of the pump.
Answer: I was called in a while back for a system with a submersible pump that was totally empty, the pressure tank had a good charge but the pump was shutting down, it was a deep well and the air pressure was filling the tank and shutting off the pump, all it took was opening the drain valve for 3 or 4 minutes until the water made it to the tank, then it filled and shut down normally, The home owner had not let the pump run for more than a minute because was worried about damaging the system. There may have been some crud stuck in the check valve that allowed the water to back flow but after getting water the pressure was solid. Note I have only seen this one time, If a jet pump d.George is right on the need to prime the pump I have had to do this many times.


I only know folio number and do not have any document regarding my share

Question: My father have bought shares of a company and he does not remember anything about it.  I just got a dividend cheque from the company which consists of folio number.  How can I get information about the share and how can I get it transfer to my demat account.  I also don't know the bank which consists this share.
Answer:
I just got a dividend cheque from the company which consists of folio number

Assuming that these are physical shares. The dividend cheque should give you the details of Share, the number of Shares held. The envelope that came with it should have details of the registry that manages the services. Write to then and explain. You may have to provide the required paperwork. They will also tell you the process to convert to electronic/demat and required paperwork to transfer to your account.
Edit:
As your father does not have demat, these are held as Physical Share certificates [Not with any Bank]. Write to the registrar of company saying you have lost the Originals and need to convert into electronic form and transfer to your demat account. Your Bank where you hold the Demat Account will also help you complete the processes.
Comment: @totoro: Getting the divided check only means you have not arranged for the divided to be deposited directly into a bank account or reinvested in additional shares.
Comment: I know the company name , number of shares I own but I do not know which Bank hold these shares, As my father do not have any demat account .
Comment: If I got dividend cheque does that mean shares are not in any bank?


GeoIP doesn't work

Question: When I open Network Map, all of the country flags show up as null, and the map is unannotated.

It's a fresh installation of Vidalia Relay Bundle, and geoIP is in AppData\Local\Vidalia, AppData\Local\Tor\, as well as AppData\Roaming\tor\geoip.
I also want geoIP, for example, to restrict exit locations.
How do I make exit geoIP identification work?
Answer: geoip.vidalia-project.net has been shut down.

GeoIP doesn't work


One piece english dubbed

Question: I heard from here at least that the release date for episodes 555-574 english dubbed will be released on March 20th for one piece. What the frick is going on. Unless someone's info. Was wrong. The episodes should be up.
Comment: While it has been resolved in the answer, I'm curious from where you heard about this, because when I searched for "one piece 574" or "one piece dub" on this site, I didn't get any result other than this question.
Answer: according to both Wikipedia and Rightstuff the DVD Release of the 4th part of Season 9 (Season 9, Fourth Voyage which covers Episodes 553-563) is the 20th of March 2018 and as of writing this (21/03/2018 GMT+10/11) it is in stock (as opposed to pre-order) as such the information is correct if it was talking about DVD release
for the rest (564-574), Part 5/Fifth Voyage isn't expected to be out until the 15th of May and still only a Pre-order on Right Stuff
this is further backed up by English Dubbed Anime Lovers

The episodes should be up.

if by this you are referring to Streaming i can't check Funimation as Geoblocking prevents Australians from viewing the page however as it is Funimation who releases the dubbed DVDs it's likely they have it up there already (since the DVD is out for 553-563)
Chrunchyroll has had the episodes since atleast Jul 26, 2014 though it might be the subbed version and the series list doesn't list anything about subbed or dubbed.
Comment: http://www.english-dubbed.com/knowledge-bazaar/upcoming-english-dubbed-release-dates/ Season 9, Voyage 4 is 553 to 563.
Comment: @кяαzєя ahh right, i forgot about the other half

One piece english dubbed


Case sensitive search magento 2 Grid UI component

Question: I created Magento 2 Grid with UI component and it works with all of the things (filters, columns, sorting ) but I want to search with Case sensitive(as of now it works with searching but by default is not case sensitive. For example ABCDEF and ABCdef both are different). So is there any way to search with case sensitive in UI component?
Answer: The problem could be with the source: I'm assuming here that your grid uses a collection to show your entities. So your search is applied on the collection. This roughly translates to a SQL-query like:
SELECT * FROM `table_name` WHERE `field` LIKE '%ABCdef%'
SELECT * FROM `table_name` WHERE `field` = 'ABCdef'

If your column in MySQL is not set as binary, your search is case-insensitive. This is the default value for a lot of columns, and is also the default if you create your own table columns without explicitly setting it to binary:

So if you want your search to be case-sensitive, make sure that your storage engine is as well. This can be done in the install-script of your module or in an upgrade script.
I'm not sure if the default Magento addColumn() / updateColumn() support this by setting options, so it could be that you need to do some raw SQL query for this one. For example:
ALTER TABLE `table_name` CHANGE `field` `field` TEXT CHARACTER SET utf8 BINARY NULL COMMENT 'My Field';

update
If you don't want / can alter your table, or you want to case sensitive search to be optional from the frontend you'll have to hook in to the filtering process of your collection so it will inject a binary search ad-hoc:
SELECT * FROM `table_name` WHERE BINARY `field` LIKE '%ABCdef%'
SELECT * FROM `table_name` WHERE BINARY `field` = 'ABCdef'

I haven't tested it yet, but this should work:
$collection->addFieldToFilter(new \Zend_Db_Expr('BINARY `field`'), ['like' => 'abc']);

Comment: Thanks for answer, It seems like a valid point, let me check it at my end +1. one more thing suppose If I will add my column as binary then it will always search as case sensitive but I in the filter column I added option to search case sensitive with `Yes` or `No`, so do you have any Idea or any suggestions for this
Comment: If that is the case then you don't need to alter your table but just add `BINARY` to your query. I'll update my answer. But this implies that you must add some logic to how your collection is filtered.
Comment: You are absolutely right in your answer :) but I am filtering collection in the grid (which is built by UI component) in this case I am not sure @Giel
Comment: If I'm not mistaking a UI component calls a dataprovider (XHR) that is driven internally by a collection. So what you need to do is make sure that your "case sensitive" option is passed to the dataprovider in the backend and filter the collection accordingly. This could imply that you might have to do some more backend work, since typically for such tasks you would create a virtual type for your grid collection but now you need to add some logic to that. Perhaps a plugin could do the job as well.
Comment: Thank you so much for your suggestions, I think I just need to play inside to make it work. :)


which Uncrustify setting replaces blank lines with indenting spaces?

Question: I've done a number of read-thrus of my Uncrustify settings page over the past couple days but haven't found the setting.  Perhaps a second pair of eyes knows what I am missing.
In my source code, the blank lines within functions are getting replaced by indenting spaces.
For example (the two blank lines there are simply just returns):
int foo()
{

    return 1;

}

turns into:
int foo()
{
____
    return 1;
____
}

(well, the "_" you see there are actually blank spaces)
Which Uncrustify setting controls this behavior?
Answer: I had this same problem, and figured it out.  It's not Uncrustify doing this, it's actually XCode.
If you run Uncrustify outside of XCode, it will not insert the blank tab/spaces on the blank line (and if they are there it will actually remove them).
Discovering this, I found out that it's the XCode preference "Automatically indent based on syntax" setting that when enabled (and it's enabled by default), will insert the spaces on blank lines after Uncrustify runs.
To answer your question, I never figured out which Uncrustify setting removes the blank spaces, but I can tell you, that with my default Uncrustify config file, it did remove the indenting spaces on the blank lines.
Here's the XCode setting in XCode (5.0.2)
Comment: Yeah, just saw this too - had me scratching my head. This worked for me as well… but for the most part I will just be running Uncrsutify for now on.
Answer: In case any future readers are struggling with this the option is indent_single_newlines.


Why is it useful to have the same amount of data in each level of a categorical variable?

Question: Something my lecturer said but I can't find why this is the case. I have to make a continuous variable into a categorical one, and the data is left skewed. Is it more important to have equal ranges or equal amounts of data in each range? Why?
Comment: Why do this any way?
Comment: There is much good advice in the thread identified as duplicate, but it isn't what the OP is asking at all. A duplicate isn't ever the different question you should be asking.
Comment: Possible duplicate of [What is the benefit of breaking up a continuous predictor variable?](https://stats.stackexchange.com/questions/68834/what-is-the-benefit-of-breaking-up-a-continuous-predictor-variable)
Answer: My answer is - it depends.
It depends on why you do the discretization of the variable. If you want subsequently to build a statistical classifier from the discretized variable(s), you need to choose a binning (meaning the set of thresholds defining the interval bins all together), which is optimal for discerning the categories. If your purpose is merely display of the variable distribution in a histogram, you often prefer a uniform binning where the width of each bin is equal all the other bins.


How to determine the limiting current resistor for instrumentation amplifier

Question: I am using this instrumentation amplifier to measure the output voltage from a solar cell. This IC has the input protection by using a resistor Rlim, and the datasheet includes the equation for calculating the value of that resistor, shown in below screenshot. My Vs is 3.3 V, and this Vs shares the same GND with the amplifier. My V+ and V- connect to the solar cell positive and negative terminals. The maximum output voltage from the cell is 0.5 V. That means I don't know what value V+ and V- referenced to the amplifier's GND is. If I'm using 0.5 V for Vover and 3.3V for Vs, I will get a negative number. So, I wonder if I am doing anything wrong here.
.
Comment: You have to define the potential of the solar cell with respect to the amplifier one way or another. The easiest way is to connect one terminal of the solar cell to the amplifier's ground. Otherwise it will be floating, as you've already determined, and that will mess up your measurements.
Comment: Why wouldn't you be able to connect the grounds? The fact that the DC/DC converter is isolated makes this even easier - just connect GND to V- of the solar cell and it should all work. Since the solar cell and amp are connected anyway, there's no proper isolation in the first place, only a badly floating voltage that skews your measurements.
Comment: Is there another solution for this if I can't connect one terminal of the solar cell to amplifier's GND? I am using an isolated Dc/DC to step up 0.5V to 3.3V and use this 3.3V to power the amplifier. Since the DC/DC is isolated, I can't connect one terminal of the solar cell to amplifier GND...
Comment: that makes sense. Thanks !
Answer: In the text you have provided, from the data sheet, it mentions that the inputs are  clamped to the supplies,  and if the input voltage(s) exceeds VS you should use the RLIM as  shown. Clamping in this case means that the "clamping diodes" shown connected between the input and the power supply pins conduct when the input voltage magnitude is greater than the power supply pin magnitude. You need to determine what the largest overvoltage can be, and then use the equation from Ohms law I=E/R or, in this case R=E/I. The data sheet says limit the current to 10 mA so the I is 0.01. The E is the largest voltage you expect (negative or positive) and the E is the difference from the appropriate supply. (The clamping diode has to be forward biased) I am ignoring the forward voltage of the diodes.
Comment: Thank you ! That helps. Do you think the equation above is wrong? because right before the diode, we should have Vs+0.7. So the equation should be (Vover-(Vs+0.7))/10mA= Rlimit?


Help with writing proofs

Question:
Prove that for any sets A, B and C if A  is a subset of B, then  A – C  is a subset of  B – C.
Answer: take any $x\in A-C$. You have $x\in A$ but $x\notin C$. Since $A$ is a subset of $B$ it follows that $x\in A$ implies $x\in B$. This means $x\in B$ but $x\notin C$. You write this as $x\in  B-C$. Since $x$ was taken arbitrarily you have that for all $x\in A-C$ it follows $x\in B-C$. Therefore $A-C\subset B-C$
Answer: Here is a proof of roughly the same length, but in a different (calculational) format:
$$
\begin{align}
& A - C \subset B - C \\
\equiv & \;\;\;\;\;\text{"definition of $\subset$; definition of $-$, twice"} \\
& \langle \forall x :: x \in A \land x \not\in C \Rightarrow x \in B \land x \not\in C \rangle \\
\equiv & \;\;\;\;\;\text{"logic: simplify: assume part of antecedent of $\Rightarrow$ in consequent"} \\
& \langle \forall x :: x \in A \land x \not\in C \Rightarrow x \in B \rangle \\
(*) \Leftarrow & \;\;\;\;\;\text{"logic: weaken by strengthening antecedent of $\Rightarrow$"} \\
& \langle \forall x :: x \in A \Rightarrow x \in B \rangle \\
\equiv & \;\;\;\;\;\text{"definition of $\subset$"} \\
& A \subset B \\
\end{align}
$$
All steps are really uncreative, except for the key step $(*)$, which is strongly suggested by the shape of the formulae.

Help with writing proofs


Energy Question

Question: Carl throws 100 g of Bohrium-262 (Half life: 0.10 seconds, undergoes alpha decay) to Sukhdeep with a initial horizontal velocity of 20.0 m/s at an initial height of 2.00 m above the ground. What is the mass and final energy of the ball of Bohrium if Sukhdeep is only 5.00 m away from Carl?
Comment: A word of advice: adding "urgent" to the title or text of your question is unlikely to garner much sympathy. It suggests that you have delayed work because you assume that we will do it for you, nor do may people post to site like this because they'd like an answer *"whenever you get around to it, say Wednesday week or so"*.
Answer: Conceptually, you can figure out how long the ball will take to reach Carl, by recognising that it is going to move at a (for practical purposes) constant horizontal velocity. This will allow you to figure out how much it has decayed in that time.  Lay out your equations:
$${x \over t} = v$$
$$m_{final} = m_{initial} \left({1 \over2}\right)^{t \over t_{halflife}}$$
where $x$ = distance, $t$ = time, and $v$ = initial velocity
Just scanning those equations, already you're given all but two of them directly in the question:
Two equations and two unknown variables means you can solve for all variables --
Calculate the final mass and, use that to get its final energy.
(note that the final energy will have both horizontal and vertical components, so you'll need to figure out how much it's accelerated towards the ground due to gravity.)
Comment: I'm not allowed to solve using Kinematics equations, I have to some how solve this with E = (mv^2)/2 and E = mgh
Comment: @SyedKamran well, you can use those equations to calculate the final kinetic energy (kinetic energy horizontally, plus change in potential energy vertically).  You must need *some* other equations, right?  Otherwise how could you calculate the decay due to half life.
Comment: @dbaseman When the atoms decay, they don't vanish into thin air. Your expression for mass vanishes for t tending to infinity, which is wrong, since we still have a considerable mass of the ball as "radioactive waste". See my answer below.
Answer: Since the halflife is short enough and the ball is massive enough, we can assume that many decays take place, and the produced alpha particles are emitted in a spherically symmetric pattern away from the ball. This means that the recoil from the decays averages to zero, and the ball moves at constant velocity (i.e. momentum per unit of mass is conserved), so $$t = \frac{x}{v_x}$$
Note that this is not even an approximation.
Now, the number of Bohrium atoms as a function of time is $N=N_0 * 2^{-t/t_{half}}$. Each successive decay makes a single Bohrium atom lose the mass of about 4 proton masses, so it retains only 258/262 of its original mass. Thus, the mass at any time $t$ would be:
$$m(t) = m_0 * (2^{-t/t_{half}}+\frac{258}{262}(1-2^{-t/t_{half}}))$$
Plugging in the time of flight above yields the final mass. Since mechanical energy per unit mass is also conserved (again, because of the symmetry of the emission), the final energy is the sum of the initial kinetic and potential energy when the ball is thrown times that fraction of remaining mass when the ball is caught.

Energy Question


Minecraft Datapack advancements not working

Question: I was making a custom achievement, but the funtion in the reward doesn't run when the conditions are met. The advancement does grant appear in the /advancement command and it does grant the reward when I manually grant the achievement, but it doesn't grant the reward when not doing it manually.
Advancement JSON
{
    "criteria": {
        "glass_breaker": {
            "trigger": "minecraft:recipe_unlocked",
            "conditions": {
                "recipe": "room:glass_breaker_crafted"
            }
        }
    },
    "rewards": {
        "function": "room:crafted_glass_breaker"
    }
}

I have it so when the achievement is unlocked it will run a function that gives the player the custom item then revokes the advancement.
Answer: This advancement seems like it is supposed to trigger when the recipe is unlocked, but is there another advancement that allows it to be unlocked? That was an issue I ran into early on. There needs to be another advancement that triggers when a condition is met (say, collecting stone) that grants the recipe. You can test this with /recipe give @a *
Also it needs to be in your own room namespace. Assuming the formatting is correct, it does seem that it should trigger when the recipe is unlocked.


Can you establish a weak/common password policy in Active Directory in line with NIST guidelines?

Question: Does anyone know if it is possible within Active Directory to add a table of 'weak passwords' that will be banned? Looking to align password policies with the new NIST recommendations:
https://pages.nist.gov/800-63-3/
Comment: There is no native way to do this in Active Directory - there are a number of third party solutions for this but I've not tested any.
Answer: I'm not an Active Directory expert, but from what I read so far, this should not be possible with AD alone. You might want to take a look at this Microsoft article. It explains how password polices are set up and all that. There is no mention of password dictionaries or blacklisting.
I also found this (mabye outdated) answer in the Windows Server forums. The accepted answer there also says, that this is not possible. This is a post from 2011 though.
There are third party tools which claim to accomplish this. I have no idea if these will actually work and I don't want to advertise them, so I won't link them here.
Answer: It is possible using AD in combination with Microsoft Forefront Identity Manager. Here is an article explaining how to do it. It basically sets up a Management Agent which flags weak/pwned passwords.
Answer: Active Directory password filters are still supported. They are native dlls that plug into lsass on domain controllers and enforce additional password policy checks above and beyond built-in Active Directory password policies.
Downside is that you have to write the dll yourself and implement whatever logic you want yourself, or buy one from somebody who can write one for you.
But what you are describing is technically feasible using the password filter mechanism... you just have to write the plug-in yourself.
Answer: Thanks for the responses. Not sure if anyone else if having this issues, but if you run a Hybrid environment you can implement a 'banned list' of passwords:
https://techcommunity.microsoft.com/t5/Azure-Active-Directory-Identity/Azure-AD-Password-Protection-is-now-generally-available/ba-p/377487


get ip address of person from facebook chat

Question: A person was bugging my friend not necessarily threatening, but like sending useless messages for a long period of time on facebook.
Is it possible to obtain the IP address of such person?
(and then through IP locate the person?)
Comment: Note that IP addresses are neither a confirmation of identity (despite the RIAA hoping otherwise), nor are they even a good indicator of location: For a while my IP address was being reported as 20 miles away from my real location.  This is before taking into account any attempts to obscure the IP address (most of which are successful).
Comment: Why not just block the person, or report them?
Answer: IP addresses are rarely a good way to identify someone: home IPs change often depending on the ISP, and the NAT'ed IP won't necessarily enable you to legally implicate someone within the network if there are multiple clients.
The best way to de-obfuscate someone is to convince them to give up their info willingly. Standing up a forum or website that you convince them to visit or register for is one method with the fewest legal pitfalls(provided you don't misrepresent yourself). This will also enable you to see the IP they connect from, but as noted, this is not sufficient by itself to determine the identity of someone.
To be sure you find the IP of the person you intended and not some random visitor, you can configure your site to redirect all requests to some default page (e.g. index.php), and hand them a link with some random junk appended:
hxxps://mysite.io/j4hhh5j3 -> 503 redirect to index.php
Then just locate that GET request within your apache access.log, and voila.
Keep in mind that this is just surface-level stuff; it takes 20 minutes to get a domain, get an ssl cert (zerossl.com is a good way), stand up a server on AWS, and set up a simple php website.
If this seems too complex, you probably shouldn't be trying it. Report and/or block them and move on.


Enum constant specific initialization

Question: Now, we all know that an enum is a great way to do multitons (ie. a class which has a fixed number of instances, known at compile-time), as each constant is pretty much a singleton subclass of your own enum class.  However, I've run into a problem of how to make an enum constant specific initialization.
Suppose we have the following enum:
public enum InputMethod {
    FOO {
        private final FooFactory factory;

        public Document createDocument(String inputString) {
            return factory.createFooParser().parse(inputString);
        }
    },
    BAR {
        public Document createDocument(String inputString) {
            BarBuilder builder = new BarBuilder();
            builder.setInput(inputString);
            return input.build();
        }
    };

    public abstract Document createDocument(String inputString);
}

What I want to do is initialize the FooFactory instance in InputMethod.FOO.  And in order to do so, I would have to call, say, FooFactory.newInstance().  However, this may throw an exception, so I cannot simply say factory = FooFactory.newInstance() directly.  I cannot put this in the enum type's constructor, since InputMethod.BAR doesn't make use of FooFactory in any way.  It would appear that using static initialization doesn't work due to the order in which static initialization is done relative to the initialization of the enum constants itself.  Finally, I cannot explicitly declare a constructor, since the subclass of InputMethod that FOO is an instance of just happens to be anonymous.
So, other than resigning myself to lazy initialization, how would I properly initialize the FooFactory instance in InputMethod.FOO?
Comment: *"I cannot put this in the enum type's constructor, since InputMethod.BAR doesn't make use of FooFactory"* => you could pass a null factory. But it doesn't sound right that you enum is responsible to create the factory.
Answer: public enum InputMethod {
    FOO {
        private final FooFactory factory;
        {
            try {
                factory = Factory.newInstance();
            } catch (...) {
                ...
            }
        }
        public Document createDocument(String inputString) {
            return factory.createFooParser().parse(inputString);
        }
    },
    BAR { ... };
    public abstract Document createDocument(String inputString);
}

Enum constant specific initialization


Advantage of Docker to automation

Question: What is the advantage of docker for test automation or even manual tests?
Comment: I removed the Selenium tag because the question does not mention Selenium.
Comment: check this http://stackoverflow.com/questions/30814789/how-can-docker-help-software-automation-testers
Answer: In order to test something, you need to install it somewhere, i.e. in a runtime environment.  In the process of running your test, you may change the runtime environment in ways that you need to clean up before you run your next test.  There are two ways to clean up: you can undo the changes, or you can throw the environment away and create a new one from scratch.
If your runtime environment is an entire physical machine, creating the environment from scratch could involve reformatting the disk, reinstalling the operating system, and so on.  That's a lengthy, expensive process.  And if you only have one physical machine, that limits how many tests you can run at the same time.
If your runtime environment is a virtual machine, creating an environment from scratch might only mean cloning an existing image.  That is probably faster than reimaging a physical machine.  You can probably run multiple virtual machines on the same physical machine, too, which means you can do more testing in parallel.  However, it still takes as long to start your virtual machine as it does to boot an operating system.
If your runtime environment is a Docker container, you get most of the advantages of running in a virtual machine, but you can run even more Docker containers on a physical machine than you can virtual machines.
Creating a Docker container from a Docker image is almost simultaneous.  And a Docker container does not need to boot an entire operating system, so its startup time is much faster than that of a virtual machine.
So what is the advantage of Docker for test automation or even manual tests?  Docker provides a lightweight way to create disposable runtime environments for running the software that you want to test.
Answer: I have been looking for the same, and I have found following some useful blogs on it. Hopefully it will help you to resolve your query.

Docker container for running browser tests - https://medium.com/@georgediaz/docker-container-for-running-browser-tests-9b234e68f83c#.o8ch92lkt
Running headless Selenium WebDriver tests in Docker containers - https://medium.com/@griggheo/running-headless-selenium-webdriver-tests-in-docker-containers-342fdbabf756#.k5gbh46sd
Selenium Grid Cluster Example With docker-compose (formerly fig) - https://medium.com/@kevanahlquist/selenium-grid-cluster-example-with-docker-and-fig-24943a5eca42#.h3x3z12ms
Setting up Jenkins to run headless Selenium tests in Docker containers - https://medium.com/@griggheo/setting-up-jenkins-to-run-headless-selenium-tests-in-docker-containers-99528390bce7#.xic6to28m
Comment: Hi Jeevan- link only answers are discouraged here. Please add some description to your answer.
Comment: Hi log_file, Yeah I understand even I had done research and found this useful blogs, It won't be meaningful if we copy paste point from blogs. So I have provide this links :)

Advantage of Docker to automation


In theory, can we count every galaxy in the observable universe one-by-one?

Question: Suppose I have a very advanced telescope that can detect long wavelengths of light, so I can deal with extreme redshift. I am also a very quick counter, so I can get through all of the galaxies before a new one appears. Given this, can I count every galaxy in the observable universe one-by-one, and get an accurate number?
Answer: Well, you can indeed count the number of galaxies in the observable universe but not in the way you mentioned. There are about 200 billion to 2 trillion galaxies in the observable universe. Some of them you can't distinguish as galaxies even if you use a very advanced telescope (unless it's something like the Hubble Telescope).
But there is one way to count and then estimate the number of galaxies in the universe. You count the number of galaxies in a very small swatch of the sky and then multiply the amount by through the angle covered by the whole celestial sphere. This can work as the universe is known to be almost homogenous, that is it appears the same almost from any direction. Yet, this would give an estimate still which is in-accurate as you possibly could not count all the galaxies even in that small swatch as you can always find even more as you look deeper for which you'll need mirrors or lenses which are multiple meters wide.
Comment: Let's assume we can make our lens arbitrarily wide to fit the situation. Our telescope is very sensitive. Can we do the task counting one-by-one instead of sampling? That was what I really wanted to know.
Comment: You will still have to deal with merging galaxies: do you count 1, 2 or perhaps many dwarf satellites in various states of merger? Also many distant galaxies will be covered by closer ones, or at least by the dust clouds in closer ones. Then there is the fact that the further we look the further we look back in time. How many galaxies are there today?
Comment: This answer concerns itself with what is technically feasible with current technology, but the question is about what we can do in principle.


What is Hinduism's view on racism?

Question: Does Hinduism uplift racism or does it condemn it, according to the Vedas Dharma Shastras Puranas and others?
Answer: Hindu scripture doesn't have the concept of race.  Hindus are classified into the four castes - Brahmins,Kshatriyas,Vaishyas and Sudras. Foreigners and barbarians would be classified as Mlecchas.  Mlecchas maybe further classified by nationality - yavanas,hunas et al.
Some scriptures say caste is by birth, others by qualities.
Any references where varna/caste is determined independent of birth/parentage?
Except for rare instances like Basava - caste is largely approved of in Hindu scripture.
Does any Hindu scripture say anything to the effect "all men (and women) are created equal in dignity and rights"?
Comment: @S K so is the caste system racially motivated like black people being Shudras or Brahmins being white? I do know that birth and others make a caste however is there such a case where skin colour makes your caste?
Comment: This has been recorded in a reliable history - at least at the time of the Buddha Brahmins were supposed to be white:  The Rig Vedic Aryas showed disdain for black people.   https://hinduism.stackexchange.com/questions/26791/how-does-sonadandas-characterization-of-a-brahmin-agree-or-disagree-with-other
Comment: @S K I often see racist criticisms of the Vedas saying that the Arayans hated the Dravidians or tribal people seeing your comment on this why do the Rig Vedic Arayans not like black people?
Comment: @rajam Classs and Religion in Ancient India by Jayantanuja Bandyopadhyaya lays out the anti-black feelings of the vedic Aryas.  but Sanskrit is infinitely elastic and there are interpretations that it is not actual darkness but spiritual darkness the Aryas were against.
Comment: @S K what if it was referring to actual skin colour then why did the Vedic Arayans have not so good feelings for them?
Answer: An interesting question. As SK said, Hinduism doesn't really have the concept of racism in its scripture, as most practitioners have historically been from the same country.
However, there are conflicting ideas about whether it is better to have dark skin or light skin.
A line in the Shiva Purana (7.1.24) implies that dark skin is bad:

Dark complexion is hated by good men. You too disapprove of it. Without wiping it off by dint of penance I am not inclined to stay here.

Yet at the same time, there are countless examples of dark-skinned characters being described as beautiful, like, for instance, Draupadi and Krishna.
More generally, we are told by scripture to remain without prejudice; as the Yoga Vashista tells us, the unprejudiced man is the noblest:

Try your best to destroy this prejudice of yours, and then you will know the truth. And verily such men are the greatest heroes and most learned in the world, who are freed from prejudices.

Coming to modern times, let's look at what today's gurus say. Swami Vivekananda doesn't explicitly condemn racism, but he clearly states that it is important to be tolerant:

I am proud to belong to a religion which has taught the world both tolerance and universal acceptance. We believe not only in universal toleration, but we accept all religions as true. I am proud to belong to a nation which has sheltered the persecuted and the refugees of all religions and all nations of the earth.

And guru Shri Shri Ravi Shankar has said:

Prejudice against any race or community is of dark ages. It is unfortunate that this prejudice still exists in spite of all the advancements. [link]

Let's value human life above race, religion & culture. [link]

So, in summary: Hinduism encourages tolerance and prejudice is bad, so racism probably is bad, too.
Comment: Racism doesn't means only hatred of blacks by whites. The reverse phenomenon is also possible.
Comment: so how do we interpret or resolve this contradiction on wether dark colour is good or not? Since you said there are different views on this and you pointed out one which contradicted with another so how do we resolve such a contradiction?

What is Hinduism's view on racism?


Cannot flag as "should be closed..." after removing a "duplicate" flag

Question: After removing a duplicate flag, I am unable to flag the question as "should be closed...". I am guessing this is because the duplicate flag is under "should be closed...". Is this intended? If so, why?
Answer: Both are considered "recommend closure" flags. The duplicate reason is also one of the close reasons with which a post can be closed, and once you retract a close flag for any reason, you can't flag it again, for any reason.
The fact that there's a separate option to link straight to the duplicate reason can make this a little confusing, but as your link says, both are considered under the umbrella of "recommend closure" flags.
There is no bug here; this is status-bydesign.
Comment: Thank you. It makes sense what you've said I guess I just disagree with the duplicate being grouped together with the other reasons to close. Duplicate indicates that the question is valid but already answered elsewhere, the other close flags indicate that the question is not valid for whatever reason.
Comment: @frobinsonj In the end, we want the same effect: no more new answers.


The quail did not perch in a tree, that wasn't its way

Question: This is a Georgian idiomatic expression. It conveys the idea that, as a quail will never perch in a tree because it can not, so a person will not be able to accomplish a task or perform, due to his/her inability. Under the word inability, I mean both - mental and physical ineptitude. Is there an equivalent expression with the similar meaning in English ?
Comment: There's nothing wrong with it the way it's stated.
Answer: I can think of a couple of expressions that are similar to, if not the same as, your expression. One is "like a fish out of water"; the other is "out of one's element".
To novelist Robert Heinlein is attributed "Never attempt to teach a pig to sing; it wastes your time and annoys the pig."
Answer:
We can't all play first violin in the orchestra, [somebody has to push
  wind through the trombone.]

{Pressreader.com}
I'm quite familiar with this expression (I've even heard someone invert it to give the reverse meaning). I'm very surprised that there are so few hits on the internet.

The quail did not perch in a tree, that wasn’t its way


Can I set parental controls on Minecraft?

Question: I don't want my child to play multiplayer on Minecraft since he joins random worlds that belong to strangers, are there any ways to make it so he can't join servers?
Comment: Turning off internet on the computer might work, but depending on how old they are they'll probably figure it out.
Answer: To disable joining servers, you can simply turn off internet on the computer. If you don't want to do this manually or think that the child can enable it on their own, you can blacklist some Minecraft related things in a firewall, basically the opposite of this question. You could also choose some not commonly used, but still stable version, because you can only join with the same version that the server is on. I would for example recommend 1.12.2-pre2 for that, it's basically the same as 1.12.2, but not compatible with 1.12.2 servers.
You can also change chat settings to make the chat completely invisible.
If you want the child to have an easier game, you can lock it into "Peaceful" difficulty.
If you don't want the child to exit the world, join a different one that you play on and destroy things on there (TangoTek used to have a lot of problems with that), then you should make a new launcher profile that uses a different <code>.minecraft</code> folder, that way the other worlds do not appear in the world list.


resolution of image for t-shirt design

Question: I'm trying to draw a lady that will get printed on a t-shirt. The lady will be positioned around the heart and will be around that size, so just a lady on the center of the chest. What size should i make the file where i will draw in Photoshop. What resolution. Thanks!
Answer: I've been working with the t-shirt design for a long time (about 20 years).
The minimum resolution used is 300ppi (or dpi) for screen printing.
Sometimes when I have to use reticulation for the print screen I change the resolution to 400 or 600ppi for small designs.
That is the way I work and some of my work colleagues too.

resolution of image for t-shirt design


rigify face rigging isues

Question: I'm trying to rig the face for a character with the rigify addon but every time I try, the mouth doen't open well. I don't know if it's because of the position of the bones or the scale or the weight (I did the automatic weight). I saw some tutorials but they didn't help me. I'd really appreciate some help.
Answer: It looks like it would probably be the last bone in the chain coming up from the chin. It looks like that bone ends in the middle of the mouth which would make the automatic weights consider the mouth to be part of the chin and the face would just look elongated when rotating the jaw.
I highly recommend you to learn weight painting though since an issue like that would be very easy to detect if you would scroll through the groups.
Also, I would recommend you to use video for reference while placing the bones and try to replicate the placement when trying out new rigify rigs since they can be very delicate.

rigify face rigging isues


What's the relation between attractor network and long short term memory algorithm?

Question: In this paper by Bengio on page 7 he used the attractor network to analyse recurrent network. And in this paper it says that attractor network dominates the field of memory control. What's more recurrent network features its memory ability compared to previous ones. so I'm wondering what kind of role does it play in the field of recurrent neural network or neural network nowadays? I raise this question because 1) I have asked some experts who told me they had never met this before and 2) in the popular deeplearning textbook by Ian Goodfellow, Yoshua Bengio and etc, it is almost not mentioned (only a reference can be found).
Comment: The link to the Bengio paper is broken. Are you referring to *Learning long-term dependencies with gradient descent is difficult* (Bengio 1994)?
Comment: @user20160 Frankly speaking I am uncertain,, it has been more than two years,,, but I thought you are right. Thanks.
Answer: I also wonder what does an LSTM have to do with Attractors.  Look at the paper "An Empirical Exploration of Recurrent Network Architectures", Proceedings of the 32 nd International Conference on Machine Learning, Lille, France, 2015 by Rafal Jozefowicz, Wojciech Zaremba Ilya Sutskever.
In the 2nd paragraph of Section 2.1 they conclude that LSTMs are not "compatible" with attractor systems based on a result of Bengio:

Bengio et al. (1994) showed that any RNN that stores onebit of information with a stable attractor must necessarilyexhibit a vanishing gradient. As Theorem 4 of Bengio et al.(1994) does not make assumptions on the model architec-ture, it follows that an LSTM would also suffer from van-ishing gradients had it stored information using attractors.But since LSTMs do not suffer from vanishing gradients,they should not be compatible with attractor-based mem-ory systems.


Where can I learn how to build a form and form handler for Marketing Cloud Landing page?

Question: Can someone point me to some coding examples that show how to use ampscript to make a cloudpage form that will write to a data extension. I've been in the trailhead but it doesn't get detailed enough.  I've tried Smart Capture forms but they don't have all the functionality I need - like checking to see if user is already in the DE and, if so, throwing out an error message.
Comment: This one describes a Salesforce integrated form, but maybe you will find it useful for general setup as well: https://sfmarketing.cloud/2019/09/22/create-a-sales-service-cloud-integrated-lead-capture-form-using-ampscript/
Answer: Adding to all the above comments and answers.
Don't forget page security and data cleanliness. For security, trailhead actually has some very useful resources:
https://trailhead.salesforce.com/en/content/learn/modules/marketing-cloud-security
Follow standard best practices:

Don't let people gather information from your database on public webforms.
Example: Do not auto-populate forms with data from any Data Extension once the user enter their email address in an attempt "to be more user-friendly". If I enter your email address, will I see your data?
Don't send unencrypted personal data in GET requests (commonly known as "normal links"). Use POST Requests where possible (between form and handler). From emails, only GET Requests are possible, so point to your cloudpage with CloudPagesURL
Before the next two steps, stop and think: What data format does
your database expect?

Are you writing into any old data extension? Is this a process you want to repeat? Does the data have to align with other data in other DEs or other databases?
Example:
Are you entering the data into Sales Cloud? What's the character limit for e.g. "firstname" in Sales Cloud? Are you enforcing this?
A more complex example: How do phone numbers have to be structured? Ensure you meet these demands, try not to create a mess with new logics everytime someone comes up with a webform.

Frontend validate form inputs for convenience. The user should get an understandable error message if they enter unexpected input. (think phone number formats...)
(You can do this using standard web technology, e.g. the HTML5 pattern attribute, javascript, jQuery...)
Backend validate for security. As a general best practice, make sure the data input is actually formatted as expected before you process it further.

You can use RegexMatch (which leverages Regular Expressions/ RegEx) for this. here is an example for validating an email address using RegEx:
Assume a data extension "RegexPatterns" with the following fields.
Note that both the regex for frontend validation (using HTML5) and AMPScript backend validation are in here. The formpage looks up the patternHTML5, the handlerPage looks up the patternAMPscript.
The format of those two differs slightly (AMPScript needs leading ^ and trailing $)but it makes sense to have both in one place.
For demonstration purposes, I used the HTML5 standard for email formatting. This might deviate from what you actually need.
fieldname,patternHTML5,patternAMPScript
Email,\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*,^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$

You can write and test regex for marketing cloud AMPScript here:
http://regexstorm.net/
as it uses the .net framework.
HTML5: http://html5pattern.com
This can get you started and can be enhanced further.
It would be code on your handler page that is done before any processing occurs:
%%[SET @Email = RequestParameter("email")

SET @patternForEmail = Lookup("ENT.RegexPatterns","PatternAMPScript","Fieldname","Email")

/* not empty check: only non-empty input is validated with the Regex.
A failed RegEx validation check results in @valid_Email being set to EMPTY.
no user input results in @valid_Email being set to "no_userinput". */

IF NOT EMPTY(@email) THEN
    SET @valid_Email = RegExMatch(@email, @patternForEmail, 0)
ELSE
    SET @valid_Email = "no_userinput"
ENDIF

/* Logical test on the result of the string validation:
If the regex was successfully passed and the input field was not left empty,
@regexCheckvalid is set to true. This is used to determine whether processing continues or aborts.
This process can be used for MANDATORY fields.

If no user input should be a valid entry, then change the next IF Statement to:
IF not empty(@valid_Email) THEN
 ...
 */

IF not empty(@valid_Email) and @valid_Email != "no_userinput" THEN
    SET @regexCheckValid = true ENDIF

IF @regexCheckValid == true THEN
    /* continue processing */
ELSE
    /* validation error. display error message */
ENDIF
]%%

Answer: Take a look at the Ampscript.Guide website for some solid examples of doing this function within a CloudPage.  Ultimately, the ampscript function you'll be using is one of these: UpsertDE, InsertDE, or UpdateDE.
SmartCapture is pretty limited in function & style, in my experience.
Example: https://ampscript.guide/upsertde/


Existing 14.04 repair going on for 20 hours. Should I abort?

Question: A couple of months ago a Windows 8.1 update locked out my existing Ubuntu 14.04. Had to let it rest for several weeks because of work issues. Last night I set up to repair it and opted for a repair and update of the OS, now it's been stuck at "Eliminating conflicting files from the operating system" for about 20 hours. Should I abort the attempt to repair and simply bite the bullet and do a fresh install? My previous installation was tuned to perfection but if need be I can do it again.
Answer: Yes, if you can handle it. It maybe worth trying the whole repair again with a scratch free clean live cd.
Answer: I ended aborting the installation. Found out that my complete Ubuntu install is still in place. It's just GRUB that's messed up. Now I have to find how to repair it (Boot-Repair cannot fix it, or I cannot...). Can boot Ubuntu from the advanced boot options of Win 8.1 tho. :(


QGIS Plugins from Local Source (Firewall excludes Official Repository)

Question: Is there a way to load Plugins From a local Source rather than using the Official Repository. As the authority I work for do not allow QGIS to go past their firewall.
Answer: Option 1:
is to create your own plugins repository. There is documentation about it
https://gis.stackexchange.com/a/135896/49538
and here is a full example, link
and that your colleagues add that repository to QGIS on your PCs.
Another option
It is to distribute a zip directly to your colleagues and decompress it where Qgis takes the plugins. .qgis2\python\plugins
Or as @LaughU says, you can have a shared space and have each colleague have it synchronized with your local QGIS installation.
In the QGIS 3 version, you can directly import a plugin from a zip, without having to copy it manually.
Hope this helps.


How to smoothly animate height in CSS or Javascript on mobile devices

Question: I am developing an HTML5 web application for mobile devices and ran into a bit of trouble with  smooth animations.
Essentially, when a user taps a button, a drawer (a div with height: 0px) should animate to a given height (in pixels) and content will be appended to that drawer. If you have a Pinterest account, you can see the animation as it is now, at http://m.pinterest.com (tap the Comment or Repin button).
The unfortunate problem is that on mobile devices, Webkit Transitions aren't hardware-accelerated the height property, so its extremely laggy and the animation is jagged.
Here are some code snippets:

HTML:
     ...

    Comment

 ...

CSS:
.comment_wrapper {
    -webkit-transition: all 0.4s ease-in-out, height 0.4s ease-in-out;
    position: relative;
    overflow: hidden;
    width: 100%;
    float: left;
    height: 0;
}

.comment {
    background: #f4eeee;
    margin-left: -10px;
    padding: 10px;
    height: 100%;
    width: 100%;
    float: left;
}

Javascript (using jQuery):
function showSheet(button, wrapper, height) {
    // Animate the wrapper in.
    var css = wrapper.css({
        'height': height + 'px',
        'overflow': 'visible',
        'margin-bottom': '20px',
        'margin-top': '10px'
    });

    button.addClass('pressed');
}

$('.comment_btn').click(function() {
    showSheet($(this), $(this).siblings('.comment_wrapper'), 150);
});

Screenshots : https://i.stack.imgur.com/WnGpU.png

Here are the problems I encountered with Webkit Transforms that I can't quite figure out:

Webkit Transforms scale the children of the container, which is undesirable for what I'm trying to do. -webkit-transform: none applied to the children don't seem to reset this behavior.
Webkit Transforms don't move sibling elements. So, the .pin container after the one we're operating on doesn't move down automatically. This can be fixed manually, but it is a hassle.

Thanks a lot!
Answer: With mobile phones being so fast it's easy to forget they are actually pretty humble devices when you compare them to desktop hardware. The reason why your page is slow it because of rendering reflows:
http://code.google.com/speed/articles/reflow.html
When the div grows, it has to push and recalculate the positions of all the elements, which is expensive to a mobile device.
I know it's a compromise, but the only way you can make the animation smoother is by putting position: absolute on .comment_wrapper; or if you really want butter smooth animation, make it pop up from under the screen with css transforms, i.e.
.comment_wrapper {
  height: 200px;
  position: absolute;
  width: 100%;
  bottom: 0;
  -webkit-transform: translate(0, 100%);
}

var css = wrapper.css({
    '-webkit-transform': 'translate(0, 100%)'
});

Comment: If you use `translate3d(0, 100%, 0)` it's even faster because hardware acceleration will kick in :)
Comment: Edited the answer with example code, an example is the virtual keyboard that slides from the bottom of the screen.
Comment: Thanks a lot! Knowing this is pretty helpful. I'm pretty sure I'm going to reconsider this interaction, but for reference what do you mean by making it pop up from under the screen with transforms?
Answer: You want traslate3d.  Should use the GPU if the device supports it.
check this out...
http://mobile.smashingmagazine.com/2012/06/21/play-with-hardware-accelerated-css/


Macbook will only boot into recovery, how to copy files onto other hard drive and boot from it?

Question: My Macbook Pro will only boot into recovery after upgrading Disk Utility from the App Store. In the Disk Utility in Recovery Mode, my disk can't be checked for errors and it cannot unmount. (I believe it also recognizes the existence of the filesystem but cannot verify it or something similar) I have taken the hard drive out of my device and used a disk enclosure and can view my files. How can I copy these files to another HD/SSD and boot from it (successfully) into macOS? I have a file encryptor that encrypts some of my files so I'd need all my app/file data to remain when I copy the files and boot the drive.
Answer: Have a look at Carbon Copy Cloner: https://bombich.com/, it allows you to create bootable copies of your internal HDD.


How to express the condolence?

Question: How to express the condolence to someone who lost somebody? Like for example a death of a husband or wife?
Answer:
Mein herzlichstes Beileid.

or

Mein tiefes Mitgefühl.

are standard phrases for this situation. If you want more variety have a look at Trauerspruch.de. But these are mainly written condolences on that site.
Comment: "Mein [herzliches] Beileid" is certainly the standard, so you can't really go wrong with that (except for a close friend, where this might be too impersonal). The phrases on the site John linked to seem overly *kitschig* to me, though. They are also quite long, so if you try to say them, you risk coming across like someone who, well, memorized a phrase. Even written, many of these would feel insincere to me, on account of their *kitschigkeit*.
Answer: Personally.
Using pre-fabricated standard condolence phrases is... well, for some, it's probably a way of saying "I don't know what to say". But I think if it's heartfelt, you'll find something personal. Even if it's only "Scheiße. Es tut mir leid.".
If it's just a formality, on the other hand, go with John Smithers' suggestion of "Mein [herzliches] Beileid". That's the standard.
Comment: "Es tut mir leid" is simpler, but can you really say to someone you are not close to? For example, your boss?
Comment: If you weren't close, it's probably safer to use one of the standard phrases John suggested. Though "es tut mir leid" still works. It also depends on whether it's spoken or written; the latter tends to be more formal.
Comment: "Das tut mir leid" can also be said to someone you are not close to.
Answer: "herzliches" or even "herzlichstes" is not appropriate in this situation. Are you glad, that somebody died? I hope, your are not. So "Mein Beileid" is all you say at the funeral. And that's it. Nothing more, nothing less.
What does fzwo regret? Did he / she kill the person and rue the deed? I hope not, so "Es tut mir leid" is definitely inadequate. And certainly nobody wants to hear shit (Scheiße) during the ceremony.
Some of the phrases on Trauerspruch.de are really "kitschig". They might be appropriate writing a letter, but not while shaking hands before the church service.
So, keep to the standard "Mein Beileid" and everybody will know what you mean.
Comment: "herzlich" means "coming from my heart" (my heartfelt sympathy). Example here: http://www.duden.de/rechtschreibung/Beileid_aussprechen
Comment: While "herzlichstes beileid" might be over the top "herzliches Beileid" surely is the standard expression.
Comment: I do not share Lexis opinion on that, but maybe he/she thinks about "herzlich" beeing inappropriate in this situation because in these days the use of "herzlich" is kind of restricted to "Herzlichen Glückwunsch [zum Geburtstag]" or other "positive" contexts like "jemanden herzlich Willkommen heißen").
Comment: Die Kritik an fzwo teile ich, aber sie gehört in einen Kommentar dort. "Herzlich" klingt in meinen Ohren auch zu schwülstig, aber für Leute die es barock mögen, oder zu sehr steifen Anlässen - Chef, Bürgermeister, Kapitänsbestattung ... vielleicht.
Comment: *"Es tut mir leid" is definitely inadequate*. Certainly not. It is a standard response and certainly not inadequate. "Es tut mir leid" does not only mean you regret having done something bad either. It simply expresses "Mitgefühl", i.e. "Sie haben mein Mitgefühl".

How to express the condolence?


How to apply Active Directory Auditing with some native tool of Windows server

Question: How we can set some auditing standard in our active directory like if there is any change occur it will give a alert on our mail.
Any creation,deletion, modification in group,computer and OUs
I don't want any third party tool just want a native solution for that
Comment: There is no native way to do that. You either need a third-party tool or you need to write your own.
Answer: Since Windows Server 2008 there is a possibility to audit changes in Active Directory. They are audited as events in Security event log. And you have an option to receive event's details by email. Also take a look at this question.


Why is stackexchange.com not a single website with one account?

Question: Why do I have to create another account every time I post on a new site?
Comment: This *seems* like a duplicate of (take your pick): [Why separate Stack Exchange accounts?](https://meta.stackexchange.com/q/69422/280335), [Why do I need to make an account for each SE Site? \[duplicate\]](https://meta.stackexchange.com/q/239016/280335) (which is already a dupe), [Can I have a common account across the Stack Exchange family of sites?](https://meta.stackexchange.com/q/214087/280335) and a few others [that Google threw up](https://www.google.com/search?q=site%3Ameta.stackexchange.com+one+account+per+site)
Answer: I can think of several reasons why you have to create a Stack Exchange account on every new site (and there are certainly more):

The accounts you created appear on your network profile. It's possible that users don't want to be associated with a certain product, like the eternal debate between Vi(m) and Emacs users, or Muslims who are not allowed to drink alcohol.

Users may also prefer to ask questions on e.g. The Workplace with an account that is not tied to their main account which reveals their real name. In those cases, we allow them to create other accounts to remain anonymous.

♦ moderators have access to certain PII; I've seen very rare cases where user X does not trust moderator Y and does not want to create an account on a site where Y is a moderator.

To be honest, it's not much of a burden to add a new site to your existing (network) account. You don't have to set a new password or confirm your email address or something like that, it's just a couple of clicks and you're done.
Also, you can just browse all sites in read-only mode (I've done so unconsciously for years before I joined) - generally, you only need an account when you want to participate.
Comment: FWIW, Codidact doesn't have this speed bump. You just make an account and use it for all sites on the network. I assume you could just not use certain sites, and then make a new account for them if you want separate identities; I don't know offhand if there's policy against the latter.
Answer: Stack Exchange users (usually) only have one account, which is used to log in to sites across the network. Unfortunately, the UI here is... really confusing and frequently uses the terms "account" and "profile" interchangeably or uses both words in multiple ways. If I could somehow fix this, I would but... it's nowhere near the top of my priority list.
The structure of the platform is based around a core network "account". This is the term used internally and in the database to refer to the entity that is a user and their login info. Each network account has a unique user ID that is the reference for that user in the database. Unfortunately, the page that represents the user's account is called their "Network profile", which is semantically correct, as it's a profile in this sense:

a collection of personal details about oneself that one curates and shares on an online platform (such as a blog or a social media service)

Definition 5 B on Merriam Webster
These network accounts act as a reference for the user's network-wide activity to other users and as the home for network-wide features, like the user's inbox and flair. These accounts exist practically forever, unless the  user specifically requests they be deleted or if they're found to be underage and are deleted to comply with government regulations. Only staff can delete accounts.
Users then "join" sites, which creates a "profile" on each site they are interested in - or, in most cases, they create an account and their first profile simultaneously. This profile is tied to their network account and populates the user's network history. Each profile has its own profile ID, which is in a database table for that site. To continue the semantic confusion, the list of all site profiles a user has created is on their Network profile "accounts" tab.
Unlike accounts, user profiles are (more) regularly deleted, usually by the user, though mods and staff can delete user profiles with cause. If a profile is deleted, the user can re-create the profile but it will be assigned a new profile ID and the content created will not be reconnected to the new profile. While the profile can be deleted, some profile history information is stored in metadata on the network account, to avoid being lost in such situations.
Unless a user goes out of their way to create a new network account with different login information - which is acceptable, provided it's not done to game the system or otherwise abuse it - all of their profiles should be on the same account. This means that logging in or out on one site should log you in or out on all sites you have joined. There's one key exception.
If you have third party cookies disabled - or your browser does so automatically - you likely will not be logged in everywhere if you're a member of sites with different domain names. For example, logging in on Stack Overflow (stackoverflow.com) may not log you in on Super User (superuser.com) or sites with stackexchange.com domains and the reverse is true - while logging in on the Cooking site will log you in on Math because they're both on the  Stack Exchange domain, it may not log you in on Ask Ubuntu (askubuntu.com).
Unfortunately, as far as I'm aware, other than changing the domain names to all match, there's not much Stack Exchange can do about this - and if Google starts blocking 3rd party cookies, it's going to become a lot more noticeable than it is currently.
Comment: I have an under the hood explanation of how Universal Login works, to support your last two paragraphs: https://meta.stackexchange.com/questions/309727/how-does-one-stack-exchange-site-know-that-im-logged-in-to-the-other/312956#312956 and related: https://meta.stackexchange.com/a/376333
Answer: Because each site in the Stack Exchange network is different. For example:

Each site has different scope.
Each site has its own reputation and privileges.

So for each site, you have different account, however do note they're all linked together.
There is kind of "central account" better known as "network profile", accessible at https://stackexchange.com/users/current.
Comment: FWIW, I took a different interpretation of the question than you did - basically I answered the question "why aren't accounts created automatically" (the body) instead of "why does SE have separate accounts" (the original title), which you answered correctly but that question probably has been asked many times before. (It's certainly possible there's a duplicate for my interpretation as well.)
Answer: In order to aid the search for questions we tag them. Different sites can currently use the same tags and give them different meanings.
Our Cooking site has an apple tag

Identify, select, store, prepare, replace, or cook with apples as an ingredient.

So does Super User but you can't possibly think that a question on that site tagged with apple is about how to put one in the oven and then eat it afterwards.
So an expert on cooking with apples trying to find questions to answer isn't going to want to find lots of computing questions mixed in. Nor do we really want to have to prefix all cooking tags with cooking and all super-user tags with super-user or computing or some other disambiguation prefix or suffix.
We also don't want someone experienced in cooking with apples to moderate all the non-cooking apple questions and mark them off-topic or vice-versa, someone to close all the questions about cooking with apples.
So the different sites allow users with different and often non-overlapping interests to co-exist without friction and if you are a user that has multiple interests you can join multiple sites and still enjoy all of those activities as long as you remember which expert hat you have on.


What is using so much of my disk space?

Question: I have a 768MB VPS, on which I host 1 website. That website has WordPress installed and a MyBB forum and it fills 22 GB in space. It shouldn't have more than 1 GB. And a few weeks ago it had 15 GB in space, so it's increasing even though I haven't added/uploaded anything. The email service is disabled and I've looked through the files on the website and didn't saw any file that could be responsible for so much space usage. Where else can I look?
Answer: Check for error logs. I had a Wordpress site that was constantly running out of disk space and it turned out to be a large error log. If this is the issue the first thing you do is fix the issue that is being logged as not doing so will result in this problem never going away.
Answer: Login to the server and execute the command below. It will show the files which are in GB's. It will help you to investigate it further.
cd / ; find ./ -size +1000000000c
Answer: Search for large logs. Also check to see if anyone has uploaded large (or multiple) files through the forum somehow.
Try backing up your server to your computer and see which folders are holding that much data. Also some servers backup the files to a archive which is on the server, which might increase space usage.

What is using so much of my disk space?


Civcrm Refund - why are amount and fin. type are based on (priceset) rather than line_item?

Question: For non-'test'/Dummy refund (e.g. Authorize), the refund 'contribution' details for a 'contribution' consisting of 2 line_items (a price and a service fee) are getting assigned the same financial type and total amount (with sign reversed) instead of retaining the line_item values. For example, a refund for an event where the price-set includes an event_fee of $20 and service_fee of $2 should have -$20 for the event_fee and -$2 for the service_fee, and the financial-types not changed. In CRM/Contribute/BAO/Contribution.php, both the event_fee and service_fee amount is set to -$22 and service_fee financial type is changed to 'event_fee' type.
   I modified the code in (Civicrm 4.7.23) CRM/Contribute/BAO/Contribution.php.  Is there a reason NOT to do this?
Answer: Your modification is almost certainly correct.
Line items are an area of the code that was traditionally weak, but have come a long way in the last year.  My recommendation is to submit a bug report on issues.civicrm.org, and your patch on Github.  The review process means that this question will be answered by the financial experts. Financial improvements are generally reviewed pretty quickly.


Broken control panel glass on propane range

Question: The glass covering the control panel on our Whirlpool propane range shattered after I don't a pot on it. Whirlpool says I need to replace entire control panel ($949.00). Can I just remove the glass and get a piece of glass cut to cover it?
Comment: Hello, and welcome to Home Improvement. A picture of the damage, added to your question, would really help.
Comment: Model # of the range?
Comment: Check around with some local appliance repair shops. They may have spare parts around that were scavenged from "wrecked" appliances. In my experience, the smaller the shop, the better the luck finding such things.
Answer: Generally speaking, any new piece of glass would likely not be an appropriate replacement.  Many different kinds of glass exist, and only some of these types of glass are suitable in a high heat environment.
The reasons why a kind of glass is not suitable depends on the glass formulation.  Some glass has a lower temperature of deformation, while others expand or have poor heat shock properties (they fracture upon spot heating easily).  In addition, many types of glass are treated after manufacture to improve their properties (like tempering, which greatly increases the impact resistance).
For example, borosilicate glass (Pyrex) does well in some cooking scenarios, while your typical sheet glass (or even stained glass) would shatter nearly immediately.  Odds are sourcing an equivalent glass will be problematic.
That said, the glass is probably not the reason for the expense.  Oven manufacturers have simplified their replacement parts lists by shipping assemblies, and high temperature tolerating control panels are expensive due to their relative lack of reuse (so low production runs) and relatively high use of non-scalable manufacturing methods (due to the heat handling requirements).
It's a shame, and I still am a bit sore over discarding a very nice induction stove over some simple damage to 1/3 of a display that couldn't be purchased independently of the 3 part assembly.
Answer: Depends. Can you post a photo of it? If it's an LCD control panel, then they may be correct because the glass is part of the assembly. If it's just a piece of glass over something else, you MIGHT be able to replace it, but you would need (most likely) for it to be tempered glass and most glass shops will not do that (I've tried).
Comment: If you can find a shop that cuts tempered glass, they can work this item.  Cutting tempered glass really isn't cutting tempered glass.  It is cutting non-tempered glass (or glass that was tempered, but then relaxed in a glass oven) and then re-tempering it (which involves heating it, and then forced air cooling the surface).  Any attempt to cut tempered glass releases the pressure within the surface, which sends a shock wave through the glass, shattering it.  Odds are that this person knows if he has tempered glass just by how it broke.  A few big pieces is not tempered.  Glass nuggets is.
Answer: A few years ago , I replaced the glass control panel on a Kitchen Aide; $ 1000 + labor. Never did work right ,ended up getting a new stove with no glass panel . It would have been cheaper to replace the stove in the first place.


Does the length of DFT points (duration of a signal) affect the "amplitude" of the power spectral density?

Question: For example, performing a DFT on a 10-second-long and 20-second-long signal with the same sampling frequencies will change the "amplitude" of the power spectral density (PSD) at each frequency because of the difference in frequency resolution, but the integral of the PSD will be the same. Is my understanding correct?
Answer: Yes I believe the OP understands correctly with some clarification. Ultimately we need to properly label the spectrum to either be a spectrum plot with a given resolution bandwidth, or a true PSD that has been normalized to frequency units (such as dBm/Hz). This is no different than a measurement of a noise or wideband signal using a spectrum analyzer for those familiar with that. The properly normalized PSD plot will not change as we increase or decrease the total number of bins, while a spectrum plot will have the measurement level for noise or wideband signal go up and down as the number of bins is changed (changing the resolution bandwidth accordingly). Each bin in the DFT is the integration of the total power under the frequency response for that bin as a bandpass filter (the frequency response of each bin is an aliased Sinc function, specifically the Dirichlet Kernel). For white noise, this total power is equivalent to that of a brickwall filter that is 1 bin wide. Thus for noise signals where the power is spread across multiple bins and given as a power spectral density in W / Hz (or other power per frequency units), when the DFT is properly scaled (see those details further below) the total magnitude squared of the DFT (as the integrated total power within the bin) will scale with the number of bins used given the same sampling rate, according to the resolution bandwidth for that bin. And the total power sum of all the bin (sum of $(\frac{1}{N}X[k])^2$) will be equal to the total power in the time domain, as given by Parseval's Theorem. The power in each bin is referred to as the "DFT Noise Floor" which I detail further in this post:  Does the duration of a signal affect its frequency component's amplitude? Also, does the sampling frequency affect the power of a signal?
This post explaining how the DFT is equivalently a bank of filters should be helpful too in understanding the concept of how the noise floor of the DFT for white noise signals scales by the total number of bins (and samples) used: Can anyone explain how dft works as a filter bank?
A scaling by $N$ of the DFT result is required to have the same amplitude as the time domain signal. Consider the simple case of a sinusoid where the sampling rate is an integer multiple of the frequency (to avoid getting into spectral leakage effects for a simple example):
$$x[n] = A\cos(2 \pi (f/f_s) n)$$
Where $A$ is the real magnitude, and $f_s$ is the sampling rate as an integer multiple of $f$.
Using Euler's relationship we know this is:
$$x[n] = \cos(\omega_n n) = \frac{A}{2}e^{j\omega_n n} +  \frac{A}{2}e^{-j\omega_nn}$$
Where   $\omega_n =  2 \pi (f/f_s)$.
Every component in the DFT result is the coefficient for a $e^{j\omega n}$ in the time domain, so the DFT of a sinusoid with the corrected magnitude should have two components each with magnitude $A/2$ per the formula shown above (one component for the positive frequency given by $e^{j\omega_n n}$, and another for the negative frequency given by $e^{-j\omega_n n}$. For real signals the positive and negative frequency will be complex conjugate symmetric, so we can provide all information from the positive frequencies only, in which case if we only used half of the DFT bins relating to the positive frequency components, we would need to increase the resulting PSD by 3 dB to include the total power from both sides).
Observe in the DFT formula given as:
$$X(k) = \sum_{n=0}^{N-1}x[n]e^{-j2\pi n k/N}$$
When $2\pi n k/N = \omega_n$, the product in the summation will be $A/2$ and so the sum will grow to $NA/2$, so scaling by $N$ results in the matching amplitude of the coefficient of the $e^{j\omega t}$ time domain waveform.
Further, since the magnitude for $\frac{A}{2}e^{\omega_n t}$ is constant the power is simply $ (\frac{A}{2})^2$ and not divided by $2$ as we would do with the sinusoid. And all bins sum in power so that the total power of $x[n]$ correctly equals $ (\frac{A}{2})^2 + (\frac{A}{2})^2 = 2(\frac{A}{2})^2 = \frac{A^2}{2}$ and we happily get that factor of 2 for the sinusoid we are familiar with.
For single tones and narrow band signals that are less than the resolution bandwidth of the DFT bin, there is no effect on resolution bandwidth as the power for the signal has no distribution (meaning the power of the signal occupies a bandwidth that is 0 wide, so no matter how tight or loose we make the resolution bandwidth on a spectrum analyzer like the DFT we will get the same magnitude result, when properly scaled as I demonstrated). It is when we get into waveforms with bandwidth (and noise in general) that we must be careful about the effects of resolution bandwidth, windowing, etc in using the DFT for accurate power spectral density measurements. I address this in these other posts here on StackExchange:
How can I get the power of a specific frequency band after FFT?
Proof for the energy correction factor of DFT
Comment: Thank you. I understood the point. I was trying to calculate the PSD of a 10 second and 20 second sinusoidal signal using matplotlib.mlab.psd() function. I didn't understand why the magnitude of the PSD was different between those. I was confused with the difference of a radom signal and a sinusoidal (periodic) signal.
Comment: @Tom I think I better understand your question and added an introductory paragraph specific to that. Is that what you were looking for?
Comment: Yes, thank you very much for you help!


Can i link to an element in the dom

Question: I have a static web page consisting of text, broken up into sections with
 tags.
I don't have access to the underlying code, but I'd like to link to a specific
 tag.
If I had access to the code I could either mark the tags up with IDs for example:
 - but that's not an option.
I could also access them using the DOM index eg document.getElementsByTagName("h2")[0] - so my question really is, is there any way of adding that to a link without needing the associated javascript?
Thanks
Ali
Comment: It's a bit unclear - are you asking for a way to link from an external site to specific scroll position in your target site?
Comment: Do you want to turn the `content` tags to `content`?
Comment: @Starscream- Yes thats right, I want to provide a link to a particulr spot on the target page.
Comment: Diego - That would indeed be the ideal solution,except that I can't access the target HTML.
Comment: not even at "run time"?
Comment: No, it's not possible
Answer: No, you can't do that with just a link.
In one way or the other you need access to the underlaying markup, to either scroll to a position or do a live update of the DOM.
If you can get access to it using an iframe and CORS is not blocking, it could be done that way.
Another way could be to use a server side language, like ASP.NET, from where you read the page, process it and then forward it to the client. This can still backfire depending on how scripts etc. will act on the page in question.
Answer:
var x = document.getElementById("myframe");
var y = (x.contentWindow || x.contentDocument);
if (y.document)y = y.document;
var contLinks = y.body;

as explained here: IFrame contentDocument Property
If you can open the document on an iframe like so or get it's content from a server side script, run this on the returned DOM:
var createLinks = function(){
    var contLinks = document.getElementsByTagName("body");
    for(i=0; i<contLinks.length; i++)
        {
            var Links = document.getElementsByTagName("h2");
            var appendLinks = "";
            for(idx=0; idx<Links.length; idx++)
                {
                    appendLinks += ""+Links[idx].innerHTML.trim()+"
";
                    //Links[idx].remove;
                }
            contLinks[i].innerHTML = appendLinks;
        }
  }
 createLinks();

Direct the last line contLinks[i].innerHTML = appendLinks; to the output that you prefer...
If you definitely can't use any kind of interaction with the document, then you just can't use it.

Can i link to an element in the dom


Adventure Travel: Where should I go in India to experience staying in a forest?

Question: Myself and my friends are planning to stay inside a forest for a night and want to feel that experience during the mid of September. In INDIA, is there any places where I can get that amazing experience.?
Comment: @pnuts the context is : wanna stay in a house(bamboo house/wood house) inside a forest and have a sight seeing inside the forest at day time.
Answer: There are plenty of options available, subject to accommodation availability and the season.
Since you plan for September, I deliberately eliminate major wildlife sanctuaries since possibilities of getting permits done are rare.

Agumbe. State: Karnataka.
Koyna Nagar. State: Maharashtra.
Tadoba Wildlife Sanctuary. State: Maharashtra.
Mudumalai. State: Tamilnadu.
kareri Lake Campsites near Shimla. State: Himachal Pradesh.
Coorg. State: Karnataka.
Bamnoli near Satara. State: Maharashtra.
Amboli. State: Maharastra.
Tapola near Mahabaleshwar. State: Maharashtra.

and so on.. The list doesn't end.


Changing siteurl breaks site

Question: I am hosting my site on amazon ec2. I have purchased a domain name via godaddy and have forwarded it to the IP address of my amazon instance. I forwarded with masking turned on so that users do not see the IP in the address bar. It works fine, when I go to mysite.com the content loads.
I now need to change the wordpress address and the site address to mysite.com since they are defaulting to the ip address and i want to use permalinks for the rest of the site. When I do this the site no longer works. Site won't load and I can't access admin.
If I change just the wordpress address to mysite.com and leave the site address as the IP I am given an admin login page with broken css but when I try to use it nothing happens.
I have attempted to change the urls via the admin interface, directly in the database (updating siteurl & home in the wp_options table) and via the wp-config.php. all methods produce the same result.
I see lots of questions posted that are similar to this but seem to find solutions that don't work for me.
Any ideas on what I might be missing here?? I'm kind of running out of ideas.
Answer: Put this in your theme template functions.php
update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );

Comment: sadly, this does not work either. it seems to have the same effect as the other two options, it updates siteurl & home in the wp_options database table and that then breaks the site.

Changing siteurl breaks site


How to make a "title" a link

Question: Building a content type "news headlines." I want the title to be the headline and I want that headline to link to a outside URL that has the full story. This node-summary could then appear on the home page and in a view and not link to the node but to the outside story. I can make a link that does that but cannot figure out how to make the title do this.
Comment: how you're presenting the news headlines? in a view?
Comment: you mean link to external website
Answer: What you can do is implementing a preprocess function for the node.tpl.php file, and alter the content of $variables['node_url'], which is the variable the template file uses when rendering the title.
  <?php print render($title_prefix); ?>
  <?php if (!$page): ?>
    <h2<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $title; ?>

  <?php endif; ?>
  <?php print render($title_suffix); ?>

You should first verify $variables['page'] is not TRUE, since that means the node is being shown in its own page, which is not what happens, for example, when the node is shown as teaser in the front page or in a view.
Answer: In your view, in the Fields section, click on the Content: Title field. In the Rewrite Results field-set, check Rewrite the output of this field. There you can override the output of the field with custom text, replacement tokens, etc. You can also Output the field as a link and set the required link path.

How to make a "title" a link


How to use a flash on the red carpet without interference?

Question: When I have used flash at semi popular events, from time to time my flash overlaps with others and the image either turns out extremely overexposed, or an odd color(gels?). How do photographers at "red carpet" events shoot with so many flashes going off? I would guess 30-40 cameras are shooting celebrities within the same 5-10 second time frame from the examples I have seen.
Comment: Have you tried the *if you cant beat them join them approach*? Meter for flash but turn your flash off, shoot really fast (5 FPS or more if permitted) and when you get a properly exposed shot it has off-camera lighting which is better than on-camera ;) Seriously though. Great question and it happens in other places than the red carpet too.
Comment: Auto ("thyristor") flash can help too—it doesn't depend on a "clean" exposure from your flash based on TTL monitoring; as soon as the flash itself registers enough light, it shuts off. High-end Canons and Nikons both have this available (dig through the manual), as do Quantum, old Sunpaks and Vivitars, and some off-brand "universal" flashes like the Cactus recreation of the Vivitar 285. You'd get @Itai's off-camera flash idea, but with fill, when collisions happen.
Answer: I don't think there's any way to set exposure so that other possible flashes would be taken into account, or synchronize the flashes. As you say, overlapping happens only from time to time, so shoot at max sync speed to minimize likelihood of having other flashes fire during your exposure. Going above max sync speed (i.e. using high-speed sync) would not improve things as it still takes the same time for shutter curtains to travel for one end to the other.
Take several frames multitude of exposures increases likelihood at least one will turn out okay.
Oh, and use a lens hood to protect the lens from stray light cast by those other flashes and bumping into other photographers.
Comment: I don't think HSS will really help (much, anyway). Above X-sync speed, the shutter is still open for the whole X-sync time (e.g., 1/250th, just a smaller part of it is open -- but half the picture being overexposed isn't going to make it much better.
Comment: @Jerry thanks, edited. Even though I know how a shutter works and what is a rolling shutter in video, somehow I didn't realize this happens above sync speed in still photography too.
Answer: Shoot a couple of shots as quickly as you can -- a few will collide with others, but given the short duration of a flash, you don't need very many shots to get some that are all right. An external battery pack like a Quantum Turbo for your flash can help a lot to keep the cycle time short so you can get a number of shots quickly.
If you were willing to use a film camera, one with OTF metering could be of some help (but not an absolute guarantee). Unfortunately, sensors are reflective enough that it appears nobody's managed to duplicate OTF metering with a digital sensor.
Answer: That so many flashes are going off is part of the explanation: just keep shooting. The problem is that the flash can fire and light the scene faster than your camera can meter and keep up; it's just changing too fast. You just need to keep shooting in anticipation of getting something usable.
Answer: Flashes are much faster than you think. long flashes are maybe 1/2000 of a second, and much shorter at lower power settings. You camera can only sync at a speed (typically 1/250) because that is when the shutter is fully open, but the flash itself is an order of magnitude shorter.
This is a case where TTL will help, your camera can detect the other flashes and compensate.
Shoot at your camera's fastest sync speed that is not a special "high speed sync"
Comment: At full power, the flash's full duration will be remarkably close to the sync time.


Replaced my water heater and now I have very low water pressure both hot and cold

Question: I replaced my water heater and now there hardly any water pressure in both hot and cold. Any ideas?
Comment: Did you re-open the supply valve all the way?  Check it again.
Comment: See Paul Logan's answer - most likely a bit of solder from the replacement. This is probably happening in one of your faucets or could be more than one (but that would be unlikely - unless plumber was really really zealous with the soldering) .
Answer: Clean the aerators on the faucets.
Comment: Right to the punchline. Indeed, the most likely cause. Also make sure the main supply valve is open all of the way ;)
Comment: Theory of this being that replacing a hot water heater is likely to slough off a bit of crap from the copper lines that would get strained out by aerators. If your tub faucet has the same problem then it might be something else (instead or in addition)


Show that $R = \mathbb{Z}[\sqrt{-17}]$ is not a Euclidean ring.

Question: Show that $R = \mathbb{Z}[\sqrt{-17}]$ is not a Euclidean ring. To do this I tried showing that the ring is not a principal ideal domain. I wonder if this is enough and how to actually show that it is not a PID. Thanks!
Comment: [Related](http://math.stackexchange.com/q/37480/11619).
Answer: Reminder. A euclidean ring is factorial.
Hint. Notice that: $$18=2\times 3\times 3=(1+i\sqrt{17})(1-i\sqrt{17}).$$
If you can prove that $2,3,1-i\sqrt{17}$ and $1+i\sqrt{17}$ are irreducible, you are done!
Remark. If you can show that $\mathbb{Z}[i\sqrt{17}]$ is not a PID, you are also done. Try to consider the ideal generated by $2$ and $1+i\sqrt{17}$ and proceed by contradiction. What if there exists $z=a+ib\sqrt{17}$ such that: $$(z)=(2,1+i\sqrt{17}).$$
What will happen if you take the norm of $z$ which is $a^2+17b^2$?
Comment: Thanks for the answer, I was indeed specifically wondering about the PID way of showing the desired result!
Comment: In this case you say "A euclidean ring".  Another expection is with "u" when pronounced like "you" as in "a uniform" for example.
Comment: @GregoryGrant Thank you for this correction!


rescue a question?

Question: The question https://english.stackexchange.com/questions/140857/break-down-break-out was apparently posted by a spammer, and will be deleted. Is it worth rescuing?  I could answer it, but I would like at least a second opinion on it's worth. If you think it would go better at ELL, let me know that too.
Answer: There is no limit to questions of the form "which of these two prepositions goes best after xxx?", a fact the spammer knows and plays on. Though superficially interesting, it isn't something that we here can explain better than a grammar book, and (equally important in fact, though less so in theory) answering this one would soon flood the site with similar questions.
The question whether it would be welcome on ELL can only be answered on ELL.
Comment: I thought this one was a difference between similar sounding idioms.

rescue a question?


MySQL is inserting "" as 0 in decimal fields. How to stop that?

Question: The fields are nullable, so they do allow nulls.
Why would MySQL convert "" to 0 instead of NULL?
Is there a way to force it to be NULL instead?
Comment: Empty string is no more like `NULL` than it is like `0` and arguably even less so.   If you want null, why exactly would you not insert null?
Comment: Are you getting an error message like `ERROR 1366 (HY000): Incorrect decimal value: '' for column 'price' at row 1` ?
Answer: This seems be an on-going bug although it is not considered a bug, such as Bug #73041: Error 1366 when loading null into columns with decimal type using strict mode
According to Oracle's MySQL Documentation

If you are not using strict mode, then whenever you insert an "incorrect" value into a column, such as a NULL into a NOT NULL column or a too-large numeric value into a numeric column, MySQL sets the column to the "best possible value" instead of producing an error:
The following rules describe in more detail how this works:
If you try to store an out of range value into a numeric column, MySQL Server instead stores zero, the smallest possible value, or the largest possible value, whichever is closest to the invalid value.
For strings, MySQL stores either the empty string or as much of the string as can be stored in the column.
If you try to store a string that does not start with a number into a numeric column, MySQL Server stores 0.

That's also in the the regular MySQL Documentation.
With rules like these, that's why a zero(0) pops up for an unspecified DECIMAL value.
If you look back at the bug report, someone got around it when using \N for null values while loading a CSV file with LOAD DATA INFILE.


Clear vs tinted glass bakeware

Question: There has been at least one question regarding baking differences between light and dark metal baking pans, and metal vs glass. Is the difference between clear and tinted glass bakeware the same as light vs dark metal?
Answer: The difference between light and dark metals (and shiny and matte) has to do with emissivity (their ability to radiate their heat back out). Darker metals are more emissive, so stuff you bake in them or on them will brown more quickly. Glass has a low degree of conductivity, so it will heat up much more slowly than metal, but once it is hot it will retain its heat very well. Glass also has a very high emissivity (about the same as a dark, matte pan and much higher than a shiny silver pan).
To answer your question about tinted glass, the tinting will have little or no effect on conductivity. It may raise the emissivity a bit, but a relatively small amount. And keep in mind that glass already has a very high emissivity.
To quantify this, glass may have an emissivity in the range of 0.84-0.92 (1 being a perfect "black body" radiator). Tinted glass may be more like 0.85-0.95. For metal pans, it has to do with both color and matte. If the pan is dark, matte metal, it might be around 0.90, but if it's shiny it's probably more around 0.50. A shiny aluminum pan is much lower, probably around 0.10.

Clear vs tinted glass bakeware