Measuring Current Using A Resistor?

Question: Sometimes in videos made by the YouTube creator ElectroBOOM the creator says he is using a 1 ohm series resistor to measure current. I looked it up and found some links to forums where people are saying that you can use a resistor rather than a DMM to measure current, but I can't find anything saying how to do this. Are they usimg the voltage drop across the resistor from a voltmeter or are they doing something else?
Comment: Yes, you measure the voltage drop across the resistor to determine the current.
Answer: Yes, you can use a resistor and voltage range on a multimeter (to measure the voltage across the resistor) and calculate I = V/R. That can be useful if you need to measure current outside of the range of your meter.
For example, if you need to measure 100A you could use an inexpensive 100A shunt and a multimeter on voltage setting. The meter might read 75mV for 100A (assuming a 75mV shunt), so on the 199.9mV range you can read with a resolution of 130mA up to +/-100A. In the case of shunts, the resistance (0.75m ohm) is not usually given, rather the voltage at the measuring terminals at full rated current is given.
In most cases you can assume the meter impedance does not affect the measurement (shunt) resistor, but not always.
For example if you need to measure 1nA and you just have an inexpensive handheld multimeter with 10M ohm input impedance on the +/-199.9mV range you can just use the meter on voltage range as a current meter. It will read 10.0mV for 1.00nA, giving you a resolution of 10pA.
Answer: I = V/R. If you know the value of R you can calculate the current by measuring the voltage.
This is the method used in a lot of automated current monitoring solutions, though the resistors are usually smaller (1 - 100 mOhms), and the voltage is amplified before being sampled by an ADC.
Answer: Many DMMs cannot measure current directly.  They all measure voltage, though.  The idea is you measure the voltage across the resistor and use Ohm's law to calculate the current (I=V/R).
Answer: Yes. The method is very effective in many cases, I use it all the time to get higher frequency current measurements with an oscilloscope rather than a meter. All you do is probe the potential across a known resistance and calculate the current with Ohms Law (V = I * R, or in this case I = V / R) You will still need a volt meter of some sort, and you will need to know the resistance between the two points you are probing. If you are probing a PCB for instance, you will need to be sure that if there are any resistances in parallel you take R for the equivalent resistance of that network. If you are just inserting a resistor as a current shunt after the fact you are fine!
Comment: Standard probes with DMMs require they be inserted in series with the circuit during current measurements. This can be inconvenient if the circuit is already soldered together.
Comment: Sometimes its easier to fit, sometimes its a cheaper option to get current measurements that change very quickly (thousands of times per second or more). its all a question of how precise you measurement needs to be from a certain perspective. Most DMM's use the same exact method to measure current anyway.
Comment: That makes sense, but what is the advantage of using this mothod over
using the current measuring function that most DMMs come with?
Answer: If you have only one DMM, and you want to measure several different things, then it's very inconvenient to measure current with it.
The method is to switch off the circuit, break the connection, insert the meter, switch it to amps, power up the circuit, and reverse all that again to get the meter out, ready to measure voltage elsewhere. Oh, did you remember to switch it back to volts before measuring the power supply voltage? Ooops! Just blown the fuse.
The alternative is to have a current shunt permanently wired into each conductor that you want to measure current. Leave the DMM on volts, and measure the voltage across the shunt resistor. Sure, there are some sums to do, which is why people tend to use 'easy' shunt values like 1ohm, or 100mohm. And the meter is still ready to measure volts elsewhere in the circuit.

Measuring Current Using A Resistor?


android language localization

Question: I properly set languages and folders for es, en, it and fr. Now I need to set values folder for catalan and I did it as "values-ca-rES". However, eclipse creates a file called strings.out.xml and generates an error. What I am missing? thank you
Answer: In Eclipse when you click icon Run then it will ran the file which you have selected in Package Explorer.

Just delete "strings.out.xml" and be assure you have clicked your Root Folder(Project Name) from Package Explorer while running the App.
You are Running Project with selection of String.xml like this

So just make your selection to the Root Folder(SimpleDemo  in my case).
Answer: *.out.xml files are automatically generated by Eclipse when someone tries to run an application through an XML file.
Make sure that you delete the generated out.xml files from project directory and run your app after choosing a .java file.
Answer: i have facing same issue
It is a bug in eclipse, you should run your application from the Java files instead of xml.
Just delete the .out file, and try running again.
Answer: This error comes when we run XML file.. delete the main.out. file (from left side). click on corresponding java file and run it.Now it will work properly.. Note: always run Java file.

android language localization


Are acids and bases always aqueous?

Question: I am tying to determine if an acid is a liquid or aqueous solution? Please can some one enlighten me?
Answer: There are varying definitions of"acid" (or "base") depending on solvent system; some do not involve water at all. For example, there are Brønsted–Lowry acids (proton donors) and Lewis acids (electron acceptors), though the Arrhenius definition is based on aqueous solutions dissociating into $\ce{H+}$ (acid) or $\ce{OH-}$ (base) ions.
Of course, many acids are not liquids, such as solid citric acid, which may be anhydrous or the monohdrate.

Are acids and bases always aqueous?


Is there an easy way to Mass Update Opportunity Close Dates?

Question: We have a lot of data that was added to Salesforce that has not been updated in 2 years. I have been tasked with organizing and validating the information in Salesforce. I need to mass update opportunities with realistic close dates. Tons of data. Is there an easy way to Mass Update Opportunity Close Dates?
Answer: If I am understanding it correctly what I would do is do a report in opportunity with the Opportunity ID, Opportunity names, and close dates.  Once you have that data I would use DataLoader to update the necessary records.
How much data do you have?  You can also use DataLoader to export the records you need.
Answer: Yes, The steps are simple and you have a few tools to choose from.

Export opportunities
Manually specify your Close Date(s) for each opportunity.
Re-import opportunities with updated Closed Date(s)

Exporting
You can use the Salesforce Data Loader to export your opportunities into a spreadsheet, or create a Salesforce report of opportunities which you can also export as a spreadsheet.
In either case, make sure your resulting spreadsheet includes the Opportunity ID column. You'll need it when you re-import back your updates.
Importing
Once again, you can use the Salesforce Data Loader with this, or you can use Salesforce's native Data Import Wizard in Setup | Import | Data Import Wizard.
In either case, just follow through the wizard to import your updated opportunities.


Haproxy log each frontend to different file with rsyslog

Question: I have many frontends in haproxy, I plan to log each frontend to different file, for example, frontend a to /var/log/a.log, b to /var/log/b.log, but haproxy's log facility must be one of the 24 standard syslog facilities, is possible to do this?
Answer: This should be doable using rsyslog filters. You can filter the messages based on frontend IP/port and then write these messages to a separate log file.


Difference between fallacies and biases

Question: What is the basic difference between biases, such as confirmation bias, anchoring bias, etc., and fallacies such as argumentum ad antiquitatem, argumentum ad hominem, argumentum ad ignorantiam, etc.? How exactly do they differ, and how are they related?
Comment: Biases are what we want to believe.  Fallacies are what this desire, often leads us to adopt.   Note, biases tend to push us into less obvious fallacies.  Ideologies tend to push us toward more overt fallacies.
Comment: @Dcleve So biases are the cause of fallacies
Comment: I think so.  We want to believe something, then we find a justification that supports our desire, and that is good enough for us in most cases.   We don't examine rationales we expect to be true, nearly as closely as we would if the justification were support for something we did NOT want to believe.  See Kahneman's Thinking Fast and Slow, which describes the role of System 2's rationality as mostly one of rationalizing what our system 1 concluded unconsciously.
Comment: Biases may cause fallacies, but don't necessarily. And fallacies may be caused by biases, but not necessarily.
Comment: @JD As for the so-called logical fallacies, most of these are not errors of logic, but the credibility of implicit premises.
Answer: A fallacy is flawed reasoning. For instance, if one concludes that a math proof is correct, not on the merits of the steps of the proof, but because a famous mathematician is providing it, the reasoning is clearly flawed by an appeal to authority. Famous mathematicians can and do make mistakes, and the nature of mathematical proof rests in the consistency of the logic from step to step.
A cognitive bias is systematic error-making in thinking. Let's say you are doing research, but after your PhD advisor looks at your sources, it becomes clear that you are drawing from one set of papers that supports your thesis, while there's an entire set of papers that refutes your thesis. It might be that your choice to do so is consistent with the fact that you routinely avoid any positions critical of your position. In some way, you are confirming your belief through a non-conscious selection of avoiding evidence avoiding disconfirmation.
Both bias and fallacies are types of errors, but a bias is a pattern of making a similar error, and fallacies are errors that apply to a given argument. In other words, fallacies are individual, logical errors in reason, whereas cognitive biases are consistent, psychological errors in thinking.
EDIT
To address claims in the comments: Biases might cause fallacies, but the important thing about biases is that they are systematic. Everybody makes mistakes errors in reason, but one who does consistently in the same way is biased, and it's important not to conflate the two. Think about lies, and pathological liars. Some people tell lies from time to time, but those who do so with zest, zeal, and compulsion are fundamentally different. And biases aren't what we want to believe, they are what we tend to believe erroneously. I personally have biases, but in a bid to improve my reason very much work hard because I don't want to believe error-riddled reasoning. Many people are comfortable with their biases, but many people work hard to overcome them precisely because they want to be closer to being free of errors.
Comment: Perhaps another way to say that is that a bias is a property of the reasoning agent, while a fallacy is a property of a particular argument.
Comment: @Bumble Absolutely concise and true.
Comment: @JD What about my second question . Is abductive reasoning a logical fallacy
Comment: @quanity Yeah, I eliminated that because if you're interested in in-depth answers, you're better off crafting and submitting another question. The short answer is most logicians accept CSPs general argument that we infer explanations about events, but imperfectly. As such, if one claims that one's process of determining an explanation is certain, then it's flawed in a formal, technical sense. Therefore, one way to understand it as an inductive argument about a cause or explanation. Then, strictly speaking, it needn't be certain.
Comment: Is it a fallacy? If you claiming that the abduction is deductively certain, yes. Otherwise, it is like a well-reasoned, best guess. Probably right, but possibly wrong. Then, whether or not it is a fallacy depends on the quality of the reasoning in the abduction.

Difference between fallacies and biases


Prevent application to go fullscreen

Question: I have an application (namely zoom) that automatically goes fullscreen and does not provides a way to disable that (you can exit fullscreen but you have to do that every time someone shares its screen). I wonder if there is a way to deny any application to go fullscreen or to make it think its fullscreen but fake it inside a window. I guess a VM would do the job but its a great cost for that.
I'm not looking for a zoom specific solution for now,hence this question.
I'm on manjaro with xfce.
Comment: You could try running it inside Xephyr and see what you get?
Answer: The solution using Xephyr suggested in comments worked. Its not perfect (no clipboard sharing so entering zoom meeting id and password by hand is painful) but the fullscreen remains inside the xephyr window and that's exactly what I wanted and the kind of hacky solutions linux can be counted on.
Comment: You could try and see if firejail can improve this: it supports Xephyr as backend and has options related to clipboard. https://wiki.archlinux.org/title/firejail#Firejail_with_Xorg

Prevent application to go fullscreen


Who approved the document?

Question: I have an approvals workflow set up with an email which is activated automatically when the document is pending review/approval.  Each document has a different approver; the approver's name is inserted in a field and the field is referred to as part of the workflow.  How do I get to see the name of the person who actually approved the document? This is really to test that the workflow is doing it's job and that there is no-one else interfering!
Answer: If you go to your workflow histories and you will see where the names against each task or each workflow are listed.

Who approved the document?


Keychain with muktzeh items (e.g. usb)

Question: This has been asked in the past with regard to a muktzeh key, and i was uncertain if it would be the same with something like a usb. If i have a keychain with a usb on it that i wear week round, come shabbos is it ok to wear it and only use the housekey? The usb is one of the flat variety, unobtrusive and plain black (although i doubt it matters).
Comment: Yehuda, Welcome to Judaism.SE, and thanks very much for bringing your question here! Please consider registering your account, so that the site can keep all of your contributions together regardless of where you log in from.
Comment: Also see: http://judaism.stackexchange.com/questions/5634/keychain-with-muktzeh
Answer: It seems that the USB should be a Kli Shemelachto Lissur, which would be forbidden to move unless you would be using it for a permisible purpose, or you need it's place (It may be also muktza machmas chisaron kis because people don't use usb key-chains for other purposes).
However, http://www.revach.net/halacha/tshuvos/Shevet-HaKehosi-Key-Rings-on-Shabbos/2185 says that the Shevet Hakehosi says that all keys on a keychain are a single unit, and one would be allowed to keep a muktza key on a keychain. Therefore, the law by a USB should be the same.
Comment: except that a usb dongle is not a key, it's something else completely unrelated. I believe a mukse key would be the key to your office
Comment: Nowadays, an extra item on a key chain might be in the category hasoren kis and perhaps more chosuv than the keys, for example a chipped key or a fob with a large replacement cost or inconvenience.  Even a simple USB might hold something that puts it in this category.  And anyway, it should be removed before shabbos, and for a bosis for permitted items and mukzeh in Shabbos, you should shake off the mukzeh if possible.  So, it seems not so simple.
Comment: See this, a USB "key", not entirely unrelated... https://www.amazon.com/JUANWE-Flash-Drive-Drives-Memory/dp/B01A0KON6Q/ref=sr_1_4?crid=20PVVZXVLAQ6E&keywords=usb+key&qid=1661714160&sprefix=usb+ke%2Caps%2C1003&sr=8-4
Answer: One of the ground rules of muktzeh is that if you have a container with both muktzeh and non-muktzeh items, the container itself is not muktzeh.
Some have the custom of lighting shabbat candles only on a table with other things on it (such as food or silverware) so that the table itself can be moved on shabbat if necessary.  See this halacha yomit for more sources.
Answer: It depends on the importance of the extra item on the key chain.   It is not true that in all cases it is nullified to the other items.
For example a fob for your car with a large replacement cost would be in the category hasoren kis, the strongest mukzeh there is.  And even a USB stick, though itself inexpensive, may enter this category if for example it is storing the only copy of important documents.
In any case, I believe most Rabbonim would say to have a separate key or at least separate it from the mukzeh before Shabbos.
If it comes up as an exigency in Shabbos, then if possible, it is best to ask your local Orthodox Rabbi about the specific situation.  Any position taken by any answer here is going to be general and theoretical, at best.  You have a specific case.
That said, and only for an exigency, for example in Shabbos someone discovers that they can't find their Shabbos key and this is the only one they have, and they are at home with no one to ask, and if it is an inexpensive usb stick of no special importance, then it might be correct that they could use the other keys for that instance.

Keychain with muktzeh items (e.g. usb)


Filter Synchronized Data coming into Marketing Cloud

Question: I am wondering if there is a way to filter data coming into marking cloud from Sales Cloud.  I ask because I do not want to import Accounts that dont have email address associated with them as these are taking up users in marketing cloud that I have to pay for but cant use.
Answer: On the last step of the synchronization of a Sales object, you can filter on one field.
Bear in mind that you can only filter on a checkbox field.
What we do is implement the logic behind in Sales by using a custom checkbox field, and use it as a filter for the synchronization.
Answer: Yes, but it's a bit limited.
Go to Contact Builder > Data Sources > Synchronised > open the SF configuration.
From there locate the object you want to limit and open it.
On left side of the menu you'll see the settings area for filtering out which records get synchronised. Click on Edit to make changes.
Answer: very useful. The filter criteria on our Marekting Cloud platform is greyed out, not able to use it. Any idea why is that?
Comment: Welcome to Salesforce Stack Exchange (SFSE).  Please see the various pertinent/relevant notes in [Why and how are some answers deleted?](https://salesforce.stackexchange.com/help/deleted-answers), and be aware that your "answer" will most likely be deleted.  Please contribute to SFSE in other ways so that you gain reputation - you only need 15 rep to upvote a question & only 50 to comment under someone else's question. Or you could possibly ask a [new question](https://salesforce.stackexchange.com/questions/ask), and in it you can link to this question or one of its answers for reference.
Comment: If you have a new question, please ask it by clicking the [Ask Question](https://salesforce.stackexchange.com/questions/ask) button. Include a link to this question if it helps provide context. - [From Review](/review/late-answers/174929)


how to represent Sparse Matrices

Question: I have been using Harwell Boeing format, also known as Compressed Column Strorage (CCS) in order to store Sparse Matrices.
Could you please suggest me some other way to store/represent sparse matrices?
Comment: Could you be more specific about what problem you are trying to solve, and why Compressed Column Storage isn't sufficient?  Otherwise: http://en.wikipedia.org/wiki/Sparse_matrix#Storing_a_sparse_matrix
Comment: This question isn't a good fit for this site.  Instead, you should narrow down the question to make specific about what your requirements or evaluation criteria are, and why you are looking for something different.  This site isn't a good place to ask for a list of all known ways of storing sparse matrices.  However, a question that says "I am looking for a sparse matrix representation with properties P, Q, and R; compressed column storage provides P but not Q or R" would be a much better fit.
Answer: As already indicated in the comments, the wikipedia article about Sparse matrix, Band matrix, and Skyline matrix cover the topic of the question quite well. Also, the computational science stackexchange site might be a better fit for such questions in general.
One might perhaps add that band matrices can't handle low rank modifications directly, so that one might want to use the Sherman–Morrison–Woodbury formula in this case. For the other representations, it is normally more beneficial to incorporate low rank modifications directly into the matrix via additional rows and columns, see below.

Some information about representations of Sparse matrices
A general Sparse matrix can be represented as a bipartite graph. This representation is useful for applying combinatorial algorithms like the Dulmage-Mendelsohn decomposition during preprocessing. In this case however, it is likely that you actually have a matrix pencil $A+\epsilon B$, which is important to know for the combinatorial algorithm, because this indicates which elements are expected to be small. A quick'n dirty fix is to apply the combinatorial algorithm to a related block Toeplitz matrix like $\begin{bmatrix}A\\B&A\end{bmatrix}$ or $\begin{bmatrix}A\\B&A\\&B&A\end{bmatrix}$ instead, but this is starting to get off-topic now.
If a "fixed" mapping between rows and columns is available, it makes sense to specify the symmetry type of the matrix as "general", "symmetric", "skew-symmetric" or, "Hermitian". If the symmetry type is more specialized than "general", then the matrix can be represented by a undirected graph, otherwise a directed graph can be used.
Note that these representations also apply to block-matrices (i.e. both the row indices and the column indices are partitioned into subsets), and encoding some a-priory information into such a block-structure can be a good idea both for speed and robustness.
I could also explain here how low rank modifications fit into such a general framework, but this section is already quite long. Often one can incorporate low rank modifications by just adding the corresponding row and column vectors as additional rows and columns with a small identity matrix between them. The advantage here is that the sparsity pattern of the original matrix is preserved.

how to represent Sparse Matrices


how to replace masked image in photoshop?

Question:
Image should be replaced without pasting image or grouping to the below as grouping remains the previous image.
Answer: To copy the mask (from the blue image) onto the layer with the green image:

Select the layer with the green image
Ctrl + Click on the mask from the blue layer
Click the Add Vector Mask icon at the bottom of the layers palette (that will create a mask that matches the first one.)
Hide or delete the layer with the blue image.
Answer:
Copy the green image to new layer.
Click and drag the mask from the blue image layer to the green image layer
Delete blue image layer.
Answer: I just did cntrl+click to select the image, the pressed delete.  I then copied my new image and pasted it into the layer where I did the delete.  Then I just had to drag and size it to taste. The mask remained as originally set.


Can I bind a weapon focus to my ally spirit?

Question: I'm wondering if i can have a weapon focus crafted and then spend the karma to have it bound to my ally spirit instead of me, so my ally spirit can use it instead of me. Can I?
Comment: Unless the ally spirit is dual-natured, they cant really bring it to the astral. They can use it when materialized, they can use it against other spirits, but once they return to the astral, there is no "physical body" behind where the actual weapon should be. So the weapon most likely will fall to the ground.
Comment: When a magician enters the astral plane, their physical body and every foci remains on his body, but being magical in nature, all foci's "auras" also go with him. This is true even when you go on astral quests.
Answer: SR5 Core pg. 318 "You can't use a focus unless you've bonded it to yourself (and you can't bond a focus unless you're Awakened)."
SR5 Core pg. 318 "While activated, a focus also has an astral form. If you use astral projection, you also carry the astral form of any active foci you have."
SR5 Core pg. 400 - Sapience - "Most sapient critters are mundane, but they are capable of Awakening and possessing a Magic attribute...and follow the same rules for magic as normal characters."
Street Grimoire pg. 201 - Step 3: Choose Powers - "Ally spirits start with... Sapience..."
Street Grimoire pg. 202 - Magic Skill Use - "Every ally spirit is considered a full Magician..."
The first quote indicates that you need to be Awakened. The third says if you're Sapient, you can be Awakened and use magic as a normal character. The fourth quote says Ally spirits are Sapient. The fifth quote reinforces (okay, flat out says) they are full Magicians.
Street Grimoire pg. 202 has a whole section on Enhancing An Ally. You'll have to rebind the spirit with a Ritual of Change, but you can add forms, powers, skills, spells and force. Ally spirits are full-up magicians, so there is no reason they cannot bond a focus if you're willing to pony up the Karma for them to do it.
The second quote up there is a little snag I can't find a way around. An astral projecting magician takes the astral form of an active focus with him. It goes on to say that if he deactivates the focus, he has to go back to it physically to reactivate it.
However, most ally spirits don't astrally project. They have one of three powers (SG pg. 201, again) - Inhabitation, Materialization, or Possession. The description of Materialization (SR5 pg. 398) is pretty clear that astral is the natural form, and the physical Materialization is created as-needed. Possession (SG pg. 197) is worded in a similar fashion.
Inhabitation (SG pg. 196) could be a True Form, which is no different from a normal spirit (it ends up with Materialization). Hybrid forms explicitly lose access to their Astral Form - I would take this to indicate that they cannot project either. Flesh forms result in spirits grounded in a body, but with the Dual-Natured property; it's a grey area whether they can astrally project. (As a long-time SR GM, I'd go with "No, you filthy bug spirit bastard.")
The point of all this is...
Yes, you can give an ally spirit a weapon focus... but they can't take it with them when they dematerialize. Don't leave it behind, because it serves as an astral link to the spirit, and by association to the magician.


lightning:recordEditForm - Set or modify field values onsubmit

Question: I have created a lightning component which allows the creation of a record in a custom object. I've used lightning:recordEditForm to capture the data, and to help the user it automatically populates some fields on the custom object in the background when they submit the form.
<lightning:recordEditForm objectApiName="Object__c" onsubmit="{!c.onRecordSubmit}" onsuccess="{!c.onRecordSuccess}">
    <lightning:inputField fieldName="Name" />
    <lightning:button variant="brand" label="Save" type="submit" />
</lightning:recordEditForm>

When the user clicks submit, my logic sets a field value in the background (Field__c in this case), and then on a successful save redirects to the new record.
onRecordSubmit: function(component, event, helper) {

    var eventFields = event.getParam("fields");
    eventFields["Field__c"] = "Test Value";
    event.setParam("fields", eventFields);
},
onRecordSuccess: function(component, event, helper) {
    //navigate to new record on successful save
    var navEvt = $A.get("e.force:navigateToSObject");
    navEvt.setParams({
        "recordId": event.getParam("response").id,
        "slideDevName": "detail"
    });
    navEvt.fire();
}

This was working fine until this week (I think today 19/07), when we noticed that the field values being set in javascript were no longer being persisted in the newly created record. Is this an issue with Salesforce?
Comment: What API version is the component using? Try changing it to 37 if possible and see if that resolves the issue
Comment: It's on v43 and has been since Summer 18 was released. It's not possible to save v37 as lightning:recordEditForm requires v41. Can I ask why you suggest this?
Comment: Ahh lightning locker service sometimes can have negative affects on older components if it is enabled i.e 38 and greater api.
Comment: What if you add `Field__c` in the markup but hide it with CSS... does that help? And if not, maybe you could manipulate the `value` attribute of that field directly.
Comment: Thanks for the input @CharlesT. As a workaround I can add the fields as hidden, replace the submit button with my own method which sets the field values, and then call submit() on the recordEditForm. Unfortunately this comes up against a new issue - it doesn't work for Picklist fields! Still don't get why it all worked until this week :(
Comment: I suppose another option is to use Lightning Data Service. A bit more script to write but you have more control over what happens.
Comment: @CharlesT That was my next fallback, but Stephen's answer below has solved it for me.
Answer: This is not the correct api for setting form values via javascript. It happened to work before, but that was not the supported api. The correct way to do this is this:
<lightning:recordEditForm
     aura:id="myform"
     objectApiName="Object__c"
     onsubmit="{!c.onRecordSubmit}"
     onsuccess="{!c.onRecordSuccess}">
  <lightning:inputField fieldName="Name" />
  <lightning:button variant="brand" label="Save" type="submit" />
</lightning:recordEditForm>

controller:
onRecordSubmit: function(component, event, helper) {
  event.preventDefault(); // stop form submission
  var eventFields = event.getParam("fields");
  eventFields["Field__c"] = "Test Value";
  component.find('myform').submit(eventFields);
},

Comment: I don't think this results in the onsuccess being called does it?
Comment: @Coova Yes, It does..check this..https://developer.salesforce.com/docs/component-library/bundle/lightning-record-edit-form/documentation


Why are the tops of mountains covered with snow, but not at the bottom?

Question: Why are the tops of mountains covered with snow, but not at the bottom? There is always snow even on high peaks in very hot areas. It has to be very cold at the top of the mountaintop so that the snow doesn't melt. But why are they so cold?
Answer: To answer the question in your title, it's because it really is much colder up there. It's colder up there because atmospheric pressure decreases as you increase altitude, which is a result of gravity.
Source
Answer: The effect cited by Arturo don Juan is called the adiabatic lapse rate in atmosphere and it is approximately $9.8 °C/km$  or $5.38 °F/1,000 ft$ (dry air). If the humidity of air is higher, then the lapse rate is lower.


When the site changes to use `www` does the XML sitemap need to be resubmitted via Google Search Console?

Question: My website's sitemap was previously submitted to Google Search Console without www. Now I asked the domain provider to change my domain URL include www. Do I need to resubmit the website URL in my Google Search Console account with www.?
Comment: But why do you even care about www?  Why not redirect people to the non www URL?
Answer: You actually need to re-authenticate your new www site. www is a subdomain, and unless your registered a domain with all it's subdomains to Google Search Console, you need to register every subdomain. Since you need open a new asset in Google Search Console, you will also need to resubmit your sitemap.xml
Thanks to the comment from Stephen, I am adding a screenshot:

Stephen is correct, if you have verified a domain property, you are good to go. If you have verified a single url property, you might need to verify the www property.
Comment: Authentication usually works for both www, and no-www.   I've never had to upload different verification files for the two of those.   I think you might mean that they should add a separate property with www.  Unless of course they already have multiple properties or have verified a domain property.
Comment: Thanks for noting, I edited my answer.


Is manual, faster than automatic, duplex printing?

Question: I'm guessing yes? Automatic duplex flips while it prints every page, but manual duplex can keep printing pages and requires only one manual turnover of pages.
Comment: Be aware, for laser/wax printers - if the printer is *not* duplex capable, there is a high probability damage the fuser will occur by printing the same piece of paper more than once. Fuser's aren't cheap.
Comment: Greek... in 40 years I've *never* seen a printer, *any printer* advertised as "manual duplex". That's ridiculous to me. In fact it's really borderline "deceptive" in my opinion. Imagine marketing a garden hose as a "Manual Car Wash" or a match as a "Manual Flashlight" or an oven as a "Manual Microwave". I don't know who Mr. Hardwick is but simply because he wrote that on *his* website, that doesn't make it true. If you can provide another, credible source for a printer marketed as "manual duplex" then I'll recant. But to the best of my knowledge, such marketing does not exist.
Comment: @Scott '*not* duplex capable': do you mean Automatic or Manual Duplex?
Comment: As I commented on SU, my printer can flip a page as fast as it can pull a new one.
Comment: There's no printer marketed as "manual duplex". If the printer can not directly duplex, then it is not duplex capable. In other words, if it wont' flip the sheet and print it twice itself.
Comment: @Scott Please see the last para. at http://duramecho.com/ComputerInformation/HowToDoTwoSidedPrinting/index.html.
Answer: Afraid that there is no simple and clear explanation for duplex printing. The best way is buying a duplex printer. However, the printer companies always wanted customers to pay more money to buy a more expensive duplex printer. It's a pain for me, too. I can provide you some tips to avoid the problem of manual duplex print.

Make sure the document arrange with numbers correctly and maintain the blank page if necessary.
Preview the "each paper of front and back".
Print Odd pages (forward) and then print even pages (Reverse).

(I am not a native English user. I will appreciate if someone correct my English.)


How fast can this guy safely fly?

Question: I have a character that has powerful psychic abilites, these enable him to, among otherthings fly at high speeds and create transparent forcefields. However since these force fields are transparent, that creates some potential vulnerabilities.
When he flies at a high speed this will cause compressive heating in the air in front of him, if he flies fast enough, this will cause the air to get hot enough to start glowing and emitting infrared and visible radiation. That is a potential hazard and a limiting factor to have fast he can fly.
So how fast can this safely guy fly, and how can he improve this limit, other then flying higher up.
Comment: Depends....is he an African or European swallow?????
Comment: The answer will depend upon how far his forcefield keeps the heat source from his body. The question does not tell us that distance.
Comment: No more then a meter.
Comment: If you ask engineers, up to Mach 1. If you ask full time OSHA people how fast he can safely fly, the number will be .... smaller.
Comment: You can change the forcefield rules to make him fly as fast as you want.
Comment: Can he affect airflow *inside* the forecefield? A convective cooling breeze could counter the radiated heat from 1m away striking his exposed surface.
Comment: @user535733 No, it will hardly be affected by distance at all. For the purposes of radiative heat transfer a 2000K plasma spanning 180° 1m away will behave exactly the same as a 2000K plasma spanning 180° 1000m away. Twice as far in this case also means twice as big. The irradiance is exactly the same either way.
Answer: If you are subsonic, you should be fine. If you are supersonic what you can calculate is the stagnation temperature and if you are going at about 3 times the speed of sound that would be about 400 C.  The formula for stagnation temperature is the temperature of the incoming air plus 1/2 the velocity squared divided by the heat capacity of the air at constant pressure. At 400 C you will emit in the infrared but you won't see a strong glow.
It might be interesting to think about the sonic boom or shock waves when your character goes supersonic. That might create a visible and audible signature. Also the force field might act as an airfoil, or create turbulence behind it.  The shape of the airfoil would determine the lift and also probably the reaction time needed to control the flight. Turbulence might impact other aircraft.
Comment: What about breathing? I suspect some serious problem with managing the airflow
Comment: @L.Dutch Presumably, he's dragging the air inside his forcefield along with him, so he'd be able to continue breathing just fine until he starts running out of air inside it.
Comment: Shaped forcefield was going to be my suggestion.  A long tapered and very pointy forcefield.  So long that would be saggy if it were made of any substance other than pure force.
Comment: He's well into supersonic speeds.
Comment: @Nick012000 That's correct.
Answer: You could also alter the shape of force field itself. Probably something like below. You may have a bright spot at the tip,but nothing that will block wider forward visibility, though I'm not sure about side curves.
This shape is just a guess based off my knowledge. It may or may not actually work. and you may need to alter exact geometry to make it efficient, and good looking.

Or you can go an easier route and copy design & geometry of a fighter jet, as far i know they don't suffer from heated air blocking their vision.
Comment: He can fly much faster then a fighter jet.
Answer: Just make your transparent forcefield be only transparent for visible light.
I.e. your forcefield allows just visible spectrum of electromagnetic radiation (380-750nm) to pass, and blocks all other wavelenghts of electromagnetic radiation. It also acts as Thermal Protection System - it's good enough for reentering spacecraft, it is good enough for your character.
(note: humanity current level of TPS technology uses mostly ablative materials for thermal protection at supersonic speeds, but in theory forcefield could be doing that)
Update: The exact limits would depend on the nature of your forcefield - i.e. what exactly does it shield against ? Convection? Conduction? Thermal radiation? None of the above? (not much of a forcefield, then).
That are probably your main concerns at reasonable speeds (like being able to overtake fighter jets -- it is all another issue if you envision him going at, say, near-relativistic speeds).
Even if your forcefield does not block radiation (but only conduction and convection), note that radiation becomes dominant factor only far above hypersonic speeds (at about 12km/s / cca. mach 35). (It likely needs expensive supercomputing to simulate the radiation emitted, so it is unlikely you'd get detailed information on that. Not that nobody could tell if the shield is transparent when it is engulfed in a ball of superheated non-transparent plasma)
Also, how much does it have to follow real physics? It seems your guy has ability to pull vast amounts of energy (for forcefield, and his flying at high speeds) out of thin air, so he might conveniently also create temporary vacuum in his flight path so he is not worried at all those plasma-creating issues or other ideas. His forcefield would need to contain breathable air anyway, so that would limit the length of his flight (unless he also has ability to put more oxygen inside bubble or regenerate $CO_2$ to $O_2$).
So I'd say your guy (with good enough forcefield) could do mostly anything you want him to do, when he is put against current level of civilization (You need to do some handwaving anyway to explain sidestepping first law of thermodynamics which grants him all that energy).
He would certainly fare much better than that Santa Claus guy under similar conditions.
Additional problems of interest: he would need to accelerate and decelerate (and change direction) relatively slowly in order not to be put under excessive g-forces (unless he also has some kind of adequate inertial dampeners), and (if going fast enough) the superheated plasma would likely wreak havoc on his destination when he finally arrives there (unless he sheds it on the way somehow).
Comment: 1. If he flies fast enough, He'll produce a lot of visible light, 2. His forcefield blocking infrared light isn't something that I'm sure that I want/
Comment: @blademan9999 radiation is likely not an issue at lower hypersonic speeds (conduction is). I've updated the answer with more details (and possible problems)
Comment: His telekinesis can apply evenly oover his entire body, and he can simply slow down when he gets near to his target. Conduction is not a problem for him and Convection definitely isn't, it's radiation that's the problem. I don't think he can create temporary vacuum in his flight path.

How fast can this guy safely fly?


Saving all nested form objects in one go

Question: I'm trying to build two forms, nested. But all the resources I've found so far deal with how to save the main object, maybe add or remove nested objects, but not saving the entire list elsewhere with the values of the form. Is there a way to do this?
Here're the model I'm working with. I'm trying to create a pc configurator which will allow you to choose different components and quantities, and then you would add to the basket.
So I'm working with three models. Configuration, Configoption, Item.
-- Configuration model
  has_many :configoptions

-- Configoption model
  belongs_to :configuration
  has_many :items

  def range
    a = []
    b = self.quantity_rng.scan(/\w/)
    b.each do |p|
      a << p.to_i
    end
    return a
  end

-- Item model
  belongs_to :configoption
  scope :sorted, order('items.position ASC')

The idea is that every configuration has a set of options, say 5. For each of these 5 options there could be a number of available items. For example option 1 is the processor, 2 could be RAM and so on.
-- Configuration controller
  def list
    @configurations = Configuration.find(:all)
  end

  def show
    @configuration = Configuration.find(params[:id])
    @options = @configuration.configoptions
  end

-- configuration/show view

    Elements
    Quantity

    <%= form_for(:configuration, :remote => true)  do |p| %>
        <% @options.each do |option| %>

        <%= form_for(:option, :remote => true)  do |f| %>
            <% if option.items.count > 1 %>
            <th id="<%= option.name %>"> <%= f.select option.name, options_from_collection_for_select(option.items.sorted, 'id', 'name')%>
            <% else%>
            <th id="<%= option.name %>"> <%= f.label(option.items[0].name) %>
            <% end %>
            <% if option.quantity_rng == nil  %>
            <th id="<%= option.name + "_qty" %>"> <%= f.label(option.quantity) %>
            <% else%>
            <th id="<%= option.name %>"> <%= f.select option.name, option.range, :selected => option.quantity%>
            <% end %>
        <% end %>
        <% end %>

    <% end %>

So far things are actually good, I can give different items to the options and the .range method let's me say quantity_rng in an option "1,2,3" and will make it into the array [1,2,3] passed for a drop-down if needed.
But now comes the crucial part, actually adding what I selected to the basket. How do I capture what the user has manipulated in the drop downs and store it (not as changes to the configoptions themselves, but as a new object elsewhere?)
BTW I'm using remote => true, because I intend to put some validation rules from jQuery later on, but one step at a time ;)
Thanks a lot!
Answer: May be i dint understand well your idea but i thing you need to use p.fields_for as nested options. Look at http://apidock.com/rails/v3.0.0/ActionView/Helpers/FormHelper/fields_for and dot forget to define
def address_attributes=(attributes)
  # Process the attributes hash
end

in your model Configuration


Are points on the complex plane sufficient to solve every solvable equation composed of the hyperoperators, their inverses, and complex numbers?

Question: Some background: I'm programming a maths environment. I'm computer science, so please excuse any probable ignorance and lack of precision in my question.
It seems $i$ and complex numbers were "invented" out of necessity to solve equations like
$$ x^2 = -1$$
As far as I can tell, the imaginary units present in the split-complex numbers, quaternions and other number systems don't have that property. They weren't invented out of necessity to solve a previously expressible equation. They were truly "invented" for such conveniences as being able to express multiple dimensions in one number and easy rotations.
Is this correct?
If I take the sequence of hyperoperations – $\{a+b,ab,a^b,\dots\}$ – and their inverses – $\{x-b,{x\over b},\dots\}$ – and form equations with them and the complex numbers what, if any, non-complex numbers can be generated?
In my aforementioned maths environment, I plan to implement every number as a pair of real numbers $(a, b)$ representing $a+bi$ – i.e. every number is a point on the complex plane. Besides issues with representing each of $a$ and $b$ with sufficient numerical precision and accuracy, is this sufficient to represent a solution to every equation composed of the hyperoperators, their inverses and complex numbers, that is known to have at least one solution? Is it sufficient to represent every solution to every equation composed of the same, that is known to have at least one solution?
I allow $n$-tuples and simple user defined functions in this environment. Are these, in combination with complex numbers or not, sufficient to implement all of split-complex numbers, quaternions, split-biquaternions, coquaternions, octonions, spacetime algebra, etc?
Let me know if there's anything that requires clarification.
Answer: Let me try to give at least a partial answer since there hasn't been an answer since 3 years.

If I take the sequence of hyperoperations (...) and form equations with them and the complex numbers what, if any, non-complex numbers can be generated?

In a previous question I came to the conclusion that very likely the opposite hasn't been proven. So it seems we can call that an open research question.
To construct the complex numbers from hyperoperations, I think, you will either need to add some concept of convergence to your code or simply be contented with less than perfect precision.


Social Security Number SSN for Non Americans

Question: I live in India, but few universities are demanding SSN,Can SSN be given to those people also who are trying to go to study in USA? I have never travelled to USA so far.
Comment: Be aware **many** US organization (schools, doctors, dentists, etc) will *ask* for an SSN expecting you to provide it without a second thought. However, the reality is **very few** *actually need* the SSN. To prevent identity theft, it is wise to *not* disclose an SSN to *anyone* other than a government office (IRS, DMV, Police, etc). I would press the school as to **why** they needed an SSN.
Answer: You generally do not need a social security number to register for school in the United States.  Call the school and tell them you do not have one, and find out if they require them for international students.
You may choose to get one if you intend to work in the United States and are authorized to do so.
See https://www.ssa.gov/pubs/EN-05-10096.pdf


End game mercenary equipment?

Question: I would like to know how to get the 'ULTIMATE' Great-Sword for the mercenary in Fantasy Life, I am a Legend level and I don't know what other lives I need to master to unlock the sword. Any advice? Which lives do I need to master?
Answer: In order to get the Crescent Blade (the highest attack greatsword in the non-DLC Fantasy Life) you must master the Mercenary, Angler, and Tailor classes, then pay a visit to the pirate ship that you met with Olivia in. When you enter the captain's quarters, you will see a treasure chest off to your left. After you have mastered the aforementioned classes the chest will be open-able and within it you will find the Crescent Blade along with the Buccaneer's Hat, Buccaneer's Coat, Buccaneer's Bottoms, Buccaneer's Boots.
Source: Personal play tagged with The Fantasy Life Wiki for specifics and links.
Comment: Oh and if you haven't gotten it already, I suggest going to the king during the day to get your Mercenary outfit as well.

End game mercenary equipment?


Is one-time-pad still secure if the number of 1's in the key is revealed to the attacker?

Question: For example, if $m = 10011$, $k = 11001$, $n=3$ (which is the number of 1's in k), $c = m \oplus k = 01010$. If $c$ and $n$ are revealed to the attacker, is this scheme still secure?
Comment: Hint: what if you are given that $n = 1$? $n = 2$? How many keys does that rule out, and how many are left? (are they equiprobable?)
Comment: Heh, what about $n = 0$ :) If an attacker gains more knowledge about $k$ *any* cipher will be less secure, including OTP.
Comment: You definitely loose the information theoretic security. How bad it is depends on your $n$: In a bitstring of length $2x$ and hamming weight $x$, there are ${{2x}\choose{x}} \approx \frac{4^x}{\sqrt{\pi n}}$possibilities, which differs from the full $2^{2x}$ only by the denominator. However, the lower or higher values can give a lot of information about the key.
Answer: The security notion one usually considers for OTP is perfect secrecy, which informally means that the ciphertext does not reveal any information about the original message, regardless of the computational power of the adversary. It is already known that this requires that the key size must be equal to the plaintext size and that all keys are equiprobable. That way, for each ciphertext you could find a key that decrypts the ciphertext to any possible message.
However, your proposal violates these principles. Assuming the key size (and plaintext size) is $S$, then the number of possible keys is not $2^S$ (i.e., all the possible keys of length $S$, as in the regular OTP), but $\binom{S}{n}$, which is much less than $2^S$. This has the consequence that for a given message $m$, not all possible ciphertexts are equiprobable, or conversely, for a given ciphertext not all possible messages are equiprobable (in fact, some of them have no probability).
Let's see it with your example. With regular OTP, for a length of 5 bits there are $2^5 = 32$ possible keys (as well as messages and ciphertexts). If an adversary gets $c$, there are 32 possible messages that correspond to that ciphertext. That is, the ciphertext is completely useless to the adversary. Now, in your proposal, for $n = 3$ there are $\binom{5}{3} = 10$ possible messages for a given ciphertext, since there are only 10 possible keys. The ciphertext $c$ and knowledge of $n$ makes possible to the adversary to deduce which 10 messages (out of the 32 possible) are related to the ciphertext. Therefore, he is gaining some knowledge about the original message.
Comment: @JanLeo Sorry, that doesn't make any sense. The key should be of equal size than the ciphertext, therefore, $|k| = |c|$. And what is $r$?
Comment: @cygnusy  Sorry, that is a mistake. I mean  if $|c|=256$ and $|n|=128$, then $|k|=\binom{|c|}{|n|}>2^{128}$. Is it computationally secure? Why key space should be of equal size to the ciphertext space? I don't need perfect security. If the key space is super-polynomial, then it is computationally-secure, isn't it?
Comment: @JanLeo, I recommend you check out [Dirk Rijmenants's One-Time-Pad page](http://users.telenet.be/d.rijmenants/en/onetimepad.htm#fyw4).  In short, re-use of any key, especially within the same message, compromises those parts of the messages where that part of the key was used.  Also, knowing how many binary 1's exist in a given key is HUGE.  It simply renders your key easily breakable (just a matter of computational budget).  This scenario is even worse than the former as the whole message can be deciphered, not just the parts where the key use was doubled.


Shirk by thought

Question: I keep having thoughts and saying In Jesus we pray , Amen, In my head. I Say Astaghfirullah repeatedly and say the Shahada as well. I keep thinking about it because it stresses me out which bring the thoughts to my mind. Am I committing shirk?
Comment: https://sunnah.com/bukhari:6664
Answer: Alsalam alikum brother/sister. Inshallah don't worry the prophet [pbuh] said

"Allah forgives my followers those (evil deeds) their souls may whisper or suggest to them as long as they do not act (on it) or speak."
Source

So the things that we have in our mind as long as we don't act upon it inshallah it is no problem I would just recommend that you pray for shelter from Shaitan by Allah [swt]

Shirk by thought


How Can I Collect Pool Operator Submit APIs?

Question: Submit apis are possible given the current state of the chain, however, where can I go to verify that a submit API is genuine? The ideal solution would be a way to check stake pools for the API that can be automated.
Comment: Sorry, what do you mean by "submit API"? Do you mean the transaction submission API? If so. I can't think of any way to verify that they are genuine. Worst case, for a non-genuine one, is that your transaction will not be submitted. The person running the transaction submission API cannot steal your funds because they do not have the private key that signed the transaction.
Answer: Unfortunately, there's no such way to do that.
Anyone running cardano-node can also run cardano-submit-api and expose it for you to send transactions. This means that not only SPOs can do it, so I guess it is not possible to verify if the service is legit or not.


GWT exporter cast exception from GWT.create; Tried to use mvp4g with GWT-Exporter but GWT.create didn't work

Question: I tried to use GWT-Exporter and it worked just fine when I copied the example. Then I tried to export an mvp4g Presenter
Here's what I did:
@Export()
@Presenter(view = RegisterPluginDisplay.class)
public class RegisterPluginPresenterImpl extends BasePresenter<RegisterPluginView, MyBus implements RootPresenter { ... }

public interface RegisterPluginPresenter extends Exportable { ... }

//then in the start event I said:
ExporterUtil.exportAll();

It gave me this error:
Uncaught java.lang.AssertionErrorcom_mvp4g_client_Mvp4gModuleImpl_com_mvp4g_client_Mvp4gModuleGinjector_com_mvp4g_client_Mvp4gModule…:62 get_Key$type$com$joseph$draw4$client$presenter$RegisterPluginPresenterImpl$_annotation$$none$$_0_g$com_mvp4g_client_Mvp4gModuleImpl_com_mvp4g_client_Mvp4gModuleGinjectorImpl.java:34 getcom_joseph_draw4_client_presenter_RegisterPluginPresenterImpl_0_g$Mvp4gModuleImpl.java:101 createAndStartModule_0_g$Mvp4gEntryPoint.java:35 onModuleLoad_5_g$com_00046joseph_00046draw4_00046Draw4JUnit__EntryMethodHolder.java:3 init_2_g$ModuleUtils.java:44 initializeModules_0_g$Impl.java:247 apply_0_g$Impl.java:306 entry0_0_g$Impl.java:72 (anonymous function)ModuleUtils.java:55 gwtOnLoad_0_g$Map.java:29 (anonymous function)

I looked at the code and found that GWT.create() was unsucessful in creating the presenter. I tried to create an exported class and then using GWT.create on it and found that I can't use GWT.create with any class that implements Exportable even if I don't do ExporterUtils.exportAll().
The documentation for the Exportable interface says that the GWT.create() statement returns an Exportable. That explains the class cast exception. So how do I fix this?
Answer: mvp4g uses GIN to create instances of presenters. GIN uses GWT.create(YourPresenter.class) to create an instance of the class.
As long as you don't have any deferred binding rule related to YourPresenter class GWT.create will behave like a new in Java.
In cases you are marking anything with the Exporter interface, the GWT Exporter Generator will be triggered. The generator create the exporter implementation which can not be used with mvp4g.
Comment: Why are you using GWT-Exporter?
Comment: I'm using GWT but my Ui programmers wants to do the Ui in javaScript. See this question for details on that situation: http://stackoverflow.com/questions/28139757/whats-the-best-way-to-have-a-gwt-presenter-with-a-javascript-view
Answer: I switched to using the experimental js interop and still got the same problem. Mvp4g uses gin to get the Presenter. According to the gin wiki
"if GIN can't find a binding for a class, it falls back to calling GWT.create() on that class" in order to instantiate it. It can't use GWT.create on an Exportable because GWT.create(an Exportable) returns an Exporter. Like the documentation says you have to  bind the class for it to not use GWT.create. The solution is to add a binding for the class. I just had to go in the configure method of my GinModule and add this line of code:
bind(MyPresenter.class).toProvider(MyPresenterProvider.class);

Then I had to create the MyPresenterProvider class:
public static class MyPresenterProvider.class implements Provider<MyPresenter> {
      @Override
    public MyPresenter get() {
        return new MyPresenter();
    }


Why don't all perseid meteors follow the same trajectory?

Question: Since these bits of debris crossing Earth's orbit have the same relative speed, why aren't they drawing parallel paths in the upper atmosphere? (consider one hour of observation to minimise Earth's rotation influence)
Answer: They are all following parallel paths. They are not on exactly the same trajectory but they are all travelling parallel to each to other in their orbit around the sun, in a stream of particles.
What you see is then multiple meteors on parallel paths. When you look in the direction that the meteors are coming from you see them appearing to radiate from a point
These meteors are all travelling parallel to each other. It is only perspective that makes them appear to be radiating from a point.

This is similar to the "flying through space" screensaver that used to be popular on windows.
Answer: Meteoroids belonging to the same stream (so, this is valid not only for the Perseids stream) actually do follow the same trajectory (orbit) in space but meteors caused by them apparently appear to originate from a particular spot in the sky (the so called radiant) trailing in all possible directions away from it only due to our perspective of view. In fact, you could even spot a so called stationary meteor which would appear point-like because it appears exactly in the radiant and is directed along your line of sight.
Usually, to explain this it is compared to the same effect when you'd drive a car at a high velocity through a snow-fall: the snowflakes would apparently appear only to you to come from some frontal area radiating then in all directions away from it, although they all have the same trajectory in space for an external non-moving observer.
Answer:
Why don't all perseid meteors follow the same trajectory?
Since these debris crossing Earth's orbit have the same relative speed, why aren't they drawing parallel paths in the upper atmosphere ?

Every 133 years the comet Swift–Tuttle orbits the Sun, it last passed by Earth during November/December 1992 (26 years ago) and is due for another pass on August 14, 2126 (IAUC 5636: 1992t).
When a comet travels through space it disintegrates leaving a shower of debris, every year the Earth passes through the tail's remnants (between July 14 - August 24 this year). The comet nucleus is 26 km in diameter, thus it produces a wide tail of debris that can fall to Earth from various angles, appearing in the direction of the constellation Perseus (but not actually coming from that constellation).
The meteor shower appears to radiate from a single point.

That is a result of passing through the trail of debris.

See NASA's webpage: "Perseids":

"Where Do Meteors Come From?
Meteors come from leftover comet particles and bits from broken asteroids. When comets come around the sun, they leave a dusty trail behind them. Every year Earth passes through these debris trails, which allows the bits to collide with our atmosphere and disintegrate to create fiery and colorful streaks in the sky.
The Radiant
Their radiant — the point in the sky from which the Perseids appear to come from — is the constellation Perseus. This is also where we get the name for the shower: Perseids. However, the constellation for which a meteor shower is named only serves to aid viewers in determining which shower they are viewing on a given night. The constellation is not the source of the meteors.
Answer: The answer has been given, it is the effect called "perspective."  I would simply add an example that should make the situation quite clear: sunbeams.  When you see sunbeams come through clouds, it is natural to think they are not parallel rays, because they look very far from parallel.  Your eye tells you that the Sun is sending out those rays in all directions, from its apparent location in the center of the clouds.  But your eye cannot tell that the Sun is a trillion times farther than the clouds, so it cannot tell the divergence of the rays is a complete illusion.  Actually those rays are almost perfectly parallel, because they all point to that incredibly distant Sun.  But look at them carefully the next time you see sunbeams through the clouds-- they seem as far from parallel as they could possibly be.  So it is with the streaks of meteors, it's because your eye cannot pick out that third dimension so tends to imagine it is not important.


What does "correlation" mean in signal processing?

Question: What do the words "correlated" and "uncorrelated" mean in signal processing? E.g. - "uncorrelated white noise.."
Answer: What it usually means:

"correlation, In statistics, the degree of association between two random variables. The correlation between the graphs of two data sets is the degree to which they resemble each other. However, correlation is not the same as causation, and even a very close correlation may be no more than a coincidence. Mathematically, a correlation is expressed by a correlation coefficient that ranges from −1 (never occur together), through 0 (absolutely independent), to 1 (always occur together)."

(from Encyclopedia Brittanica)
Uncorrelated white noise means that no two points in the noise's time domain are associated with each other. You can't predict any noise value at any other time from the noise level at time \$t\$. The correlation coefficient is 0.
Even if you know the noise signal over an eternal time, except for that one picosecond, all this information can't help you to fill in that picosecond's level. That's zero correlation.
Correlation within the signal itself is called autocorrelation.
Comment: The last sentence in the quotation from Encyclopedia Britannica is incorrect in that if the correlation coefficient \$r\$ has value \$\pm 1\$, the two quantities \$X\$ and \$Y\$ are said to be _perfectly (positively or negatively) correlated._ In fact, \$Y = aX+b\$ _exactly_ with \$a>0\$ and \$Y\$ increasing with \$X\$ if \$r=+1\$, and with \$a<0\$ and \$Y\$ decreasing as \$X\$ increases if \$r=-1\$.  For \$0<|r|<1\$, \$Y\approx aX+b\$ with the approximation improving as \$r\$ gets closer to \$1\$, and same relation \$\text{sgn}(a)=\text{sgn}(r)\$.
Comment: @DilipSarwate, From the phrase "never occur together", etc., we can imagine that the Brittanica author was writing about  random variables that only take two values indicating occurence or non-occurence of some event.
Comment: @ThePhoton Even restricted to random variables taking on values \$0\$ and \$1\$ only indicating non-occurrence and occurrence respectively, _my_ interpretation of the phrase "never occur together" is that \$P(1,1)=0\$ while \$P(1,0),P(0,1)\$ and \$P(0,0)\$ can be nonzero. However, \$r=-1\$ _only if_ \$P(0,0)\$ _also equals_ \$0\$. That is, when \$r=-1\$, \$P(0,1)\$ and \$P(1,0)\$ _both_ are nonzero (they need not be equal) and \$P(1,1)=P(0,0)=0\$. Equivalently, \$r=-1\$ if and only it always so happens that _exactly one_ of the two random variables has value \$1\$ and the other has value \$0\$
Comment: @DilipSarwate, OK, now I get it, and I agree the Britannica language is not as precise as it could be.
Comment: "Correlation within the signal itself is called autocorrelation"  then  What is cross correlation?
Answer: Uncorrelated white noise is a pleonasm in the sense that there is no such thing as correlated white noise.  One either has white noise which by
definition has certain properties including a lack of correlation,
or one has noise that is correlated and so cannot be described as white
noise in any sense of the phrase.
The mathematical model of continuous-time white noise is a convenient
fiction that accounts for the physically observed fact that the noise
power spectrum at the output of a filter with transfer function
\$H(f)\$ is proportional to \$|H(f)|^2\$.  If we pretend that
the input to the filter is white noise -- which has infinite bandwidth,
and flat power spectrum over this infinite bandwidth
(and hence infinite power) -- and apply standard random process
theory, we come to the result that the noise at the filter
output is indeed proportional to \$|H(f)|^2\$.  So this
infinitely powerful mythical beast white noise is a plausible
explanation for our physically measured results, and thus
white noise is commonly used in theoretical calculations.
One additional property of white noise is that two
white noise samples are statistically independent
(and hence uncorrelated) no matter how closely spaced
they are in time. Of course, one cannot take actual
samples of our mathematical fiction. In real life, all
measurements are made using finite-bandwidth instruments
(say \$W\$ Hz), and so the noise samples that we
can measure are those obtained after some implicit
filtering of the white noise that we set out to sample.
In particular, noise samples less than \$W^{-1}\$ seconds apart definitely
are correlated.  Noise samples further apart in time
also are correlated but the correlation values are small
enough that it is reasonable to treat them as negligible
and assume that the samples are indeed independent
and uncorrelated.  For more on this viewpoint,
read Appendix A of this lecture
note
If a continuous-time noise process is sampled at the
Nyquist rate and converted to a discrete-time sequence
of samples, then each sample can be taken to be
a random variable (usually zero-mean Gaussian)
independent of all other samples.  Thus, a discrete-time
white noise process is a sequence of independent
(and hence uncorrelated) identically distributed
zero-mean random variables. If the random variables
are Gaussian (as is almost always assumed), the
process is called a discrete-time white Gaussian
noise process. In any case, it is not necessary to
say uncorrelated white noise: white noise is
always uncorrelated.
Answer: When 2 signals are said to be correlated, it means that their correlation coefficient is non zero. The correlation coefficient is a value between -1 and +1, that depends on how the 2 signals vary together. If they vary largely "independently", then the correlation is close to 0 and the signals are said to be uncorrelated. If the correlation coefficient is close to 1, they are strongly correlated and if it is close to -1, they are strongly anti-correlated.
Auto correlation of a signal is a series that shows patterns within a signal. Each point of this series is the correlation coefficient of the signal with a delayed (or advanced) version of itself.
Uncorrelated noise refers to noise that has a zero autocorrelation function. So, every point in the noise signal is "independent" of every other point. So, even if you have signal values for large time epochs, you cannot predict the next value.
"Whiteness" of a noise refers to the flatness of its power spectrum. It is possible for uncorrelated noise to not be white, but pink(!) or other colors based on the power spectrum.
So, uncorrelated white noise is noise that is both uncorrelated and has a flat power spectrum. White Gaussian noise is an example of uncorrelated white noise.
Comment: IMO, The Auto-correlation of white noise tends to an impulse, not to a uniformly zero function. Please correct this in your answer. This is  by virtue of Wiener-Khinchin Theorem which states that the autocorrelation function of a wide-sense-stationary random process has a spectral decomposition given by the power spectrum of that process.
Comment: The original question was about correlation with an example of uncorrelated white noise. So, the answer was simply about what is correlated vs uncorrelated, and the meaning of the term "white noise".  The auto correlation of white noise was not the subject of this question, IMHO.
Answer: As Steven explained, in statistics 2 events are correlated if knowing the outcome of one gives information to predict the outcome of the other one.
For instance, if you throw a coin twice, the statistics say that the two events are independent, and knowing one won't affect the prediction on the other one. But if you have a cards deck, and you pick the ace of spades (without putting it back), you know that's impossible that the next times it will come out again. The events are dependent.
Correlation is somewhat similar: if your wife starts taking sewing lessons at 11 pm twice a week, and at the same time your best friend is in business meetings, you may think that the two events share some properties.
A stochastic process describes the behavior of a stochastic event over time. It means that you can have many different values at any time, and any possible outcome is defined as a function of time. The theory is complicated, but think to it as an immense music library. At any instant, one song of the library will be playing, and you can generate infinite playlists. (sorry for the lame example)
In this system, you can have two types of correlations: in time and in state. The time correlation says that knowing what's played at a certain time, you can predict (to a certain extent) what will be played in a few seconds. The state correlation says that from the same knowledge (what's being played now) you can estimate what else could have been played at the same time (maybe it was set for playing rock music at 5 pm).

Electronic noise is a very broad term that indicates everything that mixes together with your signal without giving any useful information, and making the useful part less clear. In communications, there is a lot of effort in getting the information to the other side, and this implies making the signal to stand out in the noise. It can be done increasing the power of the signal in transmission, shielding the communication medium, filtering or in other ways.
Since noise can be due to different phenomena, it will also have different properties. Thermal noise is due to the vibration of charge carriers in conductors, so you can expect it to depend on the temperature of the same; interference happens when another signal generator (think to a microwave oven) transmits over your signal. In this last case, if you know what the transmitter is doing, you can counter the effect in a more directed way (for instance, a band-stop filter centered at the exact frequency).
So knowing the statistic properties of signal and noise can help in separating the former from the latter, when analysis is necessary.


Convert PDF to a Google Sheet

Question: How to convert a PDF to a Google Sheet which I deleted and is in my MacBook Air trash to a functional Sheet & save into Google Drive where I can continue to use it as a fully functional Sheet?
Answer: Since you have the PDF of the sheet you could try to upload the file to your Google Drive by going to drive.google.com and clicking the "New" button in the top left corner of your screen. The tap "File Upload" and upload the PDF to your Drive.

Next, highlight the whole PDF that should now be in your Drive, open a new Google Sheet, and paste the whole thing there. It should be fully functional now, with everything from the PDF now in the Sheet.

Convert PDF to a Google Sheet


Is requiring participation for those who want a new topic a good idea?

Question: Is it a good idea to require members of the community who want to see a new topic area to participate a certain amount in that area?  Is there any hard data indicating the quality (as measured by community approval, or any other metric) of posts from posters trying to meet a quota vs those from posters who are participating without any requirement to do so?
Comment: I took a shot at trying to generalize the question and make it more answerable based on the comments here since it seemed like it was heading towards being closed.  I'm still not sure if it is a good fit or not, but hopefully it is closer.  Feel free to make any alterations if you feel it detracted from your intended question.
Comment: I don't know if this is the sort of thing you would find on Open Data.  One could gather Stack Exchange data by looking at Area 51 committers on beta sites -- how did posts from the people who fulfilled their commitments compare to those who were never part of the proposal?
Comment: Interesting topic, but how would you define the quality of a post? You could ask the "is there any data about X" question on [Open Data](http://opendata.stackexchange.com/) to supplement your own research, and use what you find to ask a much better question here.
Comment: @AirThomas as an example on Stake Exchange sites there is a rating system in place.  My assumption would be that a you could apply a numerical value to posts created by indentured posters and compare it to an average of non-indentured posters.  You may want to allow for site experience so somehow combine that in the numbers
Answer: Any hard data? I don't believe so.
However, in my experience, any type of interaction quota is bad simply because it more than always leads to poor quality interactions. That's because it's not just about generating a natural interaction, it's also about meeting a quota too.
One good example would be something you may find in Stack Exchange communities. Sometimes users who join a new stack exchange may feel they need to get their reputation up. In order to do that, they have to start interacting with the site, especially on community submitted questions.
Due to that, they may try to answer anything, including questions they may not have the best answers for as opposed to answering questions that are within their field of knowledge.
The same degrade also happens when post counts and other post count achievements have existed in communities. Users will often post one line sentences in order to boost their post counts and try to get the top poster in a community. Although it's not a quota, the achievement is driving their activity, which leads to poor interactions.
Therefore, setting a requirement to post may not be a good idea under any circumstance. If the topic of discussion is vast enough to justify a new topic area, then the topic area should thrive naturally. If it doesn't, then you should not force it for the sake of quality. As quality is pretty important in most communities, I would strongly not recommend the approach of quotas.


how to get each element in one record from mysql database

Question: I am trying to get each element in one record 'Pests' in database 'crop'.Actually my purpose is to get all the distinct pests in 'Pests' field.
BUT There are not only one element in 'Pests' in database. For example:
Name                                Pests

Name1                              Grasshopper
                                   Thrips
                                   Potato Leafhoppe
                                   Stink Bugs
                                     ... ...

Name2                              Green Cloverworm
                                   Mexican Bean Bettle
                                   ... ...

My code is like the following. But the result is not what I want. This will display all the pest in each column. But I want all the distinct pests in all column and display each pest in a table, like
Pest | Grasshopper|Thrips|Potato Leafhoppe|Stink Bugs|Green Cloverworm|Mexican Bean Bettle|... ...

Im so appreciate if anyone could give me some hint for how to achieve this.
Thanks so much!
$search = "SELECT distinct Pests from crop ORDER BY Pests ASC";
$result = mysql_query($search);

echo '
';
echo '
';
while ($rs = mysql_fetch_row($result)){
       echo ''.$rs[0].'	';
}
echo '
';
echo '
';

Comment: You need to [normalize](http://en.wikipedia.org/wiki/1NF) your database structure.
Answer: Simple answer is you shouldn't be storing multiple values in one row cell. SQL operations cant work on data like this.
You need to store your data like so.
Name     Pest

Name1    Grasshopper
Name1    Thrips
Name1    Potato Leafhoppe
Name1    Stink Bugs
Name2    Green Cloverworm
Name2    Mexican Bean Bettle


Ubuntu 18.04 Both Drives hang at boot on raid

Question: I am having booting issues with Ubuntu on 2 hard drives.
I built this rig with Nvidia i6800 motherboard, and 2 HDs,
The reason for 2 drives is one is the main and the other is a backup.
GRUB BOOTS
Main SATA:  ST2000DMOOB-2FR102

Backup SATA: WDC WD20EZAZ-00GGJB0

With 2 memory slots gone bad out of the 4 on that i6800 MB, I decided to change out the motherboard.
And I did to a: Intel DQ77MK Quad Core i5 3470 3.2GHz 8GB DDR3 Motherboard CPU RAM Combo - 14381
Now with better hardware Ubuntu on both drives is running great!
The problem is booting, both drives hang here:
Jan  4 17:47:39  kernel: [    4.399682] sd 3: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Jan  4 17:47:39  kernel: [    4.439785]  sdb: sdb1
Jan  4 17:47:39  kernel: [    4.448272] sd 3: [sdb] Attached SCSI disk
Jan  4 17:47:39  kernel: [    4.677222] ata6: SATA link down (SStatus 0 SControl 300)
Jan  4 17:47:39  kernel: [   93.650765] raid6: sse2x4   gen() 14885 MB/s
Jan  4 17:47:39  kernel: [   93.714763] raid6: sse2x4   xor() 10192 MB/s
Jan  4 17:47:39  kernel: [   93.770764] raid6: sse2x2   gen() 12508 MB/s

Between , ata6: SATA and raid6, is 1.4 minutes. is there a way to see what happening?
Jan  3 23:02:40  kernel: [    2.595791] ata6: SATA link down (SStatus 0 SControl 300)
Jan  3 23:02:40  kernel: [   92.398272] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)

This time at ata6: SATA and EXT4, 1.5 minutes, I'm very curious what is causing this delay.
I have no idea what the problem is, yet google searching has led me to a lot.
There is no floppy disc option in the bios.
Really like to get this fix, it takes some time to boot.
Thanks for you help.
Using the command:
nano /etc/fstab

Main Boot Drive  /etc/fstab
 # <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=3ba4b7d5-9192-43b6-a2b8-955b8eb4ed7c /               ext4    errors=remount-ro 0       1

2nd Boot Drive
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=3bbd0470-d6a3-48e8-8884-e5b2d28fcd00 /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0

I know the errors are setting drives to read only and that's ok, but why is it taking so long to boot?
So it seems there is a mounting problem, like I said, this is over my head, and I'm learning more everyday.
A fix for this would be great!
I no longer get the ubuntu loading screen, not sure why?
Thanks for the help.
dmesg | grep SATA

$ dmesg | grep SATA
[    1.105157] ahci 00000:1f.2: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x2d impl SATA mode
[    1.143179] ata1: SATA max UDMA/133 abar m2048@0xf6336000 port 0xf6336100 irq 26
[    1.143379] ata3: SATA max UDMA/133 abar m2048@0xf6336000 port 0xf6336200 irq 26
[    1.143496] ata4: SATA max UDMA/133 abar m2048@0xf6336000 port 0xf6336280 irq 26
[    1.143693] ata6: SATA max UDMA/133 abar m2048@0xf6336000 port 0xf6336380 irq 26
[    1.451472] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    1.851525] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    3.163558] ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    3.483549] ata6: SATA link down (SStatus 0 SControl 300)

*******UPDATE*******
I was planning on using the bios to set which drive to boot from but GRUB jumps in and seems to ruin my plans.
Now if I lose the main drive, I cannot boot from the backup drive, I need to fix that. Hopefully I can!
The Ubuntu install on both drives is default from file system to swap to ect...
It appears only the main drive boots, there is a boot.log file there but, no info in the boot.log file on the back up drive, just a blank empty file.
There are files for the kernel.log and system with info in them on the backup drive.
"No btrfs" with both drives using ext4 I see no need for that system.
So I will remove it, since it is not needed.
"No swap partition (this will effect hibernation)", this seems to compensate for lack of memory no problem there, I have 8g of memory  was planning on going to 32 if needed.
"GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noresume"
I moded that line already with,
"GRUB_CMDLINE_LINUX_DEFAULT=""
Now i can see the drive booting.
"GRUB_CMDLINE_LINUX_DEFAULT="noresume"
Is that the way I should edit that line in that file?
 I want to keep seeing the booting on screen.
open(or create) /etc/initramfs-tools/conf.d/resume.conf
replace(or add) RESUME=UUID=xxx with RESUME=noneissue
That folder conf.d is empty on both drives.
No problem creating a file.
How do I find the "UUID" and if there is two, which one should I use?
Thanks for your help....
Answer: The booting issue was because of Ubuntu.
I upgraded to 20.04 and it screams blazing fast at boot now!
The problem was Ubuntu.


How to identify whether our organization is subjected to the juridication of federal trade commission (FTC)

Question: our organization is registered in the United States. By registering the company in the US means, are we under the jurisdiction of the FTC? or is it something else? because we are planning to get the privacy shield certification. For that, it is mandatory to be subjected to the jurisdiction of FTC, but I don't know how to find our company's status. I am not familiar with US laws and regulations since I am new to this area.
Answer: The US Federal  Trade Commission is responsible for the enforcement of certain US laws, particularly in the areas of anti-trust (monopolistic practices) and consumer protection.
The FTC itself, on its page "What the FTC Does" says:

The Federal Trade Commission enforces a variety of antitrust and consumer protection laws affecting virtually every area of commerce, with some exceptions concerning banks, insurance companies, non-profits, transportation and communications common carriers, air carriers, and some other entities. The agency leverages its resources and targets its enforcement efforts at practices that cause the greatest harm to consumers.

The basic statute enforced by the FTC, Section 5(a) of the FTC Act, empowers the agency to investigate and prevent unfair methods of competition, and unfair or deceptive acts or practices affecting commerce. This creates the Agency's two primary missions: protecting competition and protecting consumers. The statute gives the FTC authority to seek relief for consumers, including injunctions and restitution, and in some instances to seek civil penalties from wrongdoers. The FTC has the ability to implement trade regulation rules defining with specificity acts or practices that are unfair or deceptive and the Commission can publish reports and make legislative recommendations to Congress about issues affecting the economy. The Commission enforces various antitrust laws under Section 5(a) of the FTC Act as well as the Clayton Act. The FTC monitors all its orders to ensure compliance.

Any organization or business that operates within the United States in fields covered by any FTC order is subject to its jurisdiction, whether it is "registered" or not. Businesses that deal with consumers will find a number of FTC regulations applying to their operations. Businesses that operate on a business-to-business basis, but do not have anything close to monopoly control of any industry will be less impacted.
The FTC does oversee some Federal privacy laws, including the Fair Credit Reporting Act (FCRA) and the Children's Online Privacy Protection Act (COPPA).
In short, it is what an organization does that makes it subject to various FTC regulations. Without knowing what an organization does, there is no way to know to what extent it will come under FTC regulations.
The EU-US Privacy Shield was declared invalid by the European Court of Justice (ECJ) on 16 July 2020 "on the grounds it did not provide adequate protections to EU citizens on government snooping". There will be no future certifications under it.


Quickly switch input methods (swype->other)

Question: I'd like to be able to switch from Swype to Hacker Keyboard from within programs, especially ConnectBot and TerminalEmulator.  Hacker Keyboard comes with a shortcut to switch to others, but Swype doesn't.  If there are workarounds to reduce the number of clicks needed to switch input methods, those would also be welcome.
Comment: Long-pressing an input field generally prompts you for the Input method.
Answer: I am looking at Swype right now, and it's got a cogweel in the bottom left corner, which if pressed for more than 1 second gives you a choice of the input methods (Swype, Android Keyboard, others...)
https://i.stack.imgur.com/3Jg4v.png
Comment: Mine doesn't have a cogwheel... is this a version issue?
Comment: Could be. I downloaded the latest version, to be able to type in 3 different languages. I currently run 3.23.
Comment: http://www.apktop.com/swype-3-23-multi-language.html as seen in the first screenshot, the same button that has the cogweel on my app, is situated in the upper left corner, and has the (i) sign. Could be related to anything. Swype version/Firmware/Resolution...
Comment: I'm apparently on 3.25, though it looks like that's not the problem, since the screenshot you pointed to also has the (i) instead of a cogwheel.


How do I say "always remembered" on a locket with a picture of my Dad?

Question: To engrave on a locket with a photo of my father after his death
Answer: To remove potential ambiguities you could try:
"numquam memoria excides." =
(literally) "You will never fall out of memory." = "You will never be forgotten."
Alternatively, using the infinitive of "excido":
"numquam memoria excidere." =
"Never to be forgotten."
(An active verb translated passively.)
Answer: 'Remembered' is a past particle. One way to translate 'to remember' is 'memorare'. I would go with a particle perfect passive, as it is a person who is being remembered, but I'm not really sure about this. Maybe someone else can give a better alternative for the verb form.
So the translation would then be:
Semper memorato
Comment: The problem I see with this is that it basically means "always brought up, mentioned," does it not?
Comment: My first reading of your suggestion was a future imperative: "always remember". That is not a particularly harmful ambiguity, and can even be considered beneficial.
Comment: Thank you for your input - is there a general consensus on what might be appropriate/correct to engrave?

How do I say “always remembered” on a locket with a picture of my Dad?


Can I describe two different ideas inside a provisional patent application?

Question: I have two ideas completely different and unrelated to each other, I want to put both of them inside a provisional patent application and in a alter time file two non-provisional application for them. is it possible?
Answer: Can I describe two different ideas inside a provisional patent application?
Yes. Indeed, you could do this in any application, whether provisional or non-provisional: there is no restriction on what can be described.
The restriction on multiple inventions is provided by 37 CFR 1.141(a), which provides: (emphasis added)

Two or more independent and distinct inventions may not be claimed in one national application…

Thus there is no restriction on how many inventions can be described, just how many can be claimed.
In principle, this might restrict a provisional from claiming multiple inventions. However, the consequences of claiming multiple inventions only arise during examination (per 37 CFR 1.142), so will never apply to a provisional which is never examined.
Does this affect claiming the benefit/priority?
No.
With regard to claiming the benefit of an earlier filing date, 35 USC 119(e)(1) provides (in a very long sentence, the bulk of which I have omitted):

An application for patent … for an invention disclosed … in a provisional application … shall have the same effect, as to such invention, as though filed on the date of the provisional application …

Thus it is irrelevant what is claimed in the provisional. It only matters what invention was disclosed.
Claiming priority in other countries is a little trickier, since that would really require a consideration of every country's laws. However, the Paris Convention art 4(A)(1) provides:

Any person who has duly filed an application for a patent, or for the registration of a utility model, or of an industrial design, or of a trademark, in one of the countries of the Union, or his successor in title, shall enjoy, for the purpose of filing in the other countries, a right of priority during the periods hereinafter fixed.

All that matters is that the earlier application (such as the provisional) was duly filed. Of course, this provision does not explicitly mention that the invention must be properly described. However, that is the interpretation of "right of priority" at the time the agreement was made.
Can I file two non-provisional applications from a single provisional?
Yes. This flows from 35 USC 119(e)(1) quoted above. Each non-provisional is entitled to an earlier date based on any relevant provisional. There is no restriction on one provisional being used for multiple non-provisionals.
Answer: I have read somewhere that we can have multiple ideas inside a provisional patent but I can't remember where it was! I think I read it in  "Patent it yourself".
Answer: YES! You can theoretically include as many inventions in a provisional application as you want. At the non-provisional stage, you can still include as many inventions as you want in the specification and drawings, but you can only claim one invention. In other words, the claims are only allowed to be directed to one invention.
However, if the filed claims do include multiple inventions, the Examiner will issue a "restriction requirement" and require the applicant to elect only one invention for examination. The non-elected invention(s) can be protected via divisional or continuation applications as long as such applications are filed before the original issues as a patent or goes abandoned.