Estimation and days

Question: How practical is using days estimations for stories in a sprint instead of another approach (e.g. story points)?
It seems to me that using days, links stories to specific developers only while ideally a story should/could be picked up by anyone in the team.
I am interested in possible cases that this works out well and the overall approach
Comment: Does this answer your question? [Why are Story Points of a story not equivalent to days/hours in estimation. In Scrum \[Agile\]](https://pm.stackexchange.com/questions/21512/why-are-story-points-of-a-story-not-equivalent-to-days-hours-in-estimation-in-s)
Comment: https://medium.com/@nezihtinas/why-estimates-arent-accurate-for-software-development-tasks-5cbfce5001ba
Comment: @JanDoggen: My question is about problems that arise when days are used instead of story points
Answer: Using ideal time - days or hours - is both practical and viable.
Although my personal preference is to not assign estimates in time, points, or size to work and to focus on making each unit of work the smallest useful, demonstrable slice that can be used to elicit feedback and counting the units of work per unit of time for planning, estimating in ideal time is the next best option.
When using time, it's important to use ideal time. Ideal time is how long it would take to complete the task with the assumption that there will be no interruptions or no unplanned problems.
Based on historical data, you can determine a relationship between ideal time and elapsed time. In Estimating Software Costs, Capers Jones uses ideal time as being about 83% of elapsed time - that is, one work month would be 132 hours or one work week would be about 33 hours. I find this a bit aggressive, so I tend to use closer 70%, making one work week about 28-30 hours. You can calibrate the relationship using data from your organization and how much time people dedicate to the effort.
It's also important to consider the average person on the team. If the most experienced person for the task estimates it at 4 ideal hours and the least experienced person estimates 16 hours, you shouldn't use either of those. Depending on the number of estimators, you can consider using the median, truncated mean, or geometric mean.
Not only do you need to consider the individual, but the estimate should consider the team's processes. A team that regularly pairs needs to account for this when considering how much time to plan on, both in the total (you may not simply be able to add up the ideal hours per person) and on each task (pairing may take longer to compete a task).
All of this sounds like a lot, but the end result is something that is pretty easy to understand and communicate among various stakeholders. The idea of time, ideal time, and how this fits into scheduling and forecasting isn't terribly difficult once you get a little bit time experimenting.
Comment: Isn't the estimate linked to an individual when using hours though? E.g. you mentioned the example of the experienced person estimating at 4 ideal hours. If that person though leaves the team and someone less experiences/skilled etc picks up the task, that estimation is no longer valid
Comment: @Jim If you have a cross-functional team, consider the whole team and the team's way of working, and choose an appropriate estimate, then you aren't tying it to an individual. The estimate should never be that of the most experienced or capable person. It probably shouldn't be the least experienced person.
Answer:
How practical is using days estimations for stories in a sprint instead of another approach

In my practical experience, it's entirely impractical and counter productive.
It doesn't really matter whether it works well or not, the name "day" is already taken.
And for higher ups, it's ambigous. If you write "it takes 5 something something days" it doesn't matter whether you wrote "5 ideal days" or "5 man days" or "5 days on average". What is stuck in the head of normal people and bosses alike is "5 days". All that "but I did not mean real days" is irrelevant, because that is in your head. If you bring that up after you failed the deadline of 5 days that your bosses understood (even if wrong), it will sound like a whiny technical excuse for you failing your project.
A really nice side effect of Story Points is that you cannot just skim the mail, break a half sentence out of context and come out with a totally faulty understanding of how long it will take. You could argue that doing that is a mistake anyway... but telling your boss they constantly make mistakes is not good for your future on that project.
So in an ivory tower, on paper, in an exam scenario, "ideal days" might have merit. It might work great. In the real world, in my experience it's just a communication disaster waiting to happen. And make no mistake, if you and your boss "miscommunicate" (aka they didn't spent enough time to properly read and understand their mails), that's on you. You get paid for making sure that doesn't happen.
Answer: Relative estimation works because people are generally better at relative estimates than absolute ones; relative estimates are easier to manage (because they seldom need to be re-estimated) and velocity is evidence-based rather than purely based on forecasts and guesswork.
It is possible to use "ideal days" as the unit of relative estimation - but only if the people receiving the estimates accept that less than one ideal day's work gets done in a day. Some people tend to have trouble with that concept however, leading to awkward questions like "Why are the team only working 8 days out of 10!?" The advantage of using abstract points rather than days or hours is that it sidesteps any assumptions about what is the "right" estimate or velocity.

Estimation and days


How to treat a cast iron pan that only gets occasional use

Question: I have a small cast-iron pan that I use a few times a month, sometimes more, sometimes less. Most advice about how to season a cast-iron pan involves lightly oiling and wiping it down, after it's been cleaned, before putting it away. This seems to assume that the pan gets used every few days. Since I don't use it very often, my concern is that any oil that remains on the pan might go rancid before I use it the next time, and that it will affect the flavour of whatever I cook. Is this something I should actually worry about? How do other people treat a cast-iron pan that only gets occasional use?
Answer: My (carbon steel) wok is used with that sort of frequency and doesn't go rancid.    What I do is (you may want to modify a little for the fact you're on cast iron):

Rinse and dry it.
Get it fairly warm.
Pour in a little oil (sunflower as that's what I mainly use).
Swirl/wipe the oil over the surface.
Heat until I think it starts to smoke; turn off the gas.
After a few seconds wipe of the excess with a paper towel.
After a few minutes wipe it off again as some oil will have magically appeared
Heat until it just starts to smoke again (fairly slowly to allow the heat to even out).
Allow to cool before putting away.

Now this isn't a very hard seasoning, but it does a good job of stopping the pan from rusting and stopping food from sticking next time it's used. The final amount of oil is very small, which helps.
Comment: I'd say that the important step is that after you rub it with oil, you heat it 'til it just begins to smoke -- that will polymerize the oils and keep it from going rancid
Answer: I've been using the same cast iron skillet since 1989 (yep, that long). After I cook in it, I do a thorough rinse with hot water and a scrubby of some sort. No dish soap. No scouring pad. I typically have a film of oil remaining. I put the skillet in the oven (center rack, upside down) and set the oven to 350F. Once it is preheated, I turn the oven off and let the skillet dry in the oven overnight. This routine has kept my skillet in good condition for decades. I'm sure someone will say that I'm not doing it "right", but the method is simple and it has worked for me over and over again.
Answer: I use my cast iron with about the same frequency as you, about once a month.

Rinse it with hot water to remove dust
Cook (possibly adding oil)
Scrape food off under hot water with spatula, fork, knife, Lodge scraper, etc.
Scour with stainless steel scrubber (no S.O.S. or detergent)
Heat on stove for 5m until all water evaporates
Pour kosher salt (rough) in center and rub a minute with a paper towel or napkin
Rinse with hot water
Heat on stove for 5m until all water evaporates
Add a dab of coconut oil and rub with a paper towel
Store
Repeat

The coconut oil doesn't get sticky like canola oil does. You could skip the salt rub if it's not that dirty or you don't care about old food.
Comment: There are still gross bits that are stuck. The salt turns black. I'm OCD about clean dishes.
Comment: If you already scrape under hot water AND scour with a scrubber, why also scrub with salt? Does it do something different?


Is it good practice to name an admin account 'admin' or 'administrator'?

Question: I have seen on numerous occasions that organisations name their admin account anything but admin or administrator. Most often of course people in help desk would use their own account with different levels of admin rights for day to day tasks, but sometimes help desk staff would use a shared admin account that wasn't named admin or administrator, and I was wondering if that's for reasons of safety and security (e.g. harder to guess that the admin account is laracroft).
Comment: Those who voted this down, could you please add a reason as to why you think this needed a down vote? I would believe this is a valid question, is clear and useful. – Thanks.
Comment: You asked what a downvote-without-comment meant; I told you.  You may believe that people shouldn't do them, and you're welcome to hold that belief, but [it's not valid around these parts](http://meta.stackexchange.com/questions/135/encouraging-people-to-explain-downvotes), so other people are unlikely to be bound by it.  By the way, a downvote doesn't mean people think your question's ludicrous; merely that it *shows no research effort, is unclear, or not useful* - we have a whole range of tools, including voting to close and flagging, for those we think ludicrous..
Comment: Mouse over the down arrow; the popup says "*This question does not show any research effort; it is unclear or not useful*".  Downvotes without comment may be presumed to be for at least one of those reasons.
Comment: Sure, I get that @MadHatter, but I have searched for existing answers and tried to find reasons for naming local or shared admin accounts anything but 'admin' or 'administrator'. In terms of being "unclear" or "not useful" I can't see how my question is either unclear, or not useful. It's a question that arose out of observation and curiosity. All I'm wondering with the down-votes is that someone thinks it's ludicrous to ask a question like this, but then doesn't make an attempt to seek clarification.
Answer: In Active Directory accountnames must be Unique and AFAIK the account named "Administrator" is one of the defaults that is created and best practice is that "use of the Administrator account should be reserved only for initial build activities, and possibly, disaster-recovery scenarios.".
The means that other admin accounts, the ones people actually use, must be created with a different login name.
Comment: Thanks. That makes sense. Of course in an environment where help desk staff has ACL-controlled admin rights on various levels it makes sense that they use their account for the tasks they're allowed to handle.
Comment: I was wondering also if it is good practice to name the admin account on your home network something different than 'admin', but then again, the best practice and defence, among others, is probably having a strong and unique password that goes with it.
Answer: It's merely for security and traceability reasons for why we should use a nominative account instead of generique one, because it's hard to guess in case of a brute force attack ,and in case if anything happend we now who did what and when.
PS: It not at all a good pratice to share an administrator account between multiple users ,which will create traceability issue .
Comment: Thanks, @BENS. Traceability issues would certainly be an argument against shared admin accounts. Then there's also the risk of disgruntled employees… I wonder why so many organisations employ the practice of shared admin accounts though.
Comment: @AlexIxeras One reason we do it is due to device encryption.  Booting a device requires you to decrypt the disk.  Doing so requires a valid known account.  This step is done before domain awareness, so a single known account that has access to boot laptops is useful.  Additionally, when working with laptops, often you need to be able to login as admin to diagnose network faults, and thus a local admin account is useful.

That's not to say those shared local admin accounts have domain admin or higher shared permissions...
Comment: @KHobbits thanks for the info ,could you please if you can ,direct me to any good paper about this issue .


How can i pause the loop iteration based on specific condition

Question: Usecase :- My test contains 5 Thread Group. Each Thread Group is having one loop controller with loop count 2 and all the HTTP requests inside it.I need to execute first loop iteration and pause the loop iteration then execute next thread loop's first iteration and pause until first loop iteration completes of all the Thread Group. The reason of doing that is i need to compare page size in   case of without cache and with cache.
Comment: I'm not sure I follow what you're asking. It sounds like you want to run Thread Group 1 loop 1, then Thread Group 2 loop 1, Group 3 loop 1, Group 4 loop 1, group 5 loop 1, Group 1 loop 2 and so on - If this is the case, what is the purpose of using separate thread groups? I'm not sure how your requirement of not starting the second loop until all thread groups have finished the first loop is intended to work, or why it's needed. Please edit your question and add more information about what you're trying to achieve, and why.
Answer: It should be enough to have 2 thread groups: one with HTTP Cache Manager and another without the HTTP Cache Manager. Remember that the HTTP Cache Manager works only for Embedded Resources (images, scripts, styles, fonts, sounds, etc.) and given well-behaved JMeter test should have the same network footprint as the real browser - your use case "without cache" doesn't have a lot of sense as I don't think that a "normal" user would disable/clear cache in his browser before accessing next page of your application.
If you still want to accomplish your scenario consider going for Inter-Thread Communication Plugin which can be used to pause other thread(s) even in different Thread Groups while specified condition is met.


Windows GUI C++ Programming

Question: I want to learn C++ GUI programming using Visual Studio 2008. I'm not sure where to start though. I learned C++ in high school, but not GUI. I've been doing C# for about 3 years now and thats how I "learned" GUI programming. Now I want to learn how to write GUI's without the use of the .NET framework, so where do I start?
Answer: Charles Petzold's "Programming Windows 5th Edition" is the Bible for Windows programming.
http://www.charlespetzold.com/pw5/
Comment: The Bible! Reading Petzold's books is a must not just to develop using directly the Win32 API (which has its pros and cons - I prefer it to using MFC, though) but also to understand how Windows works below the hood.
Answer: Since you say you've been doing C# GUI programming for about 3 years, I'll assume that means Windows Forms. One way to dip your toe in the water is to remember that WinForms is really just an object-oriented wrapper around user32. So load up Reflector and take a look at the way some of the controls are implemented. You'll see that these strange messages like WM_PAINT and WM_KEYDOWN are pumped to the WndProc of the various controls by Windows. In plain old Win32 or MFC programming, the same thing is still going on. Doing this will let you slowly peel back the layers of the onion; you'll get a better feel for how Windows Forms works, too. From there, I'd recommend picking up Programming Windows by Petzold; it's old, but the native APIs in Windows don't move around that much. Have fun!
Answer: MFC is almost outdated now. I would recommend to use WTL instead .
Well it is also not a good idea just to start programming for GUI in C++ when there are so many good frameworks available like QT cross platform framework.
Answer: Some heretical opinions...
I wouldn't recommend C++ for writing complex Windows GUIs - language/library combos like C# or Delphi are so much more productive. If you want to get into C++ programming I'd suggest using it to write a multi-threaded server of some sort - a simple Web server would do for starters.
And if you really want to understand the underlying Windows APIs, I think there is something to be said for writing a simple application (like, say, a simplified version of notebook) in C (not C++). You'll only want to do it once, but you will learn a lot in the process.
And before anyone starts madly down-voting, let me say that I am a C++ programmer of over 20 years standing, and really love the language.
Comment: No, I totally agree. It's worth it for the "OH -- so THAT'S how it works" and for the "OH -- so THAT'S why there have been a bajillion wrappers for it" and for the "OH -- so THAT'S why we don't do it that way anymore." =)
Answer: Would it be OK with you to write GUIs in VC++ using Microsoft Foundation Classes or MFC? That is how I would and have written VC++ GUIs in the past.
There have been many books written on MFC over the years. I'm sure any one of them will do nicely. You may find in the literature the reference ATL which is a Microsoft iteration on STL. MFC and ATL kind of merged over the years so anything ATL is also applicable to an MFC app these days.
Good luck and have fun!
Comment: IMHO, it's definitely the way to go.
Answer: Ah I know how you feel, old interpreted languages programmer that want to know the magic behind compiled programing. Well I can't find the tutorial that I used to learn windows programing, but just know that there is good win32 tutorials around, so you don't waste your time buying a book just yet.

I found it: http://www.relisoft.com/win32/index.htm
Neatest tutorial around, trust me.
Answer: As of now (Windows 8), WinRT, a completely new API has been brought to the audience by Microsoft and I'm quite excited about it. Never done MFC programming, but saw some code samples and they look weirdly 90's C-style (modern C-style is often better!). So, without going to start directly with MFC, I think I will start with WinRT
:)

Windows GUI C++ Programming


Add a custom font to Apple News

Question: I have a font in both .otf and .ttf format.  I'd like to use it on my Apple News article, but I keep getting the error Error: Custom font (postscript name=CustomFontName) not available.  I know the JSON is correct because it works if I use a standard font.  I've included the font in the same folder as article.json, but beyond that I can't find any documentation on how to do this.
Comment: Only put your custom `.otf` font files in the same directory as the `article.json`, then open `article.json` in News Preview.
Answer: I see no mention of custom fonts in the Apple News Format guidelines. It states in the docs:

fontName: The PostScript name of the font to apply, such as GillSans-Bold. You
  can reference any font by name. see iOSfonts.com for a list of available fonts.

and elsewhere:

Fonts News supports all iOS system fonts except San Francisco, which
  was introduced with iOS 9.

which originally led me to believe that it was being implied that custom fonts don't work, but experimenting with the format I see that my assumption was wrong.
Copying the PostScript name of the font (see info panel in OS X Font Book) and placing the font within the same folder as article.json file it works. But make sure if you're going to apply emphasis that you include the relevant italic or bold variants as well.
The fonts I used were open type true type from Google Fonts. You can get the exact ones from that link. I included Roman and Italic variants in my folder and referenced the font by calling it "IM_FELL_DW_Pica_Roman" within the Component Text Styles (i.e. paragraph styles). When I then applied markdown to identify italic text it automatically found the italic variant. I didn't need to reference the italic version separately (i.e. within inline text styles).
Here's my code:
{
    "version": "1.1",
    "identifier": "sketchyTech_Demo",
    "title": "My First Article",
    "language": "en",
    "layout": {},
    "components": [{
        "role": "title",
        "text": "My First Article",
        "textStyle": "titleStyle",
        "inlineTextStyles": [{
            "rangeStart": 3,
            "rangeLength": 5,
            "textStyle": "redText"
        }]
    }, {
        "role": "body",
        "format": "markdown",
        "text": "This is just over the minimum amount of _JSON_ required to create a valid article in Apple News Format. If you were to delete the dictionary enclosing this text, you'd be there.",
        "textStyle": "bodyStyle"
    }],
    "componentTextStyles": {
        "titleStyle": {
            "textAlignment": "center",
            "fontName": "HelveticaNeue-Bold",
            "fontSize": 64,
            "lineHeight": 74,
            "textColor": "#000"
        },
        "bodyStyle": {
            "textAlignment": "left",
            "fontName": "IM_FELL_DW_Pica_Roman",
            "fontSize": 18,
            "lineHeight": 26,
            "textColor": "#000"
        }
    },
    "textStyles": {
        "redText": {
            "textColor": "#FF00007F"
        }
    }
}

(Note: Trying to add bold it silently fell back on italic because the relevant font wasn't available.)
One final thing I would say is that the use of custom fonts appears to be undocumented although it works. Therefore, it won't necessarily be the case (unless you've seen confirmation elsewhere) that Apple will accept the use of custom fonts when you upload.
Answer: There are some useful tips on how to get the actual name of your custom font in this answer - it isn't always what you'd expect. The same rules apply to the Apple News ecosystem.
Your font definition should look like this:
"fontName": "Raleway-ExtraLight"

Add a custom font to Apple News


Send email when Google Form submission is updated

Question: I have read plenty of posts about notifying someone via email when a form has been submitted and including the form data in the email but what I would like to do is identify an update to already existing information and have that put in an email and sent. I imagine that this would be done by identifying the latest timestamp and grabbing the corresponding entry. However, my extremely limited programming skills mean that I have been unable to work out the answer.
Answer: You can do this using Google App Script, open Spreadsheet where your form responses are being stored.
Go to Tools -> Script Editor -> Script editor will be opened, copy the below function.
Create a trigger to call this function on form submission
Resources -> Current project's triggers -> Select 'from spreadsheet' and 'On form submit' and create a trigger.
function sendEmailNoti(e) {
   var timeStamp = e.values[0];
   var userEmail = e.values[1];
   var products = e.values[2];

   var subject = "New Subscription Request";
   var email = "email@example.com";
   var message = "User email : " + userEmail + "
Products opted : " + products + "
Timestamp : " + timeStamp;

   MailApp.sendEmail({
     to: email,
     subject: subject,
     htmlBody: message
   });
}

Comment: Thanks Uttam. This seems to be a simple solution that works. Is it possible to have information included in the email that has not changed. E.G., if an edit is made the userEmail may stay the same but the email will not appear in the message in these instances. Also, is it possible to get the form Edit URL in to the message (getEditUrl())?
Answer: It just happens I have such a function in my bag of tricks!
This function assumes that you've got a trigger function formSubmitted(e) for form submission that utilizes the event object it receives. As you surmised, it identifies the most recent update. It then creates a simulated form submission event, and invokes the form submission trigger function.
Set onChange() up to trigger on spreadsheet changes.
/**
 * Sometimes, Google Apps Script sucks. This is one of those times.
 * If a user updates previously submitted form data by using the "edit" link,
 * that data will be updated in the Form Responses sheet. Unfortunately,
 * that will NOT generate a spreadsheet form submission event. (See explanation:
 * https://code.google.com/p/google-apps-script-issues/issues/detail?id=2969#c12)
 *
 * Observation: a form edit shows up as a change, with type of "OTHER", and source
 * of a spreadsheet with activeSheet="Form Responses" and activeRange="A1". We
 * will use that information to limit when we force our normal form-submission
 * handler to run. Unfortunately, the event doesn't tell us which row changed,
 * but that should be the one with the most recent timeStamp.
 */
function onChange( e ) {
  if (e.changeType !== "OTHER") return;
  if (e.source.getActiveSheet().getName().indexOf("Form Responses") === -1) return;
  if (e.source.getActiveRange().getA1Notation() !== "A1") return;

  // Find latest form submission
  var sheet = e.source.getActiveSheet();
  var timeStamps = sheet.getRange("A2:A").getValues();

  // Determine most recent date
  var max = Math.max.apply(null,transpose(timeStamps)[0]);
  var properties = PropertiesService.getDocumentProperties();
  var lastMax = properties.getProperty("maxDate");
  if (lastMax && max.toString() === lastMax) return; // Avoid changes triggered by updates from onChange function
  Logger.log("onChange() thinks there's been a form edit. e="+JSON.stringify(e));
  properties.setProperty("maxDate", max.toString());
  var maxDate=new Date(max);

  // Then find the sheet row that contains it
  for (var row=0,found=false;row<timeStamps.length&&!found;row++) {
    if (timeStamps[row][0] && timeStamps[row][0].getTime() === maxDate.getTime()) {
      found = true;
      break;
    }
  }

  if (!found) {
    // We're blind... recalc everything
    // TODO
  }
  else {
    // Trigger the submission event for this row
    row += 2; // adjust for offset into sheet rows
    var dataRange= sheet.getDataRange();
    var data = dataRange.getValues();
    var headers = data[0];
    var response = data[row];
    var respRange = dataRange.offset(row-1, 0, 1, dataRange.getLastColumn());

    // Build event object with range, values and namedValues filled in
    var values = respRange.getValues()[0];
    var namedValues = {};
    for (var h in headers) { namedValues[headers[h]] = [values[h]]; }
    var e = { range: respRange,
              values: values,
              namedValues: namedValues
            };
     formSubmitted(e);        // Simulate event
  }
}

Comment: Now that I have applied myself to the task I have found that this does indeed work. Great solution. It seems that I can only mark one answer correct but both answers worked and probably have their benefits and drawbacks.
Answer: I approached this problem slightly differently. Instead of creating a new trigger - modified the form submit trigger itself slightly to pick values for each key from the spreadsheet instead of from the form responses.
The revised code looks like this
// Include a copy of all responses
for ( var keys in columns ) {
  var key = columns[keys];
  message += key + ' :: '+ sheet.getRange(resultUrls.length+1, (data[0].indexOf(key)+1)).getValues() + "
";
}


How can we see incoherent light at all if waves interact?

Question: If we assume that a monochromatic source of light produces waves with uniformly distributed phase differences then the sum of all those waves should be zero and thus also the intensity?
Answer: Short answer: Incoherent light is not a sum of monochromatic waves with
randomly chosen phases, but is instead a random process where the value of
the field is random from point to point in time. A better model for this would
be a wave with a single definite but random phase at any given point that
changes from moment to moment.
Long answer:
The answer boils down to a couple of facts. The first point is that no source
is truly monochromatic, the idea of a "monochromatic" light source is an
idealization to mean an infinitesimal bandwidth (which also implies a limit of
existing for an infinite amount of time).
The second point is that nothing is either perfectly coherent or perfectly
incoherent. Instead it's useful to think of everything as partially coherent
with a characteristic scale that defines how much a field is coherent. If we
only think of a one-dimensional field (i.e. think of a ray of light moving from
a source to some detector or point in space), then the 'characteristic scale'
is what we call the Coherence time.
Putting some math to this, we can analytically represent a monochromatic
electric field at a point by the equation
$$E(t) = A\exp(-i\omega t),$$
where $A$ is the complex amplitude of the light ($|A|^2$ is proportional to the
energy density and thus brightness of the light). Now in reality $A$ is not
just a constant but must change in time, so $A \to A(t)$ (one way to see this
is no source can exist from an infinite time in the past to an infinite time in
the future). For a random field, $A(t)$ will vary randomly in time. Now any
function of time automatically can be represented by a sum of frequencies
(which can be computed by the Fourier_transform
$$A(t) = \int_{-\infty}^\infty \tilde A(\omega') \exp(-i\omega't)d\omega'$$
and thus
$$E(t) = \int_{-\infty}^\infty \tilde A(\omega') \exp(-i(\omega+\omega')t)d\omega'.$$
Therefore we can see that $E(t)$ is not simply monochromatic but has components
at all frequencies $\omega+\omega'$ for which $\tilde A(\omega')\ne 0$.
Now $|\tilde A(\omega')|^2$ is the spectral energy density and for stochastic
(random) fields can be represented by random numbers whose ensemble average
encodes the degree of coherence (how coherent/incoherent the field is). For
stochastic fields each $\tilde A(\omega')$ will be uncorrelated, i.e. $\langle
\tilde A^*(\omega_1)\tilde A(\omega_2)\rangle = \langle|\tilde
A(\omega_1)|^2\rangle\delta(\omega_1-\omega_2)$. What this means is that
incoherent fields are made of up of a sum of mutually unrelated frequency
components, each of which is coherent only with itself (i.e. can only interfere
with itself). In addition, the coherence time $\tau$ will simply be related to
the bandwidth $\Delta\omega = 1/\tau$ of $\tilde A(\omega)$ (i.e. the range of
frequencies for which $|\tilde A(\omega)|^2\ne 0$ is roughly $\omega \le \Delta\omega$).
Now the coherence time $\tau$ means that the field is only coherent during a
time $\Delta t <\tau$. So for instance if you have very fast detectors (small
$\Delta t$ to make a measurement), you might be able to see coherence effects
from a source that looks incoherent when you average for longer time scales.
Now a fully incoherent source of light means that $\tau = 0$, i.e. for any
time scale $\Delta t > 0$ the light looks incoherent. But for $\tau =0$ means
that $|\tilde A(\omega)|^2$ has infinite bandwidth (such as for ideal white
noise). Now if you filter light to some bandwidth $\delta \omega$ you get a
longer $\tau$, but your energy is proportional to
$\int_{-\delta\omega}^{\delta\omega}|\tilde A(\omega)|^2d\omega$ and in the
limit of monochromatic light $\tau\to\infty$ but the integral
$$\lim_{\delta\omega\to 0} \int_{-\delta\omega}^{\delta\omega}|\tilde A(\omega)|^2d\omega \to 0,$$
and you have no energy (in the limit).
Reference:
"Optical Coherence and Quantum Optics" by Leonard Mandel and Emil Wolf
Comment: It's an interesting question and your answer is very helpful, I have some questions: Is your answer above more classical than quantum mechanical? Does the QM probability of interaction of a net EM field with the eye a factor?  Is some of the coherence in light sources  (like the sun) due to Einstien's stimulated emission?  How much energy (%) can the eye see on a typical sunny day? I might be on the wrong track with some of these equations but any insight is appreciated.
Comment: This answer was written in terms of the stochastic classical fields. For incoherent light, this formalism is usually enough to fully describe any physics/observations (including photodetection with a photodiode or your eye). Even for maximally coherent (laser) light this is usually good enough as long as you remember there is intrinsic quantum noise which can't be assumed to be zero (e.g. shot noise).
Comment: "Is some of the coherence in light sources (like the sun) due to Einstien's stimulated emission?"
Stimulated emission is a way that you can coherently amplify light, which is the mechanism behind how lasers work (the "se" in laser stands for stimulated emission). The light from the sun is nearly perfectly thermal and thus incoherent. Any coherence effects from sunlight come from filtering or propagation and thus are unrelated to stimulated emission


Is $\arcsin(1/4) / \pi$ irrational?

Question: Is $\arcsin(1/4) / \pi$ rational? An approximation given by a calculator seem to suggest that it isn't, but I found no proof. Thanks in advance!
Comment: See the essentially  identical question https://math.stackexchange.com/q/3617176/442 already at math.stackexchange.com .
Comment: Of course, "seem to suggest" is not very precise. I meant that I couldn't see any pattern immerging from the finitely many digits.
Comment: yes, seems very relevant, I'll look. Thanks a lot!
Comment: "An approximation given by a calculator seem to suggest that it isn't [rational]": how come you can see (ir)rationality from a finite decimal representation? (If I got what you meant right.)(This applies to the MSE post as well.)
Answer: Yes, $\arcsin(\frac14)/\pi$ is irrational.
Suppose $\arcsin(\frac14)/\pi = m/n$, where $m$ and $n$ are integers.
Then $\sin(n \arcsin(\frac14))=\sin(m \pi)=0$.
We analyze this usng the formulas from Browmich as cited on Mathworld:
$$\frac{\sin(n\arcsin(x))}{n}=x-\frac{(n^2-1^2)x^3}{3!} + \frac{(n^2-1^2)(n^2-3^2)x^5}{5!} + \cdots$$
$$\frac{\sin(n\arcsin(x))}{n \cos(\arcsin(x))}=x-\frac{(n^2-2^2)x^3}{3!} + \frac{(n^2-2^2)(n^2-4^2)x^5}{5!} + \cdots$$
for $n$ odd or even respectively.
So the right-hand sides must be 0 for $x=\frac14$.
However, when we multiply the terms on the right-hand sides by $2^nn$ (if $n$ is odd) or $2^{n-2}n$ (if $n$ is even), we find that all the terms are integers, except that the last non-zero term is $\pm\frac12$.
So the right-hand side can't be 0, the left-hand side can't be 0, and $\arcsin(\frac14)/\pi$ must be irrational.
Comment: Can you assume WLOG that $n$ is even, to simplify this somewhat? I don't think you use the fact that $m/n$ is in lowest terms anywhere, so you can replace $m$ and $n$ by $2m$ and $2n$, respectively, so that you don't have to split into cases later.
Answer: This is a partial case of the classical result.
https://en.wikipedia.org/wiki/Niven%27s_theorem
Answer: Let $\theta= \arcsin(1/4)$. Assume $\theta$ is a rational multiple of $\pi$.
Then, there exists some $n$ such that $\sin(n\theta)=0$. This gives $\cos(n \theta)= \pm 1$.
Set $z=\cos(\theta)+i \sin(\theta)$, then $z^n= \pm 1$ and $\frac{1}{z^n}=\pm 1$.
This gives that $z$ and $\frac{1}{z}$ are algebraic integers, and hence so is
$$2 i\sin(\theta)=z- \frac{1}{z}$$
Therefore, $\frac{i}{2}$ is an algebraic integer, which is a contradiction.
Comment: Nice proof! It's essentially the same as Matt F's, but replaces the explicit formulas with closed ringness of algebraic integers. Pretty neat.

Is $\arcsin(1/4) / \pi$ irrational?


WP admin bar disappeared

Question: The admin bar suddenly disappeared from the front end side of my site. It is present and works alright at the backend. I thought it could be due to some plugin so I deactivated them one by one and checked . Now all the plugins are deactivated and the admin bar is still missing...My theme does have the wp_footer() in footer.php. What is it that I am missing?
Answer: Might be one of 3 things (since you verified a wp_footer)

you set it to not show in your user profile
a plugin you installed has a Confliction with it
you created a php / js code which produces errors in your wp_footer

Course of action:
1. Check you personal user profile backend to see you haven't turned it off
1. turn off all plugin (rename plugins folder temporarily)
2. Activate wp-config errors display on (and check for errors)
- Response to this & fix errors.
Hope this helps get to the root of the problem... Basiclly these
are steps to be taken before asking a question so we could have the
additional information incase this does not solve you issuse.
Best of luck, Sagive
Comment: I should have checked this before..Silly on my part...It was set not to be shown in the user profile as you pointed out. Seems like the plugin I was using to enable front end posting had set that option off.
Thanks!
Comment: gr8 mate - happy you got it working

WP admin bar disappeared


Provision to delete answers to your question

Question: There should be a provision to delete answers to your questions if you think that it could decrease the chances of getting your question answered. For example, While going through questions, I tend to ignore the ones which have 1 or more answers. The higher the number, the more I tend to not go for them (answering them). So would it not be a good idea to provide the original poster with the facility to delete answers to their questions?
Comment: "There should be a provision to delete answer to your questions if you don't like them" Wow, that's incredibly presumptuous. Can I delete your question because I don't like your attitude?
Comment: @UmerHayat It's not because of your English. It's because of your desire to delete other people's work.
Comment: @assylias - flags should not be used on answers that are simply wrong. That's what down-votes are for.
Comment: @UmerHayat Stack Exchange is not Facebook.  It is by design that users cannot (singlehandedly, anyway) delete other users' posts, whether those posts are questions themselves, or answers to your question.
Comment: You can't tell us not to downvote, downvotes give a quick way to gauge what the community thinks on meta.
Comment: No, not a good idea. And I removed your humble request, because it was not humble and these requests often have the opposite results. Besides, anybody have the right to vote as he or she likes.
Comment: @UmerHayat - Remember that [downvotes work differently on Meta](http://meta.stackoverflow.com/faq#vote-differences). They are used to show disagreement with your suggestion, rather than a poor question.
Comment: Suggestion **are** welcome. Any suggestion. It's just that bad, ill-thought out ones will get down-votes while good, well thought out ones will get up-votes.
Comment: @BoltClock'saUnicorn and All : why every body is putting full stop at " if you don't like them" and not considering the other reason. Calm down ...  It is just a suggestion. Looks like suggestions are not welcomed here much. And -9, what a brutal response. I am not sure whether  I should delete this or should I patiently wait for my rep to exhaust?
Comment: @JamesAllardice: Thanks a lot for telling, i was getting seriously offended.
Comment: I am OK with the way down votes work in meta but I need my rep back ...  I just realized that I can't down vote, no more :(. Don't you people think that -21 is way to much to show disagreement?
Comment: Ok, I agree that the " if you don't like them" thing was a bit, umm unprofessional or non-serious ?. So, I updated the question. Read it again, it sounds (relatively) more reasonable.
Comment: @UmerHayat "I can't down vote no more": were you planning to downvote your question? ;-) (I know it hurts, happened to me a few times - don't take it personally!)
Comment: or may be I failed to put forward idea due lack of proficiency in English language. O come on guys it is my 3rd language.
Comment: @Daniel moderators can, in fact, delete other users posts sinlgehandedly.
Answer: The correct response to answers that don't actually answer your question is to down-vote them. If the answer gets down-votes the poster will (hopefully) either improve it to correct the mistakes or delete it. Both of which solve your problem.
Allowing the OP to delete answers "they don't like" would lead to abuse.
Answer: SO's questions and answers aren't meant to help only the person who posted the question, but all future visitors that have the same problem. That's also why we close questions as too localized.
A question poster deleting an answer because he doesn't like it stomps all over that...
Answer: Answers should not be deleted because you don't like them; this is true for everybody.
There is already a process used to delete an answer, and that involves at least three users who can vote to delete an answer with a negative score.
Leaving the decision of deleting answers to the user who asked the question is the last thing I would see implemented, also because there are users who, instead of accepting the fact they didn't expose the problem in the correct way, they would say the answer is wrong. It is probable that another user would be more objective about the given answers.
About the chances of getting the question answered, that is purely subjective, and you cannot be sure the question will never be answered, even if there is already an answer. There are two cases:

The answer is utterly wrong, or it's not the best answer
The answer is a very good one

In the first case, it is probable a user will answer the question to show that the previous answer is utterly wrong, or suggesting something that it is preferable not doing; in the second case, there should be a user who offers an alternative solution.
In the first case, a new (possibly better) solution is given; in the second case, you already had a very good solution, but you get an alternative solution.
I would say that the chances of getting an answer depends from the question, not from the existing answers, which would eventually be an incentive for giving an alternative solution.
If the question is interesting, or shows efforts in finding a solution, it is probable that more users will try answering it. If the question is asking something too localized, for which the OP is the only one interested in the answer, then it is probable few users will try answering it.
Comment: I think perhaps the OP is talking about getting an answer they didn't want to hear, e.g. they've asked how to kill a bear with a spoon and the answer was to use a fork.
Comment: I agree 100%, and am not suggesting a user should be able to delete an answer regardless of the reason. I'm just saying that in the OP's eyes, an answer doesn't always fit into the two categories you listed.
Comment: I got myself answers that didn't answer what I asked, such as when I asked how to do something, and the answer was just "you should not do it," followed by an explanation of why that should not be done. I am convinced that the OP is not the one who should decide to delete those answers, but they should eventually be down-voted, and deleted. This process involves more than one user.
Comment: I didn't include the "the answer says something I don't want to hear" because that is not a problem with the answer, but eventually with the question. If you say the answer is not even a partial answer for the question, that would be different.


Gain and phase margin

Question: Why Bode plots are on jw axis when determining gain and phase margin?
Usually it is explained as 1+G(s)H(s) should not be zero and margins represent how far away from this we are. But for showing this ("distance" to G(s)H(s) = -1, i.e. 0dB, -180 degree phase combination) we use bode plot which are GH values on jw axis. I would rather expect it to be on the whole s plane.
Comment: Do you mean why is the Bode plot constructed using signals with frequencies along the $j \omega$ axis?
Comment: Usually it is explained as 1+G(s)H(s) should not be zero and margins represent how far away from this we are. But for showing this ("distance" to G(s)H(s) = -1, i.e. 0dB, -180 degree phase combination) we use bode plot which are GH values on jw axis. I would rather expect it to be on the whole s plane.
Comment: Please **edit your question** with that comment.
Answer: The idea behind Bode plot analysis is that you want to know how close the poles of the closed-loop transfer function are to the stability boundary.  If a pole is on the stability boundary, then the closed-loop gain would calculate as infinite.
In the case of Laplace-domain analysis, the stability boundary is the $s = j \omega$ line -- any pole that has a positive real part is outside of the stability region, and the system is unstable.
When you do an open-loop Bode plot, you are concerned with how close the open-loop gain gets to -1, because if it were exactly -1 then there would be one or more poles sitting right on the stability boundary.  The degree to which the open-loop gain "misses" -1 is a measure of the degree to which the resulting closed-loop poles are far away from the stability boundary.
Note that a drawback of the Bode plot is that you only know how far the closed-loop poles are from the stability boundary -- not whether they are actually stable.  For that you need to apply some intuition, or you need to make a Nyquist plot, and know how many unstable zeros the system has.
Note, too, that for a sampled-time system expressed in the z domain you can do a Bode plot by tracing $z = e^{j \omega \theta}$ for $0 \le \theta \le \pi$, because that's the stability boundary in the z domain.
Comment: Thank you. I was thinking this way too, but then it is very simple approach. Do you think that in real practical situations, if, for example, GH value somewhere in right half s plane gets very near to -1 value the system can go unstable?
Comment: Are you asking what happens if the value of G*H that is *computed* for a value of s in the right half plane?  That's an immaterial question.  First, because if you're doing that you may as well figure out if it's *exactly* -1, and at what value of s.  And second, because you want to design with plenty of gain and phase margin, because when you're short on one or the other then your system misbehaves; with lots of time-domain ringing or overshoot, and peaking in the frequency domain.
Comment: In real engineering I don't think that "exactly" is most of the time relevant. Here I assume that we know the locations of all the poles of the system, and say there is no in the right half plane. I am just saying that if GH for some s value in the right half plane is very close to -1, small errors in the modeling can cause it be a pole. Shouldn't we also take this closeness to -1 as a margin against unstability?

Gain and phase margin


Physical Composition of a MAC address on a NIC card - what would it look like under a microscope?

Question: Here can I find a description of how a MAC address is physically stored on a NIC card? I'm not looking for an explanation of the engineering process that put it there. I'm looking for a description of its physical composition (i.e. bit values [microscopic up and down things] stored on the NIC chip making up 48 bits).
Comment: http://en.wikipedia.org/wiki/EPROM  is one way of doing it.
Comment: @MarcB: it is more likely [EEPROM](http://en.wikipedia.org/wiki/EEPROM)
Comment: I think what you are looking for is given *inter alia* by the [Wikipedia MAC address article](http://en.wikipedia.org/wiki/MAC_address), but you should have found that for yourself. Took me ten seconds.
Comment: EJP must have only looked at the Wikipedia MAC address article for only 10 seconds because it does not explain the physical composition at all.

"inter alia"???? My question is pretty specific, I'm not looking for "other things"
Answer: It's probably not possible to answer this completely as there is no required method a network interface must use to physically store it's built-in or "burned in" address.  Furthermore, it may be different for each manufacturer or chipset of NIC.
However, taking the BCM57xx series NIC as an example, in the programmer's guide it mentions that the NIC registers are initially populated from "NVRAM", and that NVRAM in this case is flash or serial EEPROM.
An excerpt from page 88 of the above .PDF:

Broadcom NetXtreme controllers require the use of an external
  non-volatile memory (NVRAM) device (Flash or SEEPROM), which contains
  a bootcode program that the controller's on-chip CPU core loads and
  executes upon release from reset. This external NVRAM device also
  contains many configuration item s that direct the behavior of the
  controller, enable/disable various management and/or value-add
  firmware components, etc. All configuration settings are
  default-configured in the official release binary image files provided
  in Broadcom's CD software releases. However, the settings chosen as
  default by Broadcom may not be what best suits a particular OEM's
  application so may need to be changed by the OEM

You can search further for microscopic images of NAND cells if you want - but the actual bits are electrical charges and I don't believe they are visible.  In the bit of reading I've done about it, flash memory is a form of an EEPROM so I believe serial EEPROMs would be in the same boat regarding that.
I would guess that most NICs these days operate the same way.
Answer: MAC addresses are 12-digit, 48 bits in length, hexadecimal numbers (64 bits is also in use). For example, this is a 48-bit MAC address:
<code>00:A0:C9:14:C8:29
</code>
where the first six characters 00:A0:C9 is the Organisational Unique Identifier (OUI) of a manufacturer. In this case, Intel Corporation (See here for explanation of the first six characters and its meaning).
The other six characters (14C829) represents the serial number assigned to the hardware (in this case, a router) by the manufacturer.
I wouldn't trust wikipedia.org as an authoritative source, because half the time, it's written by people who understand only half of the whole fact, and editted by those who knew less than these halves. You would be better off visiting official standard organisations like Institute of Electrical and Electronics Engineers if you have a query.
Comment: Try reading the question before answering.
Comment: @bigbadonk420: That's why I provided the link to the Institute of Electrical and Electronics Engineers website as an alternative so the OP can search for his/her answer when my answer is incorrect. :)


What is scrcpy OTG mode and how does it work?

Question: In scrcpy documentation an OTG mode is mentioned. How is that working without adb and what can we do with that?
Comment: @MorrisonChang so scrcpy emulates HID. one question remains, can we use it to mirror screen without usb-debugging? or even better, to enable usb-debugging? because on android devices adb with OTG afaik not possible at same time
Comment: I'm not sure if you commented on the right post, but Morrison Chang won't receive the notification from your comment on your own post.
Answer: Which version of scrcpy OTG mode supported
It appears that version 1.24 is when it became available, but the latest version of scrcpy is probably preferred.
From: https://github.com/Genymobile/scrcpy/issues/3654#issuecomment-1369369005
How does scrcpy OTG mode work
From: https://github.com/Genymobile/scrcpy/issues/3662#issuecomment-1374404072

Nope, HID events are generated on mouse events received by SDL from X11/Wayland/…

So a desktop environment is required for operation.
Additionally,
From: https://github.com/Genymobile/scrcpy/issues/4341#issuecomment-1754765403

Scrcpy uses HID over Android Open Accessory, so there's no way it can work on iPhone.

Some more details are in the HID-OTG docs:
https://github.com/Genymobile/scrcpy/blob/master/doc/hid-otg.md
Beware that Windows may require certain USB driver configurations
As called out in:
https://github.com/Genymobile/scrcpy/issues/3654#issuecomment-1369295011
and
https://github.com/Genymobile/scrcpy/issues/3654#issuecomment-1369372860
The summarized version is that you may need to uninstall other ODM usb drivers and install Google's USB driver package.
What about mirroring the display without developer mode?
Display mirroring requires developer mode to be enabled as scrcpy:

The application executes a server on the device. The client and the server communicate via a socket over an adb tunnel.
The server streams an H.264 video of the device screen. The client decodes the video frames and displays them.

From the authors blog post: https://blog.rom1v.com/2018/03/introducing-scrcpy/
Without developer mode enabled, the PC can't copy the video server binary to the Android device.
More details on the scrcpy developer page
So what does this mean for devices with broken screens?
If you can get the Android device to connect over USB (i.e. driver issues with Windows) you may be able to use scrcpy --otg to enter pin / enable developer mode. While you will have a better chance if it is just the screen capacitive touch sensors that are damaged so you can see what is being enabled, if the screen is completely broken, it is the same problem with plugging in a keyboard/mouse as you are blind to what is going on.
Comment: You can use OTG mode to enable ADB on the device but it seems like the phone does not recognize the PC at that time as ADB client, so the ADB authorization dialog does not show up (at least not in my tests).
Comment: @Robert Thanks for the feedback. I'm wondering if you are able to enable Bluetooth keyboard/mouse and using those get through the ADB authorization dialog.
Comment: In theory yes, but in reality even on a phone with fully working screen and touch it is a challenge to open the settings menu, go to Connected devices and start the pairing sequence.


Do you call salt, soy sauce, etc. "seasoning"?

Question: Could you tell me what you call salt, sugar, soy sauce, ketchup, miso, pepper and so on as a whole? Do you call them "seasoning"?
Comment: Related (but not a duplicate): [What do we call 'ketchup', 'cheesy dip' , 'oregano' and things like that collectively, as they aren't side dishes?](https://ell.stackexchange.com/q/42722/)
Answer: As Alan Sutherland said, "condiments" - "a substance, such as salt, that you add to food to improve its taste" is one word. Another one is "flavoring" - "something that is added to food or drink to give it a particular taste".
There's a subtle difference between the three words (seasoning, flavoring and condiments):

Seasoning - a loose definition of this term is: "a substance, such as salt, that you add to food to improve its taste". The seasoning is a flavor enhancer rather than a flavoring. So, basically, seasoning is not intended to actually change the flavor of a food, but simply to bring out the flavor or enhance it. Seasonings are generally added to food at the end of its cooking cycle and do not require heat for the full effect. This is what is meant by "check for seasoning".
Flavoring - It is an ingredient that significantly changes the flavor of a food or dish. Bacon, ham, sausages, alcohol, vegetables, fruits, sauces and spices are common flavoring ingredients. Flavoring ingredients are added at any time during cooking. The difference between seasoning and flavoring is the amount of the ingredient that is used.
Condiments - These are added to a dish to complement its flavor. Often they are prepared mixes such as mustard or soy sauce. Condiments are mostly edible food items which are additions to a dish or meal.

Condiments is an umbrella term which takes in such items as sauces, spreads, vinegars, flavoured and unflavoured oils, relishes and pickled items: some people broaden the term to include spice mixes, pepper and finishing salts. Some definitions include simple slices of vegetables such as tomato, cucumber, etc. (Source)

You may find this ELU question interesting - What is the subtle difference between condiment, seasoning and flavoring?
Answer: Seasoning is close, but we'd normally call them condiments

A condiment is a spice, sauce, or preparation that is added to food to
  impart a particular flavor, to enhance its flavor, or in some
  cultures, to complement the dish
  Wikipedia
Comment: I wouldn't call salt a condiment.
Comment: well wikipedia does... https://en.wikipedia.org/wiki/Condiment
Comment: Yeah, sorry my comment was too terse. I see that it's classified that way, but salt and pepper are seasonings to me and not what springs to mind as a "condiment" like ketchup. After thinking about it, I suppose if it's on the table to be added after cooking, it's a condiment and if it's added during cooking, it's a seasoning, so salt could be either depending on the context.
Comment: yeah totally agree, good way to define it. I wouldn't consider salt a condiment but that was the first word that sprung to mind for the question and when I checked wiki I was surprised to see salt categorised as one


What does this PNP transistor + OPAMP circuit does?

Question:
I can solve the circuit for given DC input voltage with transistors Ies and alfa values. It amplifies the input signal for like 13 times. (Not linearly). But i couldn't understand the purpose of this circuit. Could you help me with that? Thanks in advance
Comment: looks like a twist on the log amplifier using the PNP for the log conversion and a transimpedance amp
Answer: This is a standard textbook building block- an antilog amplifier. You'd normally have a diode from the emitter to ground to prevent the input from going too far negative and possibly damaging the transistor (by reverse B-E breakdown).
How it works:-
The transistor base-collector voltage is maintained at 0V by the op-amp through virtue of negative feedback.
Collector current is \$i_C = I_S e^{(\frac{V_{BE}}{V_T})}\$, so
\$Vo = -(100K) I_S e^{(\frac{V_{i}}{V_T})}\$
There is a temperature dependency, obviously in the thermal voltage \$V_T = kT/q\$, but also in the saturation current \$I_S\$, so practical antilog circuits use something like a thermistor to compensate for temperature variations.
Answer: It is an Antilog Amplifier.
The output voltage will be proportional to the antilog of input voltage.
Answer: The best way to understand and explain a circuit is to divide it into its constituent building blocks. Here we can think of this circuit as of a voltage-to-voltage converter (amplifier) consisting of two consecutively connected (cascaded) converters: an exponential voltage-to-current converter (the transistor) and a perfect current-to-voltage converter (the op-amp + resistor).


What is the intuation of path integral in QFT?

Question: It is known that the path integral in quantum mechanics means the summation of all probable classical trajectories between first and last measurement of the quantum state.
In QFT this formalism leads to generating function. Generating function can be changed to 1PI effective action, $\Gamma$, be Legendre Transformation, Which ends to
$ e^{i \Gamma} \propto \int D\phi e^{iS} $
Now, I have a problem with the classical interpretation of this equation. Does this equation have a same classical interpretation as classical trajectory?
Answer: You might know from Q.M. that momentum and energy are generators of space and time translation respectively:
$$e^{iP\delta x/\hbar}\psi(x,t)= \psi(x+\delta x,t)$$
$$e^{-iH\delta t/\hbar}\psi(x,t)=\psi(x, t+\delta t)$$
If you were to imagine a sin wave, the momentum operator would take you across the spatial extent of the the wave for a fixed time, while the Hamiltonian would fix your point in space and translate you to the value of the wave at different times.
The Lagrangian, however is a combination of these two generators such that you follow a fixed point on the wave. If you find a wave-peak at $(x,t)$, the Lagrangian as an operator will take you to the same peak at some other time and place $(x+\delta x, t+\delta t)$. The Lagrangian is the generator of paths.
A complication that arises is that generally $P$ and $H$ don't commute. However, for small $\delta x$ and $\delta t$:
$$e^{-iH\delta t/\hbar}e^{iP\delta x/\hbar}\approx e^{-iH\delta t/\hbar+iP\delta x/\hbar}=e^{i(P\delta x/{\delta t}-H)\delta t/\hbar}=e^{iL \delta t/\hbar}$$
Since this is only valid as an infitesimal generator, the trick of the path integral is to introduce a resolution of identity between every one of the above operators over the "states":
$$|x+\delta x, t+\delta t>$$


Kinetic Scrolling in Ubuntu

Question: I recently bought a Dell Precision 5530 with Ubuntu and noticed that the trackpad scrolling worked much better than on my Thinkpad 470, both running Ubuntu 18.04 (and now 18.10). Both use libinput but on the Dell kinetic/inertia scrolling works great. I realize that libinput doesn't implement kinetic scrolling by design, but somehow it works very well on Dell. When I install vanilla Ubuntu 18.xx on dell, touchpad works like crap; if I install their 16.04 image and then upgrade, touchpad works great.
There are a few other little things that work better with Dell's image, such as better fan control/power management, etc. I'm a bit of a Linux noob, so I'm trying to figure out where the magic sauce can be.
I would like to figure out how to get the touchpad working as well with stock image, and possibly replicate it on the Thinkpad as well. I'd appreciate if someone could point me in the direction I need to be looking at.
Thank you
Yuriy
Comment: For people like me who want to get their non-tech friends and family using Ubuntu, it's this kind of user-interface thing that really makes the difference. See also [this other touchpad weirdness](https://askubuntu.com/questions/1114738/mousepad-stuck-in-horizontal-scroll-box)
Comment: Well, I ended up returning the laptop after 2 weeks of fighting with random touchpad bugs, fan control, wake from sleep issues and randomly poor battery life. It's a shame though - the machine was really good and Linux actually fits what I do better. I really like the security and privacy, but a laptop is a vital tool for and I need it to "just work"
Comment: I agree. It's hard to convince people that Ubuntu is good if stuff like fan and touchpad don't just work out the box.
Answer: Probably the 16.04 is using the deprecated synaptics driver. This one have implemented kinetic scrolling. This link in particular has a link to this bugreport. TL;DR of which: kinetic scrolling being implemented in synaptics turned out to be a design error. It led to nasty bugs, such as that if you scrolled, and pressed Ctrl before scroll stopped, the app you're scrolling would trigger zoom-in or zoom-out. It's because kinetic scrolling is implemented by continuous sending of scrolling events, and the app have no way to differ real and fake scroll events.
Worse: the proper way to implement that is in GUI toolkits, i.e. GTK+ and Qt (and maybe EFL, though it's little known outside of Enlightement Desktop Environment), but if you have kinetic scrolling in driver + kinetic scrolling in toolkit — you can expect this to end up in mess.
GTK+ have implemented kinetic scrolling, e.g. it works for me in evince app, version 3.30 for evince, and 3.24 for GTK.
Qt I don't know. I found some blog-post saying that kinetic scrolling was implemented for everything in 2009, but I can't reproduce it in Okular, nor Qutebrowser, nor Kate, so it's definitely untrue.

Kinetic Scrolling in Ubuntu


How to enable checkbox by default checked in Custom Option?

Question: I am using magento 220.127.116.11 version. I have created custom option for product. I want to make checkbox by default checked. How can I implement this?
Answer: You can't do that using available default options. You have to write jQuery to set the input box as checked. Please find some hints below:
open app/design/frontend/base/default/template/catalog/product/view/options/type/select.phtml
and Copy this file to your theme folder and put below jQuery code at the end of this file
<code><script type="text/javascript">
    jQuery(".checkbox").prop( "checked", true );
</script>
</code>
You also need to add jQuery support in case its not already added. Additionally you can set input box checked only when your conditions match to set it as checked in jQuery.
Comment: @Priyank Yes, you are right. I mentioned him to copy this file to his theme folder :)
Comment: You should never edit in base files. I think you should modify the the file path to something like `app/design/frontend///template/catalog/product/view/options/type/select.phtml`
Comment: Oh yeah sorry miss that  part :p
Comment: @HimmatPaliwal - thank you so much it worked
Comment: @Aks: You are always welcome.. Keep helping other community members!


Telerik RadCalendar Internet Explorer error

Question: I'm using the Telerik RadCalendar control and when I try to navigate through a day (click in day in calendar) in the calendar i can't in IE. In Chrome and Firefox works ok but not in IE.
Any suggestions?
Thank you.
Answer: Which IE is that? What is your RadControls version? Does the problem occur with the latest?
Try their demos and see, if they work fine, compare your setup with the demo and find the difference: http://demos.telerik.com/aspnet-ajax/calendar/examples/overview/defaultcs.aspx.
Also, look for (and resolve) any JavaScript errors you may have.
If you are having the problem in a newer IE, it may be an error from your .NET 4 framework: http://blogs.telerik.com/aspnet-ajax/posts/13-12-19/how-to-get-your-asp.net-application-working-in-ie11.


Internal mic not working on Aspire One D255

Question: I can't get my internal mic to work with any app other than Sound Recorder. I've scoured the other posts on this topic and none seem to have an answer. I've installed Alsa Mixer, Pulse Audio controls, tried minimising one of the stereo channels but nothing works. The mic is not muted. There is no function key on the keyboard to mute the mic either. The only connector options are analogue mic or analgue input. Neither do anything.
Answer: Try this solution. Worked for me.
http://ubuntuforums.org/showpost.php?p=11385053&postcount=15
Comment: Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference.
Answer: I've same problem. My AOD255 sound stop working after skype installed. I'm using xubuntu 11.10 64bit, since skype using some i386 libraries, so I need to re-install oss-compat. Try this steps maybe work for you

remove xfce4-mixer

sudo apt-get remove xfce4-mixer

remove all alsa

sudo apt-get remove alsa*

restart your laptop

sudo reboot

re-install alsa-base, apmd, alsa-oss, oss-compat

sudo apt-get instal alsa-base apmd alsa-oss oss-compat

re-install xfce4-mixer

sudo apt-get install xfce4-mixer
Answer: I lost hours on this too.
In the end the best solution was to buy a relative cheap external soundcard with a jack input.
Comment: @Thomson Dawes. I think it does. My mic didn't work. After hours of reading & frustration the only solution was to buy external USB sound card with headphone output and mic input jack. The mic then worked through that. I can now use a microphone with my Ubuntu system.


do i add a number to alumiconn connectors when using for repair work of aluminum wiring

Question: I have three receptacles boxes with burnt aluminum wiring. I,m going to use three port alumiconn conectors to repair outlet and join copper pigtail with two aluminum wires. I will be using one for hot,one for neutral, and one for ground. What number do I assign each connector for box cubic fill. Hopefully electrical boxes will be big enough after adding all numbers for wires and receptacle and connectors. I have incoming romex, traveling romex to next box down line,receptacle and three alumiconn connectors.
Comment: Are these plastic or metal boxes? Are you OK with receptacle boxes that protrude from the wall?
Comment: they are fiber glass boxes I believe.  thanks for the idea of box extenders
Comment: Can you use CO-ALR receptacles?  Is there a reason you cannot?
Comment: Reason I ask is for the price of 9 Alumiconns, you could buy 3 CO-ALR receptacles *and an AFCI breaker*.  The real problem is arcing.  Improving wiring methods *helps* reduce arcing, but an AFCI stops it cold.
Answer: Splicing devices don't have a box fill allowance, even though they may be chunky!
NEC 314.16(B) does not include wire-splicing or wire-connecting devices in its calculations; however, your concern is not misplaced, as the AlumiConn is indeed a chunky critter compared to a regular wirenut.  Fortunately, I doubt most folks will complain if you whack a surface raceway extension (starter) box onto the existing receptacle box to provide extra space, though.  If you have metal boxes, you can also use a standard single gang extension box or mud ring, but nonmetallic box extensions do not appear to be able to be stood off from the underlying wall surface, which is unfortunate when box volume is the reason for the extension.


Does Raspberrypi 4 support boot from GPT partitioned disk?

Question: I'm interested if Raspberry pi 4 bootloader does support boot from GPT partitioned disk?
Answer: The boot partition MUST be the first partition on a MBR medium.
The root partition can be on another medium, which can be GPT, provided it is identified correctly (PARTUUID or device).
Comment: @PhilipCouling At the time this was posted  you could only boot from SD. Changes to the EEPROM have now made this possible. It is still impossible to boot from GPT, which was the question.
Comment: @PhilipCouling I have answered over 2000 questions on this site. Many are now obsolete. There are not enough hours in the day to revise every answer when the Foundation makes a change. It is enough effort to keep the tutorials up to date.
Comment: You've actually spend more time arguing with me than it would have taken to make the edit I suggested.  I'm not telling you off for not doing it sooner, just now we've had this conversation the usual etiquette is to update the answer to bring it into line.  I'd do it myself only SO guidelines say I shouldn't make edits that directly disagree with the original author's intent.
Comment: I have had no luck trying to boot from a GPT Drive. I am typically left with a drive with partition issues.  On firstboot the pi tries to resize /dev/sda2 and fails. This leaves the following error on /dev/sda2 in GParted: superblock checksum does not match the superblock.
to open /dev/sda2. Couldn't find valid filesystem superblock. I am most interested in a solution.  I can use a full GPT as a data drive without issue. I need to know more about correcting superblock issues.
Comment: This, as milliways has commented, is old (actually very old) information. It is possible, on current Pi4's, to boot off of GPT. A pain (I have a bash script) to create a GPT drive, but possible. I've done it. I'm sure many have also done it. (I'm answering as I can't comment - I don't have a "50 reputation" - so others don't get misled.)


vba insert validation list - error 1004 when worksheet locked?

Question: I have the following vba code which works fine; however, it doesn't work when I lock/protect my worksheet, even though I have unticked 'locked' for the relevant cells within the cell format options.
Why I am getting

error 1004 application defined or object defined error

when the worksheet is locked?
Private Sub Worksheet_Change(ByVal Target As Range)
    Application.ScreenUpdating = False
    Application.DisplayAlerts = False
    If Range("B10").Value <> "" Then
        Dim MyList(9) As String
        MyList(0) = "60 Days EOM"
        MyList(1) = "60 Days DOI"
        MyList(2) = "45 Days EOM"
        MyList(3) = "45 Days DOI"
        MyList(4) = "30 Days EOM"
        MyList(5) = "30 Days DOI"
        MyList(6) = "14 Days DOI"
        MyList(7) = "10 Days EOM"
        MyList(8) = "7 Days DOI"
        MyList(9) = "Immediate Payment"
        With Range("N38").Validation
            .Delete
            .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
                 Operator:=xlBetween, Formula1:=Join(MyList, ",")
        End With
        If Intersect(Target, Target.Worksheet.Range("N38")) Is Nothing Then
            Range("N38").Value = "60 Days EOM"
        End If
    Else
        Range("N38").Validation.Delete
        Range("N38").Value = ""
    End If
End Sub

Comment: the simplest solution would be to unlock the sheet @ the start of your code and lock it at the end.
Answer: The answer is that even though you unlocked the cells, Data Validation is still off limits.  You have to unprotect the sheet before you apply data validation.
Answer: I don't think you can set validation when protection is enabled.
What I do is remove protection at start of procedure and add it back in at the end, remembering error handling which should set the protection back on in the case of failure.
I often create a class which applies protection.
Say a class called cProtect
Option Explicit

Private Sub Class_Initialize()
    Sheet1.Unprotect
End Sub

Private Sub Class_Terminate()
    Sheet1.Protect
End Sub

And in my procedure I start with:
Dim protect as cProtect
Set protect = new cProtect

This causes the protection to be removed via the class initialize method, and then when the instance goes out of scope for any reason (procedure ends, errors), the terminate fires and protection gets applied back on it.


Why was Dark Theme created?

Question: Hello guys so I was wondering if there was a particular reason or study/research of why was Dark Theme created. What's the value for the user of having a Dark Theme UI?
Answer: Here are some positive benefits of dark mode.

Dark UI is said to reduce eye strain.
Dark backgrounds used in UI is said to consume less energy on OLED screens.
When using Dark UI in low light environments it could minimise others nearby from getting disturbed by the glare from your phone (e.g. aircrafts and movie theatres)
Comment: It consumes less energy only on OLED, MiniLED and MicroLED panels because their individual pixel brightness can differ. So for example a black image would leave the pixels off (OLED) or very dim (MiniLED and I think MicroLED).
Comment: point 3: not just others but the user as well, if in a dark room or not wanting to lose dark-adaptation (e.g. satnav)
Comment: There's little scientific evidence demonstrating the benefit of dark mode, as suggested by some of the other answers.
Comment: @aventurin have you seen much research in this area? Even if there aren't formal research, the fact that this is being implemented in many standard operating systems and web applications suggests that we should be looking to demonstrate the value of this feature and perhaps try to optimize it if it is not providing the benefit that people suggest it has.
Answer: What's the value for the user of having a Dark Theme UI?
There is not much value when it comes to user performance.

Great article talking users performing better not using dark mode
Dark mode isnt as helpful for eye strain as one might think

Benefits

Improved battery life on some screens
Throwing off less ambient light in low light settings (dark movie theater, hospital at night, soldier looking at watch at night)
Also, there may be longterm health perks such as avoiding myopia.
In Legge's study, each of the 7 participants with cloudy ocular media had better reading rates with dark modes. *from NG group article

Let's look at some misconceptions about dark mode performance.

Users make quicker decisions (lower bar) with light mode whether its during daytime or nighttime as per the NG Group research.
"In users with normal vision, light mode leads to better performance most of the time."
Although light mode was better for older adults, too, they did not benefit from it as much as younger adults, at least in the visual-acuity task.
Comment: +1 It seems like the jury is still out on exactly how beneficial the dark mode/theme is, but for the sake of accessibility and inclusive design there should probably at least be an option for the user to choose what 'feels' better for them. There has also been discussions about how the use of a 'light' grey compared to 'pure' white background can help reduce the glare on the screen when black text is used for better readability. I am interested in for research and questions in these topics :)
Answer: To add to Ameen Akbar's answer, Customization is another key benefit.
Allowing user's option to customize their products let's them feel in control and give them a sense of ownership of the product.
NN Group Article on Benefits of Customization
Answer: The question is really why was Light Theme ever created.  Computer screens are (mostly) emitted light, not reflected light. Throughout all of history, emitted light technologies used Dark Theme, most notably movies and signage. Think how annoying movie credits would be in Light Theme.  Initially computers used Dark Theme. Then someone decided that because most people were doing word processing, that the screen should look like a physical piece of paper, and bingo, Light Theme was born. Dark Theme is just a return to an appropriate form for emitted light technologies.
Comment: Interesting point.  Old computer terminals were a green 'dark theme', and 'light themes' only came with the introduction of the Apple Mac. https://superuser.com/questions/361297/what-colour-is-the-dark-green-on-old-fashioned-green-screen-computer-displays

Why was Dark Theme created?


How can I center a CSS background image as if the image had a different width (without cutting the bgimg off)?

Question: I'm attempting to add a bookmarklet to my wop website. The issue is that I would like to have the bookmarklet (highlighted in red in the picture below) centered as if it did not have the arrow sticking out the side. If I change the width of the bgimage in the css, to be the same as the below indented box thingies, it centers how I would like it to. But, it cuts off a bit of the arrow. So, my question is, how can I center the bookmarklet as if it had the width of the other indented box thingies.

bookmarklet CSS:
<code>#bookmarklet {
    background-image:url('images/bookmarklet.png');
    width:425px;
    height:175px;
    background-repeat: no-repeat;
    margin-left: auto;
    margin-right: auto;
    padding-bottom:8px;
}
</code>
I want the bookmarklet to be centered as if it were(without cutting out the side of the arrow):
<code>#resultbg {
    background-image:url('images/resultbg.png');
    width:404px;
    height:347px;
    background-repeat: no-repeat;
    margin-left: auto;
    margin-right: auto;
    padding-top:8px;
}
</code>
Any help is greatly appreciated!
Thank you(:
Comment: Sorry if not directly constructive but it's "you're"... "whenever **you are** on youtube...". Not programming but still a good thing to fix for a professional website :P
Comment: @Raeki OPPPPS!! Thanks for catching that!
Answer: measure the amount of pixels the arrow 'sticks out' from the box, divide it by two and make it your left margin
That's the first thing that came into my mind. However, you are using the left margin to center the image in the first place. Maybe have a container div, center this div with margin-left: auto and margin-right: auto, and then play with the margins of the image inside this div. That should work
Answer: Just add
<code>background-position:center;
</code>
To the background which should be centered
Answer: A few options:

Reduce the width of the image and pad the side with some blank space that way it wont get cut off.
Wrap the image in a div and set the width so the backgroung image is positioned as needed using some padding or margins.


Electrical systems in light aircraft

Question: How does the electrical system in a light aircraft such as a Zenith CH-750 or Cessna 150 work compared with electrical systems in larger aircraft? Are the system is different than the electrical system on a common car?  Do we need static electric discharge system?
Comment: This feels too broad to me. Asking about some aspect of the electrical system of a typical airplane of some type (say, "how is interference from static discharges prevented in a Cessna 150/152?") is almost certainly fine. Asking basically for a full description of the electrical system of "small, slow, light" aircraft (whatever exactly that means; in fairness, you do offer two specific examples which helps narrow that part down) is something that could probably require one or more books to answer properly; that makes it too broad.
Comment: "static electric discharge system" are just static wicks, having nothing to do with the electrical system except that they happen to be mounted on the same airplane.  Here's an example of one  https://www.aircraftspruce.com/catalog/elpages/esd1staticwick.php?clickkey=6974
Answer: Typically light normal category aircraft make use of either a 14 VDC or 28 VDC electrical systems powered primarily by an engine driven alternator. This provides power to one or more power bus bars which provide electrical power to the various aircraft systems requiring it.  Below is an example light aircraft electrical system from a Cessna 172S.

One notable deviation from automobile electrical systems is that the engine spark plugs receive electricity from a separate pair of magnetos which produce their power independent of the main electrical system for reasons of redundancy.
Comment: And dual spark plugs per cylinder.
Comment: Seems that there is two type voltage level in a small airplane, 12V and the 14volt. I do have to check that 14V as it it absolutely new for me. Or it just 12V plus 20% of it? Which it will give 14,4V that also common for heavy truck electrical system.
Comment: From the second drawing, I saw there written 12V. That's the only voltage indicator there. Seems the voltage is 12VDC. 12V is not 12V if we measure using voltmeter. It must be at range 12V+(12V*15% - 12V*20%) or 13.8V - 14.4V. Lower than that, is too low. Higher than that range can endanger the devive, especially a sensitive one.
Answer: Most light aircraft use 12vdc systems with belt driven alternators, like cars.  They generally use the same alternators and voltage regulators, sometimes identical to the auto version but just having a more stringent quality control process.
Some heavier light planes use 24vdc systems, which allows for smaller, lighter wiring, and a bit less sensitive to bad connections with the higher voltage.  More expensive to fix because the generators are dedicated aircraft units with no automotive equivalent.
For a homebuilt, you would just build a 12vdc system using automotive components, except for the battery, which has be be able to run upside down so it needs to be an aircraft one, although you could use an automotive gel cell battery.
Comment: Re "...but just having a more stringent quality control process": Or sometimes just having a higher price tag :-(
Comment: Well yes.  The story I was told long ago was that a Delco alternator on the "aircraft" production line simply went through inspections or functional tests on every unit instead of every 10th.  In the avionics industry, black boxes no longer use "milspec" electronic components like chips because they aren't manufactured any more.  It's now a "Mil Perf" (performance) standard that applies and manufacturers screen commercial hardware through a Mil Perf testing regimen and the ones that pass are considered fit for flight.
Comment: @johnk, what did you mean that the battery **has to be able** to run upside-down? What for? Even for non-acrobatic airplane?
Comment: Wet cell batteries have to be vented.  A normal airplane can experience 0 or negative G just from turbulence if it's bad enough, so aircraft batteries with vented cells have a check valve built into the cell caps.
Comment: @John K: And you think cars, or at least pickups driven on some of the dirt roads hereabouts, don't experience negative G?

Electrical systems in light aircraft


Stay / Steer clear of someone

Question: Imagine a time when a woman tells you "I'm trying to stay clear of you...", may it carry any positive kind of meaning? Or this sentence is just showing that the one saying this phrase is trying not to get close to you and has totally a negative meaning? Or in other words you are annoying...?
I'm asking this question to have a better idea of this phrase and what it really means.
Answer: From the way that you posted the question, the term can be generally assumed as negative. Or, I should say, the outcome is positive for one party and negative for the other.
For example:

You are creepy. So, I want to steer clear of you.
I am not feeling well. I don't want you to get sick, also. So, I want to steer clear of you.
I have a surprise for you. And, it's hard for me to keep a secret. So, I am going to steer clear of you until I am ready to reveal it.
You always smell like my favorite cookie, cologne, etc. So, I am going to steer clear of you.

If the outcome is negative for both, it should be pretty self-evident. If the outcome is positive for both, the statement will be said in an obviously facetious or playful manner.

Stay / Steer clear of someone


How to prevent unauthorized users from specific actions by assigning a role to them?

Question: I am developing a web application by Yii php framework. In this application, I uses Right module for the role management of it. I define some roles and assign proper operation and tasks to them. I did it via the Right module UI and finally when each user fill the registration form a proper role assign to it, So for logged in users everything is ok.
The problem is for Guest and unauthorized users. I set the default role in main.php configuration file only to 'Guest' and also set operations of 'Guest' role with Right module UI, but Guest users can do other not permitted actions!
How can I do it for Guest users?

Thanks in Advance
Answer: I suggest you used your own UserIdentity class ...
it's so simple !
Answer: You Can Do like this
array('allow',
            'actions'=>array('update'),
            'expression'=>Yii::app()->user->uType = 'mydefinedtype',
));

This can be set when the Login action done in useridentity.php
$this->setState('utype', $user->UTtype->typename);

Comment: Thanks, I know it, but I want to handle it with only rights configuration module with the minimum possible code. Same as other roles which work nicely in rights module without any line of code!


Transaction fails in pay pal sandbox account

Question: I have created a pay pal sandbox account via
https://developer.paypal.com
and the account has been created successfully. It automatically creates two account one for buyer and seller in accounts section. I tried to do some test with transactions as my ultimate goal was to get the postback(whether payment success/failure, products purchased) while one the way i planned to do some transaction with sand box account details .
So i went documentation tab at the top of pay after i logged in . Under left hand side "Use paypal with" selected "create button" and chosen "Build your paypal button" it redirects me to this link http://paypal.github.io/JavaScriptButtons/
From their i got an option of  "Customize & Preview" , a modal pops up gave the merchant email id(sandbox account) and then some fake product details(also checked sandbox checkbox). When i saved a pay pal button generates, when i clicked to took me to the payment section there i gave the credentials of sandbox account i got the error
Please make sure you have entered your email address correctly.
Please re-enter your PayPal password.
but i can able to login with these details in pay pal account.
Dont know whats wrong.
Thanks in advance.
Comment: Can i get some comments
Answer: After hours of survey in net, i found the solution for transaction to happen
Binded email should be confirmed to enable transactions.
Give the faciliataor one(firstname.lastname@example.com) as the amount receiver.
While paying give the seller account details(email@example.com).
And the main thing is that prefer US country while creating account.


Lightning Components on salesforce mobile app refresh issue

Question: I have an issue with Lightning components in Salesforce Mobile. I have an implementation where I launch a component from a quick action button on a record page (The component uses the record's data). However after finishing with the component, I want to run that same action on another record. When I do this, it takes me to the old instance of the component with the previous data entered and the exact previous state. Is there a way to avoid this? I have to refresh every time to avoid this and it is bad user experience.
Answer: Try firing the e.force:refreshView event after your data change occurs. This event will cause components on the page to refresh themselves, without causing a full page refresh and loading all of the framework code.
Comment: This doesn't work. I already tried. The issue is not the refresh, I am trying to load another instance of the same component. It is launched via quick action on the record.
Comment: My first thought is to clear out the properties on your quick action component after saving. That way the next time it runs it's "fresh" again. Can you verify if the record ID changes when you run the quick action for the next record?
Comment: There is no way to tell if it changes on mobile. I could try using alert but since relaunching thst component goes to the old one, it wouldn't even output the alert
Answer: Something to check: When you open the action from another record, does v.recordId change to the new record's value? If so you might be able to put a change handler on that attribute and use it to trigger a refresh.


Google protocol buffer for parsing Text and Binary protocol messages in network trace (PCAP)

Question: I want to parse  application layer protocols from network trace using Google protocol buffer and replay the trace (I am using  python). I need suggestions to automatically generate protocol message description (in .proto file) from a network trace.
Comment: How are you generating the network trace?
Comment: Network trace is generated through wireshark. Its in PCAP format.
Answer: So you want to reconstruct what .proto messages were being passed over the application-layer protocol?
This isn't as easy as it sounds.  First, .proto messages can't be sent raw over the wire, as the receiver needs to know how long they are.  They need to be encapsulated somehow, maybe in an HTTP POST or with a raw 4-byte size prepended.  I don't know what it would be for your application, but you'll need to deal with that.
Second, you can't reconstruct the full .proto from the messages alone.  You only get tag numbers and types, not names.  In addition, you will lose information about submessages - submessages and plain strings are encoded identically (you could probably tell which is which by eyeballing them, but I don't think you could do it automatically).  You also will never know about optional items that never got sent.  But you could parse the buffer without the proto and get some reasonable data (ints, repeated strings, and such).
Third, you need to reconstruct the application byte stream from the pcap log.  I'm not sure how to do that, but I suspect there are tools that would do that for you.


In rock drilling, how does the drill pipe in horizontal directional drilling withstand the immense force?

Question: Unlike vertical drills where the drill bit is weighted down by gravity, in horizontal drilling, the drill string is pushed into the rocks. How does the drill pipes not snap under the immense force, especially since the pipes can end up being curved?
Comment: When drilling through rock, the tunnel tends to be self supporting. Not the same with soft sand etc...
Answer: It's called engineering design. The drill steels are designed to withstand the forces required of them. This incorporates materials used, manufacturing techniques, the design of couplings, rigidity/flexibility of the drill steels & drilling method: rotary, percussion or a combination of the two, rotary-percussion.
Long holes drilled in rock, whether vertical or horizontal, are usually drilled by rotary drill rigs. Depending of the reason for drilling a hole, the type of drill bit used for such holes will be either a diamond drill bit or something like a tri-cone bit.
The diamond drill bit is used when rock samples need to be recovered. Tri-cone bits, or similar, are used when a hole need to be established for other reasons, such as an oil well.
With rotary drilling, the drill steel experiences torsional forces from the drill head and only needs sufficient compression force to keep the drill bit engaged with the rock face at the end of the hole. If there is too much compression the drill steel with bow which can lead to rubbing against the side of the hole and excessive wear of the drill string. With too little compression there will not be enough contact with the rock face and the advance rate will be low.
If drill strings do not have a good method for removal of the drill chips the drill bit and string will jam in the hole. This is why percussion and rotary-percussion drilling is not used to drill long holes, particularly horizontal holes or vertical down holes.
Answer: The drill is not really pushed in the horizontal section.  The drill pipe is not very unique, mostly high strength steel like 105 Ksi yield strength. The magic is the other equipment. Mud motors turn the drill bit , the drill string itself may not even rotate ( that reduces the fatigue loads) and the "measure while drilling" technology that tells where the bit is and where it is going. When I retired from an oil company , turbines were sometime used the turn the bit, apparently now it is all mud motors ( look it up in Wiki, etc.).The energy to cut the rock is supplied by the very high pressure mud pumped through the pipe. ... I was on the API committee that wrote the specs for drill pipe ; we pretty much wrote what the drillers wanted. The oil company hires a drilling contractor and he rents the drill pipe from a third party , so oil company metallurgists like me, seldom sees drill pipe problems. Drill pipe never has couplings , it has "rotary shouldered connections", also called integral joints. A larger diameter section with internal threads ( box) is welded to the drill pipe , male threads (pin) are cut at the other end. Often the string is "hard banded" where tungsten carbide is welded in bands to protect the string from wear against the steel well casing and the formation. Not a panacea as it may cut through the steel casing. The oil company must calculate the strength and size of the casing for each section of the well . The driller must calculate the curvature to be within limits for the particular drill pipe; Of coarse the driller and oil company need to work together; It would be embarrassing to find the drillers rig was not able to lift the required casing string.  This is a brief over-view of about 10 semesters hours of petroleum engineering school .


Groups, G finite group from order 2p, p>2 prime and N is normal subgroup with index p in G , prove G cyclic

Question: i think i proved this question, but my proof isnt really elegant.
i assumed by contraditcion that there isnt exist an element from order 2p. then all the elements from lagrange are from order 2 or p.
Let N be {e,x}
First i proved that there cant be another group from order 2, which implies that all the elements are from order p.
let $g_1$ be an element from order p.
then i looked at the $G/N={N,g_1N,g_1^2N....,g_1^{p-1}N}$ and proved that all this cosets are distinct coset.
Now because $g_1$ is from order p, we have another element g, which isnt belong to $<g_1>$ and  $N$ .
Now i proved that $gN$ isnt any of the coset that i mentiond above. so this is contratiction to the assumption that we have only p cosets.
I dont like this proof, seems to me not much elegant way to prove. Do you have another proof?
Comment: Your last step ``$gN$ is not any of these cosets'' seems wrong. For example, $g=g_1x$ is not in $\langle g_1\rangle$ or $N$ but $gN=G_1N$. I'll give an outline of a neater proof as an answer.
Comment: forgot to mention, proved that $N \subseteq Z(G)$
$gN=\{g,gx\}$ and $g1N=\{g_1,g_1x\}$ that means $g=g_1x$ which means $g^p=g_1^p*x^p$ which mean $e=x^p$ but p is odd, contradiction.
Answer: Since $N$ has index $p$, $G/N$ has order $p$ and is therefore cyclic. Let $gN$ generate $G/N$.
In particular $g^pN=(gN)^p=N$. Suppose $G$ is not cyclic, then the order of $g$ must be $p$ (why?).
Since $N$ is normal in $G$, $g^{-1}xg=x$ (you might be able to say this without justification, but it could do with a justification).
Therefore the order of $gx$ is $2p$ (why?), so $G$ is cyclic.
Comment: thanks much better proof, please look at the comment above, just to check if my proof was ok, it was too long and annoying to prove the way i did.
Comment: Your comment completes your proof. It all looks correct.


Typescript: Pass type into lib

Question: I have some piece of code, that generates a type from a json file and afterward performs some operations on it.
import data from './mydata.json'

type MyType = typeof data
....

This way I generate a type that very specifically fits the json, meaning the type will have the exact same keys as the json.
E.g. this json
{
  "a" : "text",
  "b" : {
    "c" : "more text"
  }
}

will create this type
{ a: string, b: { c: string } }

Since I use this piece of code across multiple projects, I'd like to extract it into a library.
Each project has a different json, though.
Is there any way for me to pass the json from the project into the library, so that if I import MyType from the library it will have the exact keys as the json?
Answer: I was able to solve my problem using module augmentation
So in my library I defined an empty interface and made the required functions use this interface
export interface MyInterface {}

export myFunction = (param: string): MyInterface => {
  ...
}

Within my projects I then override the interface with the type of my local JSON
import { myFunction } from 'my-lib'
import data from './mydata.json'

declare module 'my-lib' {
  type MyType = typeof data
  export interface MyInterface extends MyType {}
}

const myResult = myFunction('lol')

This way I can be sure that the functions within the lib operate using the type of my local JSON data.
So in the given example myResult will be of the type of the JSON.

Typescript: Pass type into lib