depending {upon/on} if

What is the correct use of “depending” in this sentence?

Please note you are allotted one ½ hour of commuting time either to or from a meeting location depending if your meeting is in the morning or afternoon.

Is the meaning:

  • “depending upon”?
  • “which depends on”?

Also, I don’t think the sentence is correct. Should it read like one of these?

…depending upon if your meeting is in the morning or afternoon

…depending on if your meeting is in the morning or afternoon

Why is 450 nm monochromatic light perceived as blue or violet depending on its intensity?

Trying to do some color matching I purchased a 450 nm laser. I expected monochromatic light of this laser to have similar properties to those of all others I’ve already played with — 808, 640, 520, 405 nm — in that they all cause an unambiguous color sensation.

But when I shined it onto my wall (having removed the lens), I was surprised to see something unusual. In the center, where the intensity is high, it looks as “very blue” — much like those 465 nm blue indicator LEDs we can see everywhere today, only more saturated. But on the sides, where the intensity falls off, the color looks like violet! When I shine this laser on a ceiling obscured by a wall, I see its reflected light as violet. When I move the spot so that the reflected light becomes more intense, I begin to see it as blue again in the intense areas, and still violet in dimmer ones.

I’ve checked with a spectrometer, and there doesn’t appear to be any fluorescence in the light spot to confuse me.

Interestingly, if I increase amount of ambient lighting (white LED lamps + CCFL ones), sensation of blue once again transforms to violet. Also, the “very blue” intense spot looks violet in bright sunlight, although I can make it blue again by focusing into a smaller spot to make it brighter. In a fully dark (apart from the laser) room I still do notice the violet areas on the sides of the spot.

405 nm light also seems a bit silvery-whitish when its intensity is high, unlike at low intensity. Maybe it’s the same phenomenon, which I simply didn’t notice before because the tint is not that blue in this case.

In both cases of 450 nm and 405 nm the additional color on high intensities is still “shiny” due to the speckles specific to high monochromaticity, so this indeed doesn’t look like the result of fluorescence of the objects I shine the light to.

I’ve asked several people whether they see it the same, and they answered affirmative.

I suppose it’s not related to color balance, because I only changed the intensity of ambient light, not the tint to observe the changes in color. Especially it shouldn’t be due to color balance since I can simultaneously see different colors in the areas with different intensities.

Interestingly, while I thought the “very blue” color to be the main color of 450 nm, CIE 1931 XYZ value for it, converted to sRGB, appears to be (if we desaturate and normalize to fit in sRGB range) (0.43,0,1), which is purple, not blue.

So, what is going on here? Is it a well-known phenomenon? Could it be due to some fluorescence of the retina itself rather than the objects lit by the laser?

Can a solid have a different melting point depending on the orientation of its surface with respect to its…

I originally asked this question on Physics Stack Exchange than it got deleted and I now see that that type of question probably belongs here so I’m now asking it here. The real laws of our universe closely approximate the full quantum mechanical theory which explains nuclear chemistry, which in turn very closely simulates a simplified 3 dimensional quantum mechanical theory which treats electrons and nuclei as point charges that never undergo nuclear decay according to the quantum mechanical definition of point charge, and that it turn closely approximates a simplified nonrelativistic quantum mechanical theory even for systems much larger than an atom because the fine structure constant is so small. I want to ask something about the simplified nonrelativistic quantum mechanical theory because the question will be simpler because in the nonrelativistic quantum mechanical theory, there is only conductive diffusion of heat whereas in the relativistic quantum mechanical theory, there is also radiative diffusion of heat.

Also according to this answer, the second law of thermodynamics hasn’t been proven to be absolute and according to this answer, the zeroth law hasn’t been proven to be absolute. Here’s my question.

At any pressure, does the internal energy of a liquid that’s in phase equilibrium with its solid form depend on the orientation of its surface with respect to its crystal lattice according to the simplified nonrelativistic quantum mechanical theory?

You might be think the answer is obviously no. From the second law of thermodynamics, it follows that when ever two substances are in thermal and solubility equilibrium with a third substance, they’re in thermal and solubility equilibrium with each other. From this statement the zeroth law of thermodynamics follows so there exists a way of defining temperature such that any one substance has a higher temperature when its internal energy is higher and two substances that are in thermal and solubility equilibrium always have the same temperature.

The problem with that argument is that as I stated earlier, the second law of thermodynamics probably hasn’t been proven to be an absolute law. I think that what the nonrelativistic theory really predicts is that the water at the internal energy where can exist in equilibrium with ice at the orientation that gives water the lowest equilibrium internal energy is also at the lowest internal energy with a zero rate of homogeneous nucleation of ice and when ice nucleates in slightly colder water, the crystal forms into the shape whose faces are at the orientation with the lowest freezing point.

I’m pretty sure that in the real world, we only observe one freezing point of water. I don’t want an answer saying the theory predicts that water at a given pressure in equilibrium with ice exists at the exact same internal energy regardless of the orientation of the surface. I want an answer saying whether you know how to prove mathematically whether the theory predicts it. Maybe the theory doesn’t predict it but we always observe it because most almost all ice in nature is polycrystal and the water we claim to be at its freezing point is actually at the lowest of all possible freezing points.

Redirecting port 443 depending on hostname

I have a Debian Wheezy server running Apache on only one public IP address. Obviously in the router I have redirected port 80 and 443 to this Debian Machine, so it answer any https request.

Now my problem is that I also have an Exchange server in a different machine and it uses SSL too, so my Debian server has to decide if stablish the connection, or redirect it to another server.

I’ve read aboud SNI but it speaks about multiple SSL sites on same server.

Why can toluene be chlorinated at either the benzylic position or the ring depending on the conditions?

My book mentions a reaction for the preparation of benzaldehyde with toluene in which side chain chlorination of toluene gives (dichloromethyl)benzene, which upon hydrolysis gives benzaldehyde:

Synthesis of benzaldehyde from toluene

Why does the chlorination occur at the methyl group and not the aromatic ring in this case? Also, why chlorination with $ce{FeCl3/Cl2}$ lead to 2-chlorotoluene (and 4-chlorotoluene), without any chlorination of the methyl substituent?

Soql in apex trigger returns different result depending on user who causes the trigger.

In Communities we have an ideas component where users can post/comment/vote on different ideas.

We are trying to create a trigger which will send an email to the idea creator whenever someone comments on their idea.

In doing so we have set up an ideaComment trigger.

In creating the email we are querying the parent idea to get some fields which help fill out the email body:

return [SELECT Id, Title, Body, CreatedById, CreatedDate, CreatorName, CreatorSmallPhotoUrl FROM Idea WHERE Id in :ideaIds];

One of the fields we use is the CreatorSmallPhotoUrl. In a development sandbox, I noticed that CreatorSmallPhotoUrl returns as a relative URL. ie:

/*CompanyName*/profilephoto/7290t000000CbGo/T

However, running the same query in the dev console returned absolute URLs which is my first point of confusion.

Despite this confusion, we made it work with relative URLs, however, I have now found this does not work in our full sandbox… sometimes.

While logged in to our customer community as an admin user the query returns a relative URL. However, when logged in as company customer community user it returns an absolute URL.

My understanding is that triggers should all run in system context, so I do not understand why users of different profiles would cause different query results.

One thing I tried which I was hoping would shed some light on this confusion was to set up a very simple test class and run the query as different profiles.

The test class is here:

@isTest(SeeAllData=true)
public class MyTestClass {
    static testMethod void test1(){
        Set ideaIds = new Set();
        ideaIds.add('0870t000000027cAAA');
        User communityUser = [SELECT ID FROM User WHERE Email='removed_for_stackExchange'][0];
        System.runAs(communityUser){
            System.debug([SELECT Id, Title, Body, CreatedById, CreatedDate, CreatorName, CreatorSmallPhotoUrl FROM Idea WHERE Id in :ideaIds]);
        }
        System.debug([SELECT Id, Title, Body, CreatedById, CreatedDate, CreatorName, CreatorSmallPhotoUrl FROM Idea WHERE Id in :ideaIds]);

        User adminUser = [SELECT ID FROM User WHERE Email='removed_for_stackExchange'][0];
        System.runAs(adminUser){
            System.debug([SELECT Id, Title, Body, CreatedById, CreatedDate, CreatorName, CreatorSmallPhotoUrl FROM Idea WHERE Id in :ideaIds]);
        }
    }
}

I found that all three debug statements returned absolute URLs.

So in summary:

In developer sandbox:

  1. query in trigger always returns relative URLs
  2. query in dev console always returns absolute URLs

In full sandbox:

  1. query in trigger, when fired by an admin, returns relative URLs
  2. query in trigger, when fired by a customer community user returns absolute URLs
  3. query in dev console returns absolute URLs
  4. query in test returns absolute URLs even when running as customer community user profile.

Can anyone explain this to me?

Can a solid have a different melting point depending on the orientation of its surface with respect to its…

I originally asked this question on Physics Stack Exchange than it got deleted and I now see that that type of question probably belongs here so I’m now asking it here. The real laws of our universe closely approximate the full quantum mechanical theory which explains nuclear chemistry, which in turn very closely simulates a simplified 3 dimensional quantum mechanical theory which treats electrons and nuclei as point charges that never undergo nuclear decay according to the quantum mechanical definition of point charge, and that it turn closely approximates a simplified nonrelativistic quantum mechanical theory even for systems much larger than an atom because the fine structure constant is so small. I want to ask something about the simplified nonrelativistic quantum mechanical theory because the question will be simpler because in the nonrelativistic quantum mechanical theory, there is only conductive diffusion of heat whereas in the relativistic quantum mechanical theory, there is also radiative diffusion of heat.

Also according to this answer, the second law of thermodynamics hasn’t been proven to be absolute and according to this answer, the zeroth law hasn’t been proven to be absolute. Here’s my question.

At any pressure, does the internal energy of a liquid that’s in phase equilibrium with its solid form depend on the orientation of its surface with respect to its crystal lattice according to the simplified nonrelativistic quantum mechanical theory?

You might be think the answer is obviously no. From the second law of thermodynamics, it follows that when ever two substances are in thermal and solubility equilibrium with a third substance, they’re in thermal and solubility equilibrium with each other. From this statement the zeroth law of thermodynamics follows so there exists a way of defining temperature such that any one substance has a higher temperature when its internal energy is higher and two substances that are in thermal and solubility equilibrium always have the same temperature.

The problem with that argument is that as I stated earlier, the second law of thermodynamics probably hasn’t been proven to be an absolute law. I think that what the nonrelativistic theory really predicts is that the water at the internal energy where can exist in equilibrium with ice at the orientation that gives water the lowest equilibrium internal energy is also at the lowest internal energy with a zero rate of homogeneous nucleation of ice and when ice nucleates in slightly colder water, the crystal forms into the shape whose faces are at the orientation with the lowest freezing point.

I’m pretty sure that in the real world, we only observe one freezing point of water. I don’t want an answer saying the theory predicts that water at a given pressure in equilibrium with ice exists at the exact same internal energy regardless of the orientation of the surface. I want an answer saying whether you know how to prove mathematically whether the theory predicts it. Maybe the theory doesn’t predict it but we always observe it because most almost all ice in nature is polycrystal and the water we claim to be at its freezing point is actually at the lowest of all possible freezing points.

Lightning input disabled depending on aura attribute

I have an lightning:input like this (already tried with not(v.customAddress)):

An aura:attributelike this:


And a Javascript function in my controller like this:

({

  selectAddress:      function(component, event, helper) {
    const input         = component.find('sendTo'); // A lightning:select
    const addressId     = input.get('v.value'); // The default lightning:option has a {! null } value

    if (addressId && addressId.trim() !== '') {
      component.set('v.address', /* myProcessedObject */);
      component.set('v.customAddress', false); // lightning:input has to be disabled
    } else {
      component.set('v.address', {});
      component.set('v.customAddress', true); // lightning:input has to be enabled
    }

  }

})

The first time my function is called AND component.set('v.customAddress', false); is reached, field is not disabled.

Sometimes, when component.set('v.customAddress', true); is reached, the field is disabled.

Example:

Initial step:
Step 1: initial state

I selected the address in the dropdown and clicked +
=> lightning:inputis field and disabled OK
Step 2: I selected the address in the dropdown and clicked +

I selected the null value from the dropdown and clicked +
=> lightning:inputis cleaned but not enable NOK
Step 3: I selected the null value in the dropdown and clicked +

With a different behaviour of the click function:

  selectAddress:      function(component, event, helper) {
    const input         = component.find('sendTo');
    const addressId     = input.get('v.value');

    if (addressId && addressId.trim() !== '') {
      component.find("street").set("v.disabled", true);
    } else {
      component.find("street").set("v.disabled", false);
    }

  }

Answering comment: https://salesforce.stackexchange.com/a/156171/37707:

Default state

Step one: (has to be disabled)
Step one

Step two: (has to be enabled)
Step two