Community bot bumping dead, answered posts

Question: The Community bot seems to be bumping random questions that are quite dead and actually answered.
I think this behavior should be stopped, or we're risking to look like a spam junkyard.
Comment: The bot can't analyse, that would be a very different animal.  The root problem is the lack of traffic and the upvotes that would come from it.
Comment: The bot only considers a question answered if an answer has a vote.  It is possible to set a maximum number of bumped posts on the home page - that would help - (MSE) [What can cause a question to be bumped?](https://meta.stackexchange.com/q/48578/236563)
Comment: I'm totally all for bumping, but there's a lot of questions even answered by me :) Just check this one - https://tor.stackexchange.com/questions/21922/ideal-computer-for-running-tails-and-tor-on-windows - no comments or any kind of questions, but the answer **is** right, as many cases in my practice even after it are proving it on practice. IMHO *just bumping* without any analysis is certainly a kind of spam...
Answer: When I visited the site back on April 13th, I actually felt the same way and - independently of this request - I set the site to only bump up to 10 questions at a time on the front page. Since then, this issue has decreased significantly, leaving a lot more recent content on the front page, rather than Community bumps of older posts.
That said, I'd like to caution y'all in the same way I did Android and Stack Overflow before this.

Community bumping is something that I think has been confusing to people for a while. There's questions on MSE about it from 2011 and 2013 and even back in 2016, Shog9 started a discussion to ask How can we make the purpose of Community "bumping" more obvious? - in it he states:

I was discussing this with my esteemed colleague jmac the other day, and it occurred to me that we never actually hint at what we want folks to do when these questions are bumped.
To be clear, the intent here is to resurface questions that someone has attempted to answer, but which haven't yet attracted any votes to either confirm the usefulness or decry the worthlessness of the answer(s) that've been posted. Q&A that, above all, needs feedback.
...But we don't really say this anywhere. And I strongly suspect that an awful lot of folks viewing these questions just shrug and move on.

And... well... I think that's maybe part of the struggle I'm seeing in your question - you're frustrated (understandably) that you keep seeing posts being repeatedly bumped by Community without really understanding why we do this. Now, unfortunately, while there were some proposed solutions, I don't think we ever actually followed through on this.

Given that, what's needed is more voting - whether that's up or downvoting on the answers or close voting the questions (if they're poorly-framed or out-of- scope). You can at least be glad your problem is smaller than Android's - while they had 9k qualifying questions, you have under 1000 of them - 1324 "unanswered" questions  - 750 questions with no answers = ~574 questions that qualify for bumping by the Community user. That's still quite a few but it's not insurmountable!
Here are some more details I wrote up about how to assess individual questions and answers that qualify for bumping:

What I'm getting out of this all is that Community bumps are... a sort of unofficial, poorly-explained review queue. They're a way we've come up with to get people to look at older content and see if it has value - so, knowing that, what should you do?
The first thing worth considering is whether you have the domain expertise to judge the questions and answers - if not, then it's probably best to leave it for someone else to review. Let's assume you do have that expertise:

Look at the question first - is it a good question and not a duplicate?

Yes! (go to 2)
No! You have two options, you can do one or both of them:

Close - closed questions will not be bumped. (requires more than one person)
Downvote - negatively-scoring questions will not be bumped. (most effective if post has a score of 0)

Look at the zero-score answers one at a time and repeat as necessary.

If you can confirm the answer is good and correct, upvote - if at least one answer  has a score of >= 1, the question will not be bumped.
If you can confirm the answer is low quality or incorrect, downvote - if all answers have a score <0, the question will not be bumped.
If you are unsure, skip. Best not to vote if you can't adequately judge the answer.

And, well - if you wrote all the answers, you're just going to have to find more people to use the site and vote them up. (Sorry Alexey ;) )
There's a ton more in the Android post that may very well apply here - things like what to do about old questions about technology that's deprecated and there may be no feasible way to answer those questions any longer or judge whether the answers are good or not. So, review it and, in the interim, know that you should (and have been) seeing less of this for a month or so now.


synchronizing alsa volume to all pulse audio sinks

Question: I control my computer's audio using key bindings linking XF86 audio key presses to amixer commands. This works well, unless I am listening through a non-alsa sink such as bluetooth-connected headphones. In this case, the volume is controlled through pulse audio and my key bindings no longer work. Is there a simple way to reflect changes in alsa volume to all sinks known by pulse audio (e.g., such that a -5% change in the master alsa volume would also be applied to all pulse audio sinks)?
Answer: I'd say the simplest way is to change your key bindings, and instead of amixer commands, issue pactl or pacmd commands. Wrapped in a script that iterates over all sinks.
Pulseaudio does track the ALSA mixer setting, but only for the sink which is connected to the ALSA hardware, and I don't see an easy way to change this.


Is procedure turn considered published approach course?

Question: Procedure turn is not completely lined on the chart and only marked with the barbed arrow. Is it still considered a segment of a published approach course? Can you report to ATC that you're established on the course when you're flying PT?
Comment: Jepp or Gov't chart? Could you provide example of the chart, or the name of the approach, and I'll attach it for you.
Comment: I think both charts use the barbed wire to mark standard PT.
Comment: I've only used Gov't charts. I'm not familiar with that term "barbed wire" as it relates to plates. I'd like to see what it looks like, maybe I just think of it as something else. Do you have an approach name, like an ILS or VOR etc and name of airport that I can go look up?
Comment: Sorry. I think the proper name is barbed arrow not barbed wire. My apologies
Answer: I've been doing a lot of practice approaches lately and if a procedure turn (or hold) is required, they tell me to 'report procedure turn (hold) inbound'. Then they clear me for the approach. I think this is why:
AIM 5−4−7. Instrument Approach Procedures

b. When operating on an unpublished route or while being radar vectored, the pilot, when an approach clearance is received, must, in addition to complying with the minimum altitudes for IFR operations (14 CFR Section 91.177), maintain the last assigned altitude unless a different altitude is assigned by ATC, or until the aircraft is established on a segment of a published route or IAP. After the aircraft is so established, published altitudes apply to descent within each succeeding route or approach segment unless a different altitude is assigned by ATC. Notwithstanding this pilot responsibility, for aircraft operating on unpublished routes or while being radar vectored, ATC will, except when conducting a radar approach, issue an IFR approach clearance only after the aircraft is established on a segment of a published route or IAP, or assign an altitude to maintain until the aircraft is established on a segment of a published route or instrument approach procedure. For this purpose, the procedure turn of a published IAP must not be considered a segment of that IAP until the aircraft reaches the initial fix or navigation facility upon which the procedure turn is predicated.


PayPal Sandbox - Invalid Billing Address

Question: I'm trying to test a purchase on a website I'm developing which uses WooCommerce. So, when I proceed to checkout and chose to pay without a PayPal account (this payment method still runs through PayPal's system) and use a credit card. I'm using a fake credit card that I generated in PayPal sandbox. When I type in all the correct details and attempt to continue with the payment, it returns an error that the billing address I used is invalid (the billing address I'm using is the address that PayPal Sandbox generated for me. I'm not sure how to fix this.
Answer: Kindly contact PayPal Merchant Technical Services for further assistance on this issue.
https://www.paypal-techsupport.com/app/ask


What could be the affiliation if an author is currently not working anywhere?

Question: I would like to submit a manuscript which has 5 co-authors. But one of the co-author is presently not working anywhere. So what could be the affiliation of this author? Is it Okay, if I provide the author's last affiliation address?
Answer: Check and see if the author's last affiliation consents to being cited as affiliated; if so, I don't see why it would be a problem.
If not, then simply list the author as "Independent Researcher" and provide home address. Or leave field blank. There's no requirement for an affiliation for academic papers.
Answer: If this is not forbidden by the former affiliation, one of the possibilities is to use the affiliation where the work has actually been performed ("The work was performed when the author was at XXX"). Or it could be "Formerly at XXX".
Comment: "On leave" means "will be going back to XXX after some time off" - that doesn't sound like what's going on here.
Comment: Indeed, corrected


Can a tornado burn itself out?

Question: I know that hurricanes can basically "burn" themselves out of energy if they get too strong, but can the same thing happen with a tornado?
Comment: Thanks much for bringing your question over here Scott :-)  Hope you find some useful info around here - Shane
Answer: Neither hurricanes nor tornadoes burn out because they get "too strong". Their strength is dependent on how supportive the atmospheric conditions are. If a hurricane stays in the same place for too long, moves over land, or moves over colder water, it will weaken. Likewise, a tornado will weaken if its parent storm moves into less favorable conditions and weakens.
All storms operate at "maximum strength" - they always are using all the energy that is available to them.

Can a tornado burn itself out?


Spring boot CommandLineRunner invokes all classes with run method

Question: I have multiple classes which uses CommandLineRunner for running the application. But when i start the application using spring-boot-maven-plugin all the classes are invoked one after another. This happens even if I run the class as main method. How can I overcome this. Any help will be greatly appreciated.
Using the below code in pom to identify the main method
<plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>1.2.4.RELEASE</version>
                <configuration>
                    <mainClass>com.Foo</mainClass>
                    <layout>ZIP</layout>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
Comment: That is what the `CommandLineRunner` interface is for. If you don't want Spring to call the run method on those classes, stop implementing the interface.
Comment: @ESala Thanks for replying. I was looking for any option to override this behavior.
Answer: A potential solution for you, that I used to get around a similar problem. Similar, but not exact same, so I can't guarentee success.
You can try using @ConditionalOnExpression on each implementation, with different values. Like so: @ConditionalOnExpression("'${some.property}'=='myValue'").
Add the property in application.properties to set a default implementation, and when running the jar you can override that implementation with java -jar myApp.jar --some.property=myOtherValue.
Spring boot should select the correct implementation to use, based on which implementation matches the value of the property you set.


Silverlight File Upload: is this safe?

Question: I've seen the Silverlight upload sample here referenced multiple times on this site and elsewhere, but I have a question about whether or not it's really safe.
Quick review: This code does "chunked" uploading to an ASHX handler. UploadFileChunk() instantiates a WebClient and uses OpenWriteAsync and an OpenWriteCompletedEventHandler to send some bits from a file. The WebClient communicates with the handler using a URI with two QueryString parameters: "filename" and "append." After writing the bits in a chunk to the WebClient's output stream, the event handler checks to see if all the bits have been sent, and if not it calls UploadFileChunk() again to send another chunk.
On the server side, the handler is simple - write the bits to disk using a FileStream, appending if append=1 and creating anew if append=0.
This architecture seems very likely to result in problems. Is the server guaranteed to be finished writing the bits and closing the filestream before it receives the next request and starts appending bits from the next chunk? My understanding of the OpenWriteCompletedEventHandler on the Silverlight side is that when you finish the write operation and close the stream, that doesn't necessarily mean the bits have been sent across the wire yet, let alone been processed by the server-side handler.
Thanks!
Answer: If you have any concerns about uploading larger files (I have seen reports of problems with very large files), try one of the free Silverlight Open Source file uploaders like this one

Silverlight File Upload: is this safe?


Difference between Transfer objects and Domain objects

Question: Could you please explain the difference between Transfer objects and Domain objects in simple terms ? And if u could give a Java example, that would be great..
Answer:
DTOs don't have any logic. They only have fields (state). They are used when transferring data from one layer/subsystem to another
Domain objects can have logic (depending on whether you are using domain-driven design or have anemic data model) and they are usually related to the database structure.

If using anemic data model (i.e. your domain objects don't have any logic), DTO and domain object can be the same object.
Related: http://techblog.bozho.net/?p=427
Comment: No. Domain objects have no specific relation to any persistence. In simple words, they are parts to ensure the business logic required to run the application. In most cases you can and should create your app without persistence in mind. For example, work with in-memory objects and fake repos at the beginning.
Answer: A Data-Transfer-Object (DTO) is used to exchange data between different parts of an application (such as different layers), or different applications.

DTO's are simply a "dumb" data structure.
They are used in contracts / interface definitions - this means that any component that uses one of these interfaces "knows" about these objects.

Domain Objects (DO) (and the classes from which they are derived) implement business logic, as such they are only located in the Business logic layer / Domain (the essential meaning is the same even if the terms are different).
Because DO's implement business logic they can be complex, and can include methods, events and so on.
One more point about DTOs
According to the Martin Fowler school of thought a DTO is a combination of several objects (each of which would be what most people would commonly call a DTO); the rationale is that in situations it's less expensive to send larger packages of data less frequently (as opposed to being "chatty" and sending many small packages constantly across the wire).
So where most people would view a DTO as a single object Martin F is saying a DTO is simply an "envelop" that contains several discrete (and possibly unrelated) objects.  Not a big issue IMO - most people take the view that a DTO is as per my definition at the top of this answer (or something close to it).
Comment: +1 dto are generally used across tiers, however it is not limited by that.
Comment: Thanks for your reply. Does it mean that DTOs are used primarily towards the presentation layer, while DOs are used towards the backend only ?
Comment: No, DTO's are not restricted towards the Presentation layer.
Answer: Transfer objects are often serializable due to the nature of its use, this is especially pertinent if the calls are remote and between JVM, or they will be used in a way that promotes serialization, such as stateful session beans. For this purpose, transfer objects must be susceptible to such "treatment", I.e. Transfer objects implement serializable.
The reverse may not be said of domain objects. Domain objects may contain behavior, however DTO are merely a transportation medium.
Answer: Domain object in business perspective, it is actor or subject of the activity with whole domain and flows, DTO is the data object which is not the same as data bean that faithfully to reflect database  objects   (especially at ORM architecture)
DTO can has data aggregation, transform , combination to satisfy the representation or some data  munipulate needs , it is no subject , but Domain object has subject base on their domain level defination
Comment: Did this add any value to the above answers?


What is reactive power for a circuit at its resonance frequency?

Question: Many sources I've read state that reactive power is important because it helps maintain voltage and magnetic fields in inductors, but in a circuit at its resonance frequency, the inductive and capacitive reactances should cancel so there would be no reactive power. What happens in this situation?
Answer: well I don't think I know what "reactive power" is in the context of your question. I have seen "reactive power" used in AC power distribution systems where it is a bad thing. Power companies want loads to be resistive and if you have a factory say with a bunch of motors running they may make you put capacitors across the line to phase shift the load back to resistive.
However at resonance there is still current flowing in the inductor, so it will still have a magnetic field. It just that as you state the combined load is resistive so the current and voltage (across the load) are in phase, and the power is not reactive.If you have access to a circuit simulation program such as Spice, simulate a RLC circuit at resonance. You will see current in all three parts. In an ideal circuit like that the current in the inductor and capacitor will always be 90deg out of phase, but the phase-current relationship of the circuit will change with frequency.


How to get player coordinates in Minecraft Forge?

Question: I'm currently working on a Minecraft mod (Minecraft 1.12.2) using Minecraft Forge where the player can use a hotkey to send out a "SOS" message in a discord-server using a discord-bot. This SOS-message could contain things like the current coordinates of the player, the time of day, etc.
Now, I'm a total newbie on this topic and when trying to implement this mod I'm struggling to get certain information about the player (in this case the current coordinates). I assume this can be accessed through a certain class (not sure whether this is true or not), but when searching the web most search-results tell you how to see your current coordinates in game (which is not what I want: I want to be able to take these coordinates and send them to a discord-bot for example).
Anyone who has experience on this topic and could help me?
Just for information: tha name of the mod is "KDPVP" and my current program is written in the "KdPvp.java" file inside the package "com.cy4.kdpvp" inside the src/main/java folder of my project.
The current code in "KdPvp.java":
package com.cy4.kdpvp;

import net.minecraftforge.fml.common.Mod;

@Mod(modid = KdPvp.MODID, name = KdPvp.NAME, version = KdPvp.VERSION)
public class KdPvp
{
    public static final String MODID = "kdpvp";
    public static final String NAME = "KDPVP";
    public static final String VERSION = "1.0";

    public void sendSos()
    {
        // TODO take the current coordinates and send them to the discord bot
    }
}

Answer: Found this from - Here
int playerCord = entityPlayer.getPlayerCoordinates()


What is the best and safest way to store user email addresses in the database?

Question: From security reasons, is it worth encrypting user emails before putting them into the database?
I know we hash and salt passwords but that's another story as we do not really need password originals. With emails it is different.
Knowing that the decryption key will anyway be somewhere close to the database, does it make sense to encrypt emails? I suppose if someone gets into the system, they will find the key as well, if not immediately then eventually.
What are the best-practices? Are there any other options available if I run my own servers and not on a shared/virtual hosting?
EDIT: I intend to use SQL Server. And no, it is no corporate software with security requirements, just some entertainment site I have in mind.
Answer: If you're going to need the email address in the future, then you'll have to store them in plain text.
You could encrypt them, of course, however, this is effectively security through obscurity in this case.  Basically, if your application's perimeter is secure, your data within it can be plain text.  Encrypting here adds complexity to you working with the data, but doesn't really stop an attacker from getting your raw data.
As you say, if he gets through your perimeter defenses, he's likely to easily get your decryption key to decrypt the email data.  Encryption may slow down the determined attacker slightly, but will not add any real security to your data.
The best scenario is to hash the email address (with salt!) and store that.  This allows you to check the email address against an input value (for example) and verify that the email address input is the same as what you have stored, of course, the major downside for this is that you can't know what the email address is without that additional value, so if you're wanting to (for example) regularly email your users, you'll be out of luck.
I suspect you're storing the email address because it's useful data, and you will want to do something with it (like send an email :) in which case, encrypting just adds overhead to working with that data, whilst gaining very little in return.
In this case, I would focus on securing access the database itself (i.e. your "perimeter" defenses) and ensure they are as strong as can be, whilst leaving the data in the database in plain text.
Comment: Good analysis, very insightful. +1
Answer: Hopefully this answer will answer your question as well.
Is it worth encrypting email addresses in the database?
In short, no, it is not worth encrypting user email addresses.  You're right in thinking that a database compromise will likely result in somebody also gaining access to the keys required to break your encryption.
Comment: Sometimes a server break-in only allows the attacker to see the database content itself, sparing the key, and therefore protecting the data.  It would be ludicrous, though, to count on that being the case.
Comment: I've seen this one but it seemed to be quite narrow. I'd like to hear any thoughts with regard to email security.
Comment: I would have to agree with others answering this question then.  Most email addresses are spammed to high heaven regardless.  Ones that aren't usually have spam-blocking in place, and no amount of encryption will save users if their password is "password" and somebody finds their email address.  I would follow @MaxVT's advice though and sanitize/validate email addresses. Using database-wide encryption like @zoomzoom83 suggested is also a good idea if you're still concerned about security.
Comment: I wouldn't consider spam the real problem when revealing email addresses. Often an email address is really a personal detail, identifying the user. Database-wide encryption is only useful when SQL Injection is taken care of, like it should be, of course.
Answer: In general I agree with others saying it's not worth the effort. However, I disagree that anyone who can access your database can probably also get your keys. That's certainly not true for SQL Injection, and may not be true for backup copies that are somehow lost or forgotten about. And I feel an email address is a personal detail, so I wouldn't care about spam but about the personal consequences when the addresses are revealed.
Of course, when you're afraid of SQL Injection then you should make sure such injection is prohibited. And backup copies should be encrypted themselves.
Still, for some online communities the members might definitely not want others to know that they are a member (like related to mental healthcare, financial help, medical and sexual advice, adult entertainment, politics, ...). In those cases, storing as few personal details as possible and encrypting those that are required (note that database-level encryption does not prevent the details from showing using SQL Injection), might not be such a bad idea. Again: treat an email address as such personal detail.
For your entertainment site this is probably not the case, and you should focus on prohibiting SELECT * FROM through SQL Injection, and making sure visitors cannot somehow get to someone else's personal profile or order information by changing the URL.
Comment: I upload database dumps to GitHub, so some way to obfuscate the emails would be nice.
Answer:
One of the most often-cited truisms in computer security is that the
  only truly secure computer is one buried in concrete, with the power
  turned off and the network cable cut.

With that in mind the best way to securely store email addresses? Dont store them at all!
tl;dr Do you need their email address, or a way of sending them emails? Either trust someone who will do a better job than you or don't use the email address at all.
Why do you need to keep a record of a customer's email address? The only reasons I have run into are:

Account confirmation & authentication
Transaction & Marketing emails

Confirmation & Authentication
The core of what we want is two step authentication: Something they know and something they  have. Something they know is a password, and is easy to prove since they will be the only one who knows it. Something they have is harder to prove and traditionally we use an email address since it is easy to verify. These days though there are other things we can use:

Mobile phone
An account with a trusted website (Facebook, Google, Twitter)

Mobile phone verification is simple. Send them a sms using a service like twilio.com and ask them to text back a confirmation code. We now know that the mobile belongs to the customer who wanted to register. With OpenID you can verify existing accounts with other trusted sites, and the confirmation process is handled by them.
For the customer to authenticate then all they provide is either their mobile number and password, or an OpenID authentication token. Neither require a email address (well the OpenID provider might but thats not your responsibility).
If these are not an option then you can still confirm an email address and then use it for authentication. Confirmation only requires a unique token to be stored and a link to be sent to the email address. Store a salted hash of the email address, and use that to match the account in the same way we do passwords.
Transaction & Marketing Emails
The real reason why we want to store the email address! So we can send them offers of stuff we think they need so they can delete it without reading it. Seriously though is email the best medium for this? If we have an OpenID account then why not use that for notifications? Send a Facebook message or write on their wall, @mention them on Twitter, send a text message to their mobile, build an app and push notifications at them. There are so many channels much more effective than email.
If you want to use email then use a email platform like Mandrill and MailChimp. When they register create a subscriber in a mailing list on MailChimp. Store the subscriber id with the account. For transaction emails ( reset password, account updates ) fetch the subscriber and pass the stored email to Mandrill to send the email. For mass marketing just send to the mailing list in MailChimp.
The only thing stored in the database is the subscriber id. It also gives all the benefits of using a email platform, unsubscribes, open and click through rates, e-commerce tracking etc. Email platforms will do a better job of delivering emails that you. They will also do a better job at protecting the privacy of their data than you. Let them do the hard work of database security so you can focus on getting more customers.
Answer: I think that when people can come in your database you are anyway screwed :)
It doesn't make a lot of sense to just encrypt your email addresses. Beside that there will be a lot of other information in your database that you would not like to be gathered, the decryption key will be indeed within reach at the same time your database is open.
I would like to suggest to find your layer of security and data integrity on a higher level. So the prevention of people entering your database.
And why would email addresses be so important? Most people will anyway get spam or their email addresses will otherwise be available somewhere on the web.
Answer: Depends on how often you access the addresses. If you read them once in a while, it might make sense, but this would be one of the last security issues I would spend time on.
Answer: I do not encrypt user e-mails. The point is to protect the database; the keys are accessible anyway if you actually want to use the e-mails once they are stored.
Do check the address for validity and possible SQL injection, though.
Answer: If the application server and database are on separate servers, it would generally increase security to have all or parts of the database encrypted.
Even if they are on the same machine, a hacker may not figure out where your password is stored (although I wouldn't rely on that).
I generally wouldn't encrypt the emails at the application level, instead relying on database-wide encryption offered by most enterprise databases.
Of course if you're using something like MySQL, then you have no choice but to do it at the application level.
I normally tell my clients it isn't worth the trouble encrypting a database, however if you have stricter privacy requirements it may make sense to do so.
Answer: Encrypting database content is always a tricky consideration. Clearly the content is useless unless it can be unencrypted, and if that has to happen without human intervention, then you're storing both the cyphertext AND the key somewhere. If that somewhere is on the same machine, then one might wonder why you even bothered.
Well, there's a few reasons why you might want to do this. One is because you're required to do so because of some company policy. Another is that perhaps your database is housed in a more hostile environment than that machine that accesses it.
In general, encrypting database content isn't going to win you any awards, but if you can justify it, then you clearly have at least some motivation to do so.
Answer: yeah could be helpful for the user if you hash it with salt. I had a code before which i used that I use salt and hash then I can decrypt it. Flow is that once user will register you then hash and salt (encryption process) it. Then if you need to fetch the encrypted data there will be decryption.
Comment: I think you're getting "hash" and "encrypt" confused....


Why is the InSight ICC camera still dirty after the lens cover has been removed?

Question: Two images from the ICC (Instrument Context Camera, a fixed camera under the InSight lander looking at the area of the deployable instruments will be placed) have had the lens cover removed, but the picture still seems to have dirt.  Was this intended or expected?

an earlier picture for comparison:
Comment: Doubtful that it was intended.  Though it may have been a likely or even expected outcome, my guess is all reasonable avenues to avoid it were implemented.  It can safely be assumed that there are folks at JPL working on (or planning to work on) replicating this and mitigating it for future missions.
Answer: Possible Answers:
The camera is mounted just under the landers top surface, and obviously was exposed to a large amount of fine debris being blasted about upon landing.  The cover I believe is a heat triggered spring loaded cap. Now as to why it failed to keep the dust out requires access to greater knowledge of the camera and cover design; such as was it pressure sealed, what the pressure was in the space between the cap and camera lens, if not a vacuum what gas was in between the cap and lens, etc.. I suspect if the pressure was less than that on mars then when the cap opened the dust might have been drawn towards the lens.
The basic design I have looked at suggests the dust from the cap might be flung back up onto the camera lens from behind as the cap flips open under the camera.
There might have been a static effect on the lens that attracted the particles as well.
And finally if the surface contains frozen ice particles that melted due to the thrusters then this may have condensed on the lens to some degree and when the cap opened the dust may have stuck to this moisture (although I doubt this would be the case days later in the low pressure of mars).
Comment: Interesting speculation, but not a sourced answer.


How can I promote human rights petitions to the UN?

Question: How can I promote petitions about corruption and human rights violations in Egypt to the UN Human Rights Council?
Answer: Contact the [United Nations Human Rights Council]
(http://www.ohchr.org/EN/HRBodies/HRC/ComplaintProcedure/Pages/HRCComplaintProcedureIndex.aspx) vis their complaint form on the same page.

How does the complaint procedure work?
Pursuant to paragraph 94 of resolution 5/1, the Chairperson of the Working Group on Communications, together with the Secretariat, undertake an initial screening of communications based on the admissibility criteria set in paragraphs 85 to 88 of resolution 5/1. Manifestly ill-founded and anonymous communications are screened out. Communications not rejected in the initial screening are transmitted to the State concerned to obtain its views on the allegations of violations. Both the author of a communication and the State concerned are informed of the proceedings at each stage.
Comment: Ugh. Sounds like they transmit the origin of the claim to the state. Wonder how that works out for the typical claimant in a state with a record of actual rights abuses.
Comment: @DVK - There is nothing to see there.  Most claims are admittedly false and libelous lies about the great humanitarian leaders of the middle east, and southeast Asia.  They have agents that are skilled in getting to the truth behind these lies.


Unable to add template to page set as Posts page in WP V 4.6.1

Question: I'm trying to set a template to our blog page which is set as Posts page in WP Admin. The theme is Twenty Fifteen. The issue is that the option Template selector which appears for all other pages under Page attribute menu doesn't appear only on pages set as Posts page. Is this an error tied to this version or theme? There are multiple templates used in this website, but none seems to appear for this page.
Comment: how are you trying to set up the template?
Comment: Template file was created as php files and its already applied to other pages, here's the image of my page settings https://i.stack.imgur.com/lC0Pg.png
Answer: You cannot set a custom template for the latest posts page. This setting is ignored for it. The template that is used for this page is determined by the Template Hierarchy.

So if you start at the left for Blog Posts Index Page you'll see that it uses home.php for its template, if it exists, otherwise it uses index.php.
But if your homepage is set to show the latest posts then front-page.php will be used if that exists.
PS: You're running a 2 year old version of WordPress, and should update as soon as possible.
Comment: Keep in mind, looking at that chart, that index.php could be being used for lots of other types of pages too. So if you want to only change the Posts page, copy index.php to home.php and make the changes there.
Comment: The Front page displays a static page: Home and posts page is set as Blog, so as you suggested I shall edit home.php or index.php and update.

And Yes, the version is too old, its office work and can't risk breaking any existing fx by updating.
Comment: You're risking far worse by not updating. You're 11 security patches behind. At least update to the latest minor release, which is 4.6.12.
Comment: you're right index.php is acting as template for posts page. Thank you.
Answer: If you want to use template file,
you need to write functions.php.
Hook is theme_page_templates.
like this

 * @param array $post_templates Array of page templates. Keys are filenames, values are translated names.
 * @return array Filtered array of page templates.
 */
function makewp_exclude_page_templates($post_templates)
{
  if (version_compare($GLOBALS['wp_version'], '4.7', '<')) {
    unset($post_templates['templates/my-full-width-post-template.php']);
  }
  return $post_templates['page-templates/blog.php'];
}

add_filter('theme_page_templates', 'makewp_exclude_page_templates');


How do I copy the IPv4 IP Address from ipconfig to clipboard?

Question: I want to get the ipv4 192.168.1.* from the ipconfig. I'm learning scripting and want to make an output value message box that displays the ip and copies it to clipboard. I have already done this by using the registry, but that is computer-specific as the adapters are unique per computer. So how do I get the computer to grab the 192.168.1.* for any computer using ipconfig, and copy it to the clipboard?
Comment: Does it has to be by using ipconfig? If you have more than 1 network adapter like Ethernet, Wi-Fi or virtual adapters like for Virtual Machines machines, Teamviewer or VPN there may be more than 1 local IPV4 Address shown in the ipconfig command...
Comment: Which scripting language are you learning?
Answer: ipconfig /all|clip
So the first part is the ipconfig /all command. You already know that one.
Next is a vertical line |, called a pipe. It "pipes" the output of the command to the left of it to another place. clip simply means the clipboard.
Note that not every local IP starts with 192.168..; cool people like me use 10.0.0.*.
If you want just the IP address, and not the rest of the output of the command, please look at the accepted answer over at this question: How do I extract the IPv4 IP Address from the output of ipconfig
I edited that answer a bit so that it does what you want:
@echo off
setlocal
setlocal enabledelayedexpansion
rem throw away everything except the IPv4 address line
for /f "usebackq tokens=*" %%a in (`ipconfig ^| findstr /i "ipv4"`) do (
  rem we have for example "IPv4 Address. . . . . . . . . . . : 192.168.42.78"
  rem split on : and get 2nd token
  for /f delims^=^:^ tokens^=2 %%b in ('echo %%a') do (
    rem we have " 192.168.42.78"
    rem split on . and get 4 tokens (octets)
    for /f "tokens=1-4 delims=." %%c in ("%%b") do (
      set _o1=%%c
      set _o2=%%d
      set _o3=%%e
      set _o4=%%f
      rem strip leading space from first octet
      set _4octet=!_o1:~1!.!_o2!.!_o3!.!_o4!
      echo !_4octet!|clip
      )
    )
  )
rem add additional commands here
endlocal

Credits: DavidPostill
Copy that to a textfile. Rename the file whatever.bat. Doubleclick on it to run it. It is a Batch file.
Comment: Ok, this seems to do the trick! I do have a few questions though. So as I said I'm learning, what does the "rem" line in the bat mean? Also here is one very specific issue with this solution. For at least this computer I'm testing it on, I have assigned myself two IPv4 addresses, this script picks up only the second IPv4 which isn't the actual one in use at the moment. I was just wondering if it's possible to copy both the IPv4 addresses that are assigned. If not that's okay, I only really wanted this script to find the auto-assigned DCHP (if the computer has one of course).
Comment: @SolidSouless Rem is a comment inside the batch. It stands for "Remark" and the batch basically skips all lines that start with Rem. Do you want the IP addresses or DHCP server or both?
Answer: Just open a command prompt:
ipconfig /all.
Then use Mark and Copy feature of Command.
Then copy and now it is on the clipboard.
Screen shots shown.
There is more than necessary - you can just copy the IP address

.

.
I pasted into Notepad to show the result.

Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . .
. . :  IPv4 Address. . . . . . . . . . . : 192.168......(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0 Lease Obtained. . .
. . . . . . . : Tuesday, September 14, 2021 1:20:05 PM Lease Expires .
. . . . . . . . . : Wednesday, September 15, 2021 7:08:24 PM Default
Gateway . . . . . . . . . : 192.168. DHCP Server . . . . . . . . . . .
: 192.168. DHCPv6 IAID . . . . . . . . . . . : 165980064 DHCPv6 Client
DUID. . . . . . . . : 00-01-00-01-22-F6-47-43-54-EE-75-B2-63-DA DNS
Servers . . . . . . . . . . . : 192.168. NetBIOS over Tcpip. . . . . .
. . : Enabled
Comment: I think they want the computer to do it. `So how do I get the computer to grab the 192.168.1.* for any computer using ipconfig, and copy it to the clipboard?`
Comment: I don't think they are asking how to copy paste.
Comment: Just copy - That goes to clipboard.  My paste was just to illustrate.
Answer: As I said before in the comments you can have more than 1 local IP (version 4) depending on how many real or virtual network adapters you have installed and if they are active.
Here is a batch | VBS hybrid that I made that shows the IP addresses of your adapters and then saves it to the clipboard.
Copy the code to notepad and save it to a file with .bat extension...
@echo off
setLocal EnableDelayedExpansion

IF /i exist "MessageBox.vbs" del /q "MessageBox.vbs"
If /i exist "IP.tmp" del /q "IP.tmp"

set "Text1=x=msgbox^("Your local IPV4 Address has been copied to the clipboard:"^& vbCrLf ^& vbCrLf ^&"

For /f "skip=2 delims=" %%a in ('"wmic nicconfig where IPEnabled=True get Description,IPAddress /format:csv"') do for /f "tokens=2,3 delims=,;{" %%b in ("%%~a") do (
                                                                                set /a Counter+=1
                                                                                set IP[!Counter!]=%%b: %%c
                                                                                )
for /L %%a in (1,1,%Counter%) do (
                                  >>"IP.tmp" echo !IP[%%a]!
                                  IF NoT %%a EQU %Counter% (set "Text2=!Text2!"!IP[%%a]!"^& vbCrLf &") else (set "Text2=!Text2!"!IP[%%a]!"^& vbCrLf")
                                 )

>"MessageBox.vbs" echo %Text1%!Text2!,0, "Your Local IP Adresses"^)

type "IP.tmp" |clip
MessageBox.vbs

del /q Messagebox.vbs
del /q "IP.tmp"


Why won't my Canon EOS dRebel recognize a CF card?

Question: My camera (a Canon EOS Rebel XT/350D) shows error cf. I've tried all the suggestions in the manual to fix the problem. I've bought new CF cards. Nothing makes a difference. Any help would be appreciated.
Comment: Can you connect the camera to a computer via USB using Canon's *EOS Utility*?
Comment: do you have a card reader ?  does the cards disc image mount when you put the card in the reader and connect it to you computer ?  can you extract any files on the card and erase the card.
Answer: My guess is that you have a broken/bent pin in the CF card slot.  Given that the Rebel XT/350D was introduced in 2005, and that any copy you have is liable to be well over a decade old. That's really old in dSLR terms. And that CF card slot has a lot of small delicate pins in them that can easily be damaged by carelessly jamming something into the slot, or even simply mis-seating the card.
I'd suggest inspecting the slot with a flashlight to determine whether or not there's any physical damage. If there is, then it's probably time to consider getting a new camera, as servicing the camera is likely to cost far more than the camera is worth, given that a service call to Canon tends to flat rate around US$300, and a used XT goes for less than US$150 these days.
Comment: I still have one of these (as a spare which I keep in work) , and I take chances with it that I wouldn't with something that still had value. So if *I* spotted a bent pin I'd try to get in and fix it. I might even open it up if I couldn't see a bent pin, in the basis of nothing to lose.
Comment: @ChrisH A bent pin, yeah. A broken or *damaged* pin, not so much. And everybody's tolerance for tiny screws is different.
Comment: Luckily I've never damaged a pin in the camera, but I've bent a few in card readers etc. and never broken one off. I'd even try fitting a new connector if I could get one cheap (though I'd use that as an excuse to upgrade my soldering kit)
Comment: A credit card cut lengthwise to make it thin enough will fit into the slot and between the rows of pins. I've repaired a handful of CF point and shoots that way (tells you how long ago it was.) The tool goes on the outside of either row and in the middle. I start with where the bent pin is facing then among the other spaces, "massaging" the pins straight. If the pin is bent too far over you'll need to open the camera. In one extreme case I actually broke the pin out of the camera and jammed a bit of wire into the opposite hole on the card. This is very much a bad idea but it saved the shoot.
Answer: I removed the card from its place inside the camera. Using my household vacuum hose I ran it across the holes of the card. I put the card back in the slot, turned the camera on and it continues to work as if it was new. It's worth a try at this point. Too expensive to have my local camera shop look at it with a $100 base look at it bench charge.


Is there exists a set which contains as elements all its finite subsets?

Question: Is there exists a set $A$ such that if $F$ is a finite subset of A, then $F\in A$?  Under ZFC axiom system.
I guess the answer may not, but I'm not sure yet.
Any help or hint will be appreciated, thanks!
Comment: Your question's title and your actual question seem to be different. In your question you ask whether there exists a set $\;A\;$ which contains *as elements* all its finite subsets. That's different from what is written in the title, so: which one do you want and what have you done so far about that?
Comment: @DonAntonio Yes, Antonio, I mean it contains as elements all its finite subsets. I edit title right now. Thanks!
Answer: There are such sets, an example is $V_\omega$, the set of all sets which are hereditarily finite, meaning that $x\in V_\omega$ if and only if $x$ is finite, all elements of $x$ are finite, all elements of all elements of $x$ are finite, and so on.
If $y\subseteq V_\omega$ is finite, this means that for every $x\in y$ we have $x\in V_\omega$, that is elements of $y$ are hereditarily finite sets. Since $y$ is finite this means that $y$ itself is an hereditarily finite set, hence $y\in V_\omega$.
More generally let $\mathcal P_{\mathrm{fin}}(X)$ denote the set of all finite subsets of $X$ and let $\mathcal P^n_{\mathrm{fin}}(X)=\mathcal P_{\mathrm{fin}}(\mathcal P^{n-1}_{\mathrm{fin}}(X))$, where $\mathcal P^0_{\mathrm{fin}}(X)=X$ by convention. Then $\bigcup_{n\in\Bbb N}\mathcal P^n_{\mathrm{fin}}(X)$ is a set with the desired property regardless of $X$.
Comment: Thanks, Codenotti. By the last paragraph, if we replace "finite subsets" with "subsets whose cardinal are $\kappa$, the same claim is also true. Am I right?
Comment: This construction looks like it's the Kleene star operation on some monoid. I can't quite pin down what that monoid would be, though.


Installing Language Filter and Language Code system plugins

Question: I have a Joomla website (which I didn't install myself) that seems to be lacking the system plugins "Language Filter" and "Language Code". It seems like it wasn't installed as a multi-language site in the first place (I assume) so that might explain why these two plugins are missing (or maybe that I just fail to find them).
My question is : how can I install these two plugins on an existing Joomla website ?
I am using Joomla 3.8.7
Thank you.
Answer: Ok my bad, they were installed. I failed to find them because their names were translated into French in the administration panel...
Comment: Please accept your own answer as the solution by clicking on the tick icon under the downvote icon so others can see that this question is resolved. Thank-you.


Wish vs Hope…..Can a wish be obtainable or can only be impossible dream

Question: I have an issue with lesson explanation & example of 'wish' & 'hope'.
The explanation put forward as I understand it states wish is unobtainable & refers to past tense whereas hope is achievable & refers to future/present tense.
It then goes on to give an example sentence for wish 'I wish I was a Dr' now here is where my confusion lies. Surely wishing to be a Dr is obtainable if correct steps are taken ie. study, experience etc where the final outcome is obtaining qualifications. Your wish has become a reality…… yet in the explanation text it is stated wish is not obtainable. What am I missing here or is the text incorrect in the use of this example?
Comment: Not everybody can be a doctor. Even if you have the time and money it requires innate abilities. If you were a bright, middle-class child anticipating a career you would say "I hope to be a doctor"; if you were a middle-aged hospital orderly struggling to get by and with no prospect of taking 10 years off work to obtain the various exams and become a well-paid doctor, you might say "I wish I was a doctor". (It might be clearer if it was "I wish I was king" or pope, although technically it's possible to achieve either, with a big enough army or enough study and prayer.)
Answer: What the book says is only partly true, and not stated as well as it could be.
"Hope" is about things that are possible or likely, and "wish" is about things that are impossible or unlikely. Both words can be about past, present or future, without restriction.
If you're familiar with the difference between real and unreal conditionals, the difference between "hope" and "wish" is the same.
If I say, "If I were a doctor, I'd have a summer home in Switzerland" we understand that I'm not a doctor and I don't have a summer home in Switzerland. Same goes for "I wish I was a doctor." It just means I'm not a doctor. It doesn't mean it's impossible for me to become one, just that I'm not one right now. For instance, a medical student could say, "I wish I was a doctor (already)" because they simply aren't one yet.
While we use "wish" more about the past and present, and "hope" more about the future, it's not a rule. Here are some examples to make it clear there are no time restrictions for "hope" or "wish":

I hope Joan remembered to do the groceries. ("hope" + past)
I hope there's food in the fridge. ("hope" + present)
I hope Mark does well in his interview. ("hope" + future)

I wish I had bought a better present. ("wish" + past)
I wish I had more money. ("wish" + present)
I wish my landlord would stop bugging me for the rent. ("wish" + future)
Comment: I would say that "wish" is used more for things that the speaker can't control, while "hope" is for those that can take some input.
Comment: @SoronelHaetir Do you think my three examples of "hope" are wrong then? The speaker has no control or input in the outcome.
Comment: Don't forget that you can also wish someone a happy birthday, good luck etc. - not impossible or unlikely, just an expression of your goodwill towards them.
Comment: "I wish my landlord would stop bugging me for the rent" and "I hope my landlord will stop bugging me for the rent" basically express the same sentiment.
Comment: I wish to point out that "wish" is not only about things that are impossible or unlikely.
Comment: @gotube: No, I was simply intending to provide a different axis than likely/unlikely.
Comment: @barbecue I disagree. The first means you know they're never going to stop. The second means there's some chance they'll stop.
Answer: There is a grammatical difference.

I hope (that) I (will) pass the test.

I wish for a pony

Note that "hope" takes a finite clause, in the present tense (or future) as its complement. This content clause can have the conjunction "that", but it's optional.
On the other hand "wish" (used in this way) has a prepositional phrase, typically "for ...".  In these cases the item that you wish for is generally considered to be unobtainable by normal means. If it can be obtained you don't "wish for" it, you just "want" it.
Incorrect grammar produces many non-idiomatic expressions like "I wish you pass the test".
Now, wish also has a different meaning, with a past tense clause, expressing an unreal condition.

I wish I owned a bike.  (I don't own a bike)

I wish he would be quiet.  (He won't be quiet)

I wish I had read the instructions.  (I didn't read the instructions)

Note the use of the past tense to express an unreal condition, so to talk a about past unreal conditions, the past perfect is needed.
This refers to present unreal conditions, it doesn't mean that the condition is unobtainable.

I wish I owned a bike, and I hope that I get a bike for my birthday.

I wish I was a doctor.  (I'm not a doctor now, but I might be in the future)

You also use "wish" in various idiomatic expressions "I wish you good luck" and both "wish" and "hope" can be used as nouns
Understanding the different meanings of wish, and their different grammar avoids the errors that learners often make with these words. You must recognise that the grammar rules and meanings probably differ from the similar words in other languages, so word-by-word translation is often incorrect.


X-rated capacitors required for DC input voltage circuits

Question: In my project I am using 12V DC from external power supply and EUT will load max 2A; in which I am using EMI EMC filter.
I have considered Input MOV's for common mode and differential modes, differential noise filter, common mode choke. Can I need to use X capacitor too my circuit to comply the EMI EMC testing??
If yes how I can calculate capacitor value?
Answer: X-type capacitors are designed to be across an AC line and they are tested and manufactured to more stringent requirements in order that they do not short out the AC, take plenty of amps and cause a fire.
This is unlike (say) ceramic caps - once they break down they can go short circuit and you get a fire if the power source is fairly unlimited (like an AC line)!
If your external supply is 12V DC and can only supply a current of a few amps then I don't see the need to use X-type capacitors - basic ceramic types of 25 V rating with a decent dielectric will do the job and probably better in terms of reducing EMI.
Regards the calculation of a value, there is no information in the question to solve this.
Comment: Hi Andy aka, Thanks for your answere and clarifying my questions.
Comment: @ Andy aka we have selected 4.7uF/50V capacitor; now need to go for pre complaints testing. I have concern for Damped oscillatory testing both slow and fast damped oscillatory testing as per EN61000-4-18. Will selected ceramic 4.7uF/50V capacitor pre complaints pass ?? or need to go back for X rated capacitor with higher voltage ?? I assume the damped oscillatory wave should be sine oscillation ??
Comment: This is all beyond the scope of your original question.
Comment: Yes you're correct; Now we are trying to qualify the product for pre complaints testing as per requirement; Since i am seeking your advice to go further.
Comment: Please raise this as a new question if you are happy that the original question has been adequately answered (requires acceptance of the answer).
Comment: You need to provide more information about the test, voltage levels, frequency, rise time, etc


tADA not reflecting in wallet after funds request with faucet

Question: As hinted by the title, I've requested 1000 tAda from the faucet and according to what's here the funds is in the wallet.
But when I query the address on my testnet, it returns no result.
What am I possibly missing?
Comment: If one of the output address matches your wallet address, then most probably your node is not fully synchronised.
Answer: I had this happen yesterday and been troubleshooting since. Turned out my node was technically "synced" but spitting out errors in the log. (above 90%) I have a question out there about the error but have a hunch its because I need to update the cli/node to the latest verified release. Which I'm doing now. Below I outline a method you can use to run and verify your node is running properly. Pre-reqs is you already have the node dependencies installed as outlined in the dev portal.
If you want to see the logs I use nohup and "&" to run the node in the background (On linux, I'm running Debian). I put my cardano-node command in a script like this and name the file run-node.sh
#!/bin/bash

cardano-node run \
   --topology $YOURPATH/cardano/testnet-topology.json \
   --database-path $YOURPATH/cardano/db \
   --socket-path $YOURPATH/cardano/db/node.socket \
   --host-addr 0.0.0.0 \
   --port 1337 \
   --config $YOURPATH/cardano/testnet-config.json

Then you make sure the file is executable by running
chmod +x ./run-node.sh

Then you can run your script and get logs using this command...
nohup ./run-node.sh &

Then you can just run the following to check the logs and verify if there are any errors. (Ctrl-C to exit)
tail -f nohup.out

Oh and if you want to kill that process you can run
ps -aux

which will lay out all your processes. Use the PID of your cardano-node command and kill the process. Simple way to do that is to run
kill -9 $YOUR_PROCESS_PID

Sorry if this answer is a little overkill.
Comment: For anyone wondering, this problem did resolve itself after I updated the node and CLI to the latest verified release.
Answer: First thing to do is look up the transaction on the testnet explorer.
https://explorer.cardano-testnet.iohkdev.io/en.html
It should have given you the transaction id from the faucet after you made the tAda request.
If you find that transaction on the explorer, it should tell you how many
confirmations have been completed. 30 confirmations are required for a transaction to be fully processed. Only then will the UTxO show up in your wallet.
If there have been 30 confirmations, then you can lookup your wallet address on the explorer and see if it has been updated.
If you can see the UTxO in your wallet on the explorer, then it should be queryable with cardano-cli, as long as your node is synced. At this point, if you can't see the UTxO in your wallet using the cardano-cli after a few minutes, then it means there is a problem with your node.
If there is a problem with your node, then make sure you are using the correct version. The testnet currently requires cardano-node v1.30.1
You can check which version you are running by typing cardano-node --version from the bash shell.
Answer: Just in case, are you querying the right testnet?

testnet explorer https://explorer.cardano-testnet.iohkdev.io/
alonzo purple explorer: https://explorer.alonzo-purple.dev.cardano.org/en.html

If you are following alonzo-testnet program, maybe you are not querying the right testnet.


Issues with mysql enterprise backup, assertion failure on restore

Question: I'm trying to restore a backup to a new server, but having some issues with corruption. The source server has a 2.5T table which is very active. I copied the latest backup over to a new server and restored it, but I'm getting an assertion error at the end of the restore.
The db will start up but I'll continually get those innodb errors about the logs being in the future.
I know the answer for a corrupt db, or forcing recovery, is usually dump and restore. That's really not possible on on 2.5T table and I'm wondering why I'm getting these errors on a supposedly "successful" backup.
MySQL Enterprise Backup version 3.12.0 Linux-3.8.13-16.2.1.el6uek.x86_64-x86_64 [2015/03/10]
Copyright (c) 2003, 2015, Oracle and/or its affiliates. All Rights Reserved.

mysqlbackup: INFO: Starting with following command line ...
mysqlbackup --defaults-file=/etc/my.cnf
    --backup-dir=/transfer/radius_backup_08132015.01.30.01.375562935
    copy-back-and-apply-log

mysqlbackup: INFO:
IMPORTANT: Please check that mysqlbackup run completes successfully.
       At the end of a successful 'copy-back-and-apply-log' run mysqlbackup
       prints "mysqlbackup completed OK!".

150819 16:00:53 mysqlbackup: INFO: MEB logfile created at /transfer/radius_backup_08132015.01.30.01.375562935/meta/MEB_2015-08-19.16-00-53_copy_back_dir_to_datadir.log

 mysqlbackup: WARNING: If you restore to a server of a different version, the innodb_data_file_path parameter might have a different default. In that case you need to add 'innodb_data_file_path=ibdata1:12M:autoextend' to the target server configuration.
mysqlbackup: WARNING: If you restore to a server of a different version, the innodb_log_files_in_group parameter might have a different default. In that case you need to add 'innodb_log_files_in_group=2' to the target server configuration.
--------------------------------------------------------------------
                   Server Repository Options:
--------------------------------------------------------------------
datadir = /mysqldata/mysql
innodb_data_home_dir = /mysqldata/mysql
innodb_data_file_path = ibdata1:12M:autoextend
innodb_log_group_home_dir = /mysqldata/mysql
innodb_log_files_in_group = 2
innodb_log_file_size = 128MB
innodb_page_size = Null
innodb_checksum_algorithm = innodb

--------------------------------------------------------------------
                        Backup Config Options:
--------------------------------------------------------------------
datadir = /transfer/radius_backup_08132015.01.30.01.375562935/datadir
innodb_data_home_dir = /transfer/radius_backup_08132015.01.30.01.375562935/datadir
innodb_data_file_path = ibdata1:12M:autoextend
innodb_log_group_home_dir = /transfer/radius_backup_08132015.01.30.01.375562935/datadir
innodb_log_files_in_group = 2
innodb_log_file_size = 134217728
innodb_page_size = 16384
innodb_checksum_algorithm = innodb

mysqlbackup: INFO: Creating 14 buffers each of size 16777216.
150819 16:00:53 mysqlbackup: INFO: Copy-back-and-apply-log operation starts with following threads
            1 read-threads    1 write-threads
mysqlbackup: INFO: Could not find binlog index file. binlogs will not be copied for this backup.
Point-In-Time-Recovery will not be possible.
If this is online backup then server may not have started with --log-bin.
You may specify its location with --log-bin-index option.
150819 16:00:53 mysqlbackup: INFO: Copying /transfer/radius_backup_08132015.01.30.01.375562935/datadir/ibdata1.
150819 16:00:53 mysqlbackup: INFO: Copying /transfer/radius_backup_08132015.01.30.01.375562935/datadir/mysql/innodb_index_stats.ibd.
150819 16:00:54 mysqlbackup: INFO: Copying /transfer/radius_backup_08132015.01.30.01.375562935/datadir/mysql/innodb_table_stats.ibd.
150819 16:00:54 mysqlbackup: INFO: Copying /transfer/radius_backup_08132015.01.30.01.375562935/datadir/mysql/slave_master_info.ibd.
150819 16:00:54 mysqlbackup: INFO: Copying /transfer/radius_backup_08132015.01.30.01.375562935/datadir/mysql/slave_relay_log_info.ibd.
150819 16:00:54 mysqlbackup: INFO: Copying /transfer/radius_backup_08132015.01.30.01.375562935/datadir/mysql/slave_worker_info.ibd.
150819 16:00:54 mysqlbackup: INFO: Copying /transfer/radius_backup_08132015.01.30.01.375562935/datadir/percona/checksums.ibd.
150819 16:00:54 mysqlbackup: INFO: Copying /transfer/radius_backup_08132015.01.30.01.375562935/datadir/radius/cui.ibd.
150819 16:00:54 mysqlbackup: INFO: Copying /transfer/radius_backup_08132015.01.30.01.375562935/datadir/radius/nas.ibd.
150819 16:00:54 mysqlbackup: INFO: Copying /transfer/radius_backup_08132015.01.30.01.375562935/datadir/radius/radacct.ibd.
mysqlbackup: Progress in MB: 200 400 600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 3200 3400

 <snip>

150820 00:54:37 mysqlbackup: INFO: Copying the database directory 'mysql'
150820 00:54:37 mysqlbackup: INFO: Copying the database directory 'percona'
150820 00:54:37 mysqlbackup: INFO: Copying the database directory 'radius'
150820 00:54:37 mysqlbackup: INFO: Completing the copy of all non-innodb files.
150820 00:54:38 mysqlbackup: INFO: Creating server config files server-my.cnf and server-all.cnf in /mysqldata/mysql
150820 00:54:38 mysqlbackup: INFO: Copy-back operation completed successfully.
mysqlbackup: INFO: Creating 14 buffers each of size 65536.
150820 00:54:38      mysqlbackup: INFO: Apply-log operation starts with following threads
1 read-threads    1 process-threads
mysqlbackup: INFO: Using up to 100 MB of memory.
    150820 00:54:38 mysqlbackup: INFO: ibbackup_logfile's creation parameters:
      start lsn 10489797849600, end lsn 10500114427565,
      start checkpoint 10489797849969.
InnoDB: Doing recovery: scanned up to log sequence number 10489803092480
 InnoDB: Doing recovery: scanned up to log sequence number 10489808335360
      InnoDB: Doing recovery: scanned up to log sequence number 10489813578240
InnoDB: Doing recovery: scanned up to log sequence number 10489818821120
InnoDB: Doing recovery: scanned up to log sequence number 10489824064000
InnoDB: Doing recovery: scanned up to log sequence number 10489829306880
InnoDB: Doing recovery: scanned up to log sequence number 10489834549760
mysqlbackup: INFO: InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 2015-08-20     00:54:53 7f9356014700  InnoDB: Assertion failure in file /export/home/pb2/build_bi/sb_7-14661950-1425966633.09/mysql/storage/innobase/page/page0zip.cc line 4236
InnoDB: Failing assertion: slot
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.

After mysql starts up, the error log will fill up with the error below, but I can get into mysql and query all tables.
2015-08-20 16:53:10 7f297ffff700 InnoDB: Error: page 409 log sequence number 10487836334381
InnoDB: is in the future! Current system log sequence number 1630346.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files.

Here is the mysqlbackup command we use, it's in a script which is why there are variables everywhere.
mysqlbackup --defaults-file=/etc/my.cnf --user=$user -p${password} --databases=radius --backup-dir=${dir}/${database_name}/${database_name}_backup_$date --socket=/var/lib/mysql/mysql.sock --port=3306 backup --compress --compress-level=5 2>  $dir/${BACKUP_LOG}/Error_${database_name}_DB_Backup${dstr1}.log

And here is the command I used to restore it.
mysqlbackup --defaults-file=<my.cnf> -uroot --backup-dir=<backupDir> --uncompress copy-back-and-apply-log

On a side note, should I increase the innodb_log_file_size? It's currently at 128M and I figured out it's writing almost 50M a minute to the log file. We had an issue last weekend where the backup failed with the error below.
I was thinking about increasing it to 1024M??
mysqlbackup: ERROR: Log scan was only able to reach 10572453925888,
      but a checkpoint was at 10572582184834.
      This means that the database server has overwritten
      a part of the circular InnoDB log files before ibbackup
      was able to read it.
      To solve this problem either:
      1) re-run the backup when the database has less load, or
      2) re-configure the database with bigger InnoDB log files.

mysqlbackup failed with errors!

Thanks for any help and sorry for the long post!
Comment: Since you paid for Enterprise, won't Oracle give you any help?
Comment: It is quite reasonable to increase innodb_log_file_size to 1024.  This assumes you did not do a "fast shutdown" and still need what is in the logs.
Comment: Try [Percona's XtraBackup](https://www.percona.com/software/mysql-database/percona-xtrabackup) - it's free and Percona have a stellar reputation. It's only hot for InnoDB though - not for  [MyISAM](https://www.percona.com/doc/percona-xtrabackup/2.2/faq.html).
Answer: I have this issue as well. I have found it related to the global variable old_alter_table being turned on by mysqlbackup. This happens only with our created backup account. If I have the problem and run the backup as root, I have found I don't have to bounce the database.


How do I set up an OpenGL programming environment?

Question: I want to setup openGL programming environment on ubuntu. What packages or tools I should install and what is the best way of getting into openGL as a newbie.
Comment: What language would you prefer?
Comment: Please click [edit] and then update your question to specify the programming language you wish to use. OpenGL https://en.wikipedia.org/wiki/OpenGL is not a language, and you need to specify one.
Answer: As far as I know OpenGL is a graphics library. The IDE choice depends on the language you want use OpenGL in.
Anjuta is a perfect IDE for C and C++
sudo apt-get install anjuta

then you have to download OpenGL library:
sudo apt-get install freeglut3 freeglut3-dev libglew1.5 libglew1.5-dev libglu1-mesa libglu1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev

after that you should include libraries (in folder gl/*) into your code
Comment: +1. GLUT is what we learned on for graphics at uni. Fairly standard C bindings and there's lots of documentation.
Answer: StackOverflow is a better place for programming related questions, check
https://stackoverflow.com/questions/859501/learning-opengl-in-ubuntu
Comment: Ironically, the question you linked to was closed as off-topic. ;)


OpenGL 4 hidden line removal

Question: I'm having trouble with hidden line removal in OpenGL 4. I use a vertex/geometry/fragment shader to draw the lines. I call
<code>glDepthRange(0.01, 1.0);
</code>
before I draw the lines, and it works, sort of. Attached is a screenshot. Is there a better method? I tried other methods, but they all suffer from the limitation that lines are stuck at 1 pixel wide.
What happens is that I draw the filled triangles, then I draw over top of that with lines (3 lines per triangle, one per edge). These edges show up when the view angle is almost parallel to the surface.
I don't want the black lines showing up.
Please let me know if you wish for more code.
Answer: It is heuristically derived that one must call glDepthRange(0.1, 1.0) before drawing the game board, and glDepthRange(0.01, 1.0) before drawing the character. Thanks to DMGregory for guidance.

OpenGL 4 hidden line removal


What polarizes a rainbow?

Question: What polarizes the light from a rainbow. I already did some search and couldn't get a clear answer. All I could find was the light is polarized on the direction light is entering. What happens to the remaining light? Or more specifically, if an light polarized perpendicular to this direction, enters a medium of different density does it gets refracted, or it passes through as it is or gets blocked completely?
Comment: When light is reflected (at any angle other than 90º) from an air-water surface the coefficient of reflection (and therefore transmission as well) is different for light polarised parallel and perpendicular to the surface. That's why polarised sunglasses can remove some of the reflections from lakes or the sea. exactly how it happens for rainbows I don't know, but since a rainbow is formed when light is scattered by water droplets it seems reasonable that some polatisation will result.
Comment: @JohnRennie yes the varying coefficient of reflection answers it. The answer by vaaaal also gives the explanation for this.
Answer: In the case of rain droplets, where the size of the drop is much larger than the wavelength of visible light, the effects you see can be described in terms of the familiar concepts of refraction, reflection and diffraction. The rainbow is generated by different colors being refracted at slightly different angles as they enter the drop, reflecting off the back of the drop and then being refracted again as they exit the drop (see this diagram). The reflection part of this is what leads to the polarization of the rainbow. When light transitions between two optically different mediums some of the light is transmitted and some is reflected, with the polarization component parallel to the surface being more strongly reflected (see this diagram). This leads to a preference for one polarization orientation for the light leaving the back of the drop and a preference for an orthogonal orientation for the light passing through the drop.
If you are wondering why there is a preferred polarization I would suggest you look into Fresnell's Eqautions but conceptually the idea is basically just that the polarization component parallel to the surface interacts the least with the medium.
Comment: I think the fact of having varying reflection coefficients from Fresnell's equation explains the polarization.
Answer: The first diagram red vaaaal listed, unfortunately, is one of the leading causes of misunderstanding how rainbows are formed. It isn't wrong, but it suggests that red light is deflected exclusively at 42°, and that each color has its own exclusive angle.
But it is easy to see, if you look, that light that is originally headed straight for the center of the drop will not have the colors separate, and will deflect at 0°. And that the light between the centered ray, and the one shown, can have red light deflected at any angle between 0° and 42°.
What actually causes the rainbow, is that there are more incident rays that produce deflected red rays near 42° than any other deflected angle. The fact that violet is above red in the diagram is not relevant; the fact that violet has its similar maximum concentration at 40° is what is relevant.
What polarizes the light in the colored arc of the rainbow, is that the internal reflection angles where this concentration occurs also happens, by coincidence, to be close to Brewster's Angle. That's where only perpendicularly polarized light reflects.

What polarizes a rainbow?


Examples of inequality implied by equality.

Question: It is well known Cauchy's inequality is implied by Lagrange's identity. Bohr's inequality  $|a -b|^2 \le p|a|^2 +q|b|^2$, where $\frac{1}{p}+\frac{1}{q}=1$, is implied by $|a -b|^2 +|\sqrt{p/q}a+\sqrt{q/p}b|^2= p|a|^2 +q|b|^2$. L.K Hua's determinant inequality $\det(I-A^*A)\cdot \det(I-B^*B)\le |\det(I-A^*B)|^2$ is implied by Hua's matrix equality $(I-B^*B)-(I-B^*A)(I-A^*A)^{-1}(I-A^*B)=-(A-B)^*(I-AA^*)(A-B)$. What other examples can be found?
Comment: This should be community wiki.
Comment: For polynomial inequalities there is Hilbert's 17th problem: http://en.wikipedia.org/wiki/Hilbert%27s_seventeenth_problem
Comment: In view of Harald's comment, maybe it is also interesting to ask for examples of inequalities which are not implied by equalities.
Comment: IMHO, one of the greatest inequalities is the Jensen´s one. Lots of inequalities follow from it. But is it implied by any equality?
Comment: It's hard to formalize Pete's question, since if A is always at most B then B-A=C for some C that is always non-negative. One needs a notion of "obviously non-negative", which is often provided by a number's being a sum of squares.
Comment: @ex-falso: I would tend to agree that Jensens's inequality is a kind of Ur-inequality, from which many others follow. Searching for a derivation based on an equality, consider the following. Every convex function $c$ can be written as a supremum of some affine functions $c=\sup a$, hence, for every random variable $X$, $E(c(X))=E(\sup a(X))$ (this is the equality). (to be cont'ed)
Comment: @ex-falso: The expectation of a supremum is at least each of the expectations considered, hence $E(\sup a(X))\ge\sup E(a(X))$. Now, each function $a$ is affine, hence $E(a(X))=a(E(X))$, and we are done because $\sup a(E(X))=c(E(X))$, which implies that $E(c(X))\ge c(E(X))$ (this is the inequality).
Comment: I have heard it said that for every inequality there is an equality rendering the inequality obvious. But I don't know who said it.
Comment: @gowers: I agree, it is somewhat subtle.  I was thinking for instance of Taylor's theorem with remainder, where the remainder is given "exactly", but completely inexplicitly: in all the applications I have ever seen, the corresponding inequality that you get by replacing the (n+1)st derivative at the unknown point by ||f^{n+1}||
is what is actually used.  Nevertheless, formalization aside, I think the question is interesting and nontrivial.  I agree that how you know that $C$ is non-negative is a key point here.
Comment: @ex-falso: Based on your comment, I find that examples can be found more easily in the discrete case.
Answer: Lots of number theoretic inequalities are to be had from the binomial theorem. I remember reading the below argument as part of Erdos's proof of Bertrand's postulate:
Suppose that $n$ is a positive integer, then we have
$$4^n = (1 + 1)^{2n} = {\sum_{j=0}^{2n}}{2n\choose{j}}.$$
Thus, since $ 2n\choose{n}$ is the maximum value of the sequence $({2n\choose{k}})$, we conclude that
$$ 4^n < (2n + 1){2n\choose{n}}.$$
I thought it was neat.
Answer: Here are two very elementary examples.
It's not 100% different from your Cauchy's inequality example, but the fact that if X is a random variable, then $(\mathbb{E}X)^2\leq\mathbb{E}X^2$ is very useful and follows from the fact that the difference equals the variance of X.
The fact that $|\cos x|\leq 1$ and $|\sin x|\leq 1$ follows from the fact that $\cos^2x+\sin^2x=1$.
Comment: Yes, that's what I meant.
Comment: Your second example is restricted in real field. My examples are also true in complex field.
Comment: Isn't your first example Cauchy's inequality applied to the scalar product on $L^2$ of the probability space?
Comment: It's Cauchy-Schwarz applied to the scalar product of X and the constant function 1.
Answer: In an arbitrary triangle whose circumcircle has radius $R$ and center $O$ and whose inscribed circle has radius $r$ and center $I$, we have Euler's inequality
$$R\geq 2r$$
This follows from the equality
$$|IO|^2=R(R-2r)$$
(There are many examples in Euclidean geometry, I think Ptolemy's inequality follows from an equality but I can't remember at the moment)
Answer: After A1 from the 1968 Putnam:
$$\frac {22}7 - \pi = \int_0^1 \frac{x^4(1-x)^4}{1+x^2}dx \gt 0$$
Integral proofs that $355/113 \gt \pi$.
I expect that there should be a proof of Jensen's inequality as an integral of a nonnegative quantity.
Comment: @miwalin The idea is to construct an analogous integral of something which is obviously positive which has the value $355/113-\pi.$ A few examples were given in the paper linked. Given such an integral, we can compute better estimates for $\pi$ using rigorous numerical integration techniques. For example, we can use Simpson's Rule whose error is bounded by the magnitude of the 4th derivative of the integrand on the interval, and we can bound that. @Pete Yes, the problems on that competition seem particularly nice, although that's subjective.
Comment: Since the link in the answer no longer works, here is [Internet Archive snapshot from 2010](http://web.archive.org/web/20100612195418/http://www.math.jmu.edu/~lucassk/Papers/intpi.pdf). It seems that some copies of the paper can be found online - [Google](https://www.google.com/search?q=lucas+Integral+proofs+that), [Google Scholar](https://scholar.google.com/scholar?hl=en&q=lucas+Integral+proofs+that) - perhaps at least some of these links will last.
Comment: Your equality cannot imply $355/113>\pi$, because 22/7 = 3.1429, 355/113 = 3.1416
Comment: +1: Cool!  I'm no Putnam connoisseur (on the contrary), but the 1968 specimen looks to be much more interesting than usual.  Can anyone confirm/deny this?
Answer: Over real-closed fields such as $\langle \mathbb{R}, +, *, -, <, 0, 1 \rangle$, there is an interesting simple answer: every polynomial inequality is equivalent to a projected equation.  E.g.,
 Given $p_1, p_2 \in \mathbb{Q}[\vec{x}]$ we have $\left( p_1 > p_2 \ \iff \ \exists z \text{ s.t. } z^2(p_1 - p_2) - 1 = 0 \right),$ and $\left( p_1 \geq p_2 \ \iff \ \exists z \text{ s.t. } p_1 - p_2 - z^2 = 0 \right).$
Geometrically, this is the simple observation that every semialgebraic set defined as the set of $n-$dimensional real vectors satisfying an inequality is the projection of an $n+1$-dimensional real-algebraic variety defined by a single equation.  Semialgebraic sets defined by boolean combinations of equations and inequalities can be similarly encoded as the set of satisfying real vectors of (an) equation(s) by using the Rabinowitsch encoding $(p_1 = 0 \vee p_2 = 0 \ \iff p_1p_2 = 0)$ and $(p_1 = 0 \wedge p_2 = 0 \ \iff p_1^2 + p_2^2 = 0).$
Combining the above two observations, one obtains the fact that every semi-algebraic set $S \subseteq \mathbb{R}^n$ is the projection of a real algebraic variety $V \subseteq \mathbb{R}^{n+k}$, where $k$ is the number of inequality symbols appearing in the defining Tarski formula for $S$.  In fact, due to a construction of Motzkin [``The Real Solution Set of a System of Algebraic Inequalities is the Projection of a Hypersurface in One More Dimension,'' Inequalities II, O. Shisha, ed., 251-254, Academic Press (1970)], it is known that every such $S$ is in fact the projection of a real-algebraic variety in $\mathbb{R}^{n+1}$.
Answer: Two examples due to Hurwitz.

The AM-GM inequality.
For the function $f=f(x_1,x_2,\dots,x_n)$ let $Pf(x_1,x_2,\dots,x_n)$ denote the sum of $f$ over the $n!$ quantities that result from all possible $n!$ permutations of the $x_i$. Then
$$\frac{x_1^n+x_2^n+\dots+x_n^n}{n}-x_1x_2\dots x_n=\frac{1}{2\ n!}(\phi_1+\phi_2+
\dots \phi_n),$$
where
$$\phi_k=P[(x_1^{n-k}-x_2^{n-k})(x_1-x_2)x_3x_4\dots x_{k+1}]=P[(x_1-x_2)^2(x_1^{n-k-1}+\dots x_2^{n-k-1})x_3x_4\dots x_{k+1}]\geq0.$$
The proof can be found in Inequalities by Beckenbach and Bellman.
The isoperimetric inequality. Let the boundary of $\Omega\subset \mathbb R^2$ be a rectifiable Jordan curve $\partial \Omega=\{((x(s),y(s))|\ s\in[0,2\pi))\}$. Then
$$L^2-4\pi A=2\pi^2\sum\limits_{n=1}^{\infty}\left[(na_n-d_n)^2+(nb_n+c_n)^2+
(n^2-1)(c_n^2+d_n^2)\right],$$
where
$$x(s)=\sum\limits_{n=0}^{\infty}(a_n\cos ns+b_n\sin ns),\quad  y(s)=\sum\limits_{n=0}^{\infty}(c_n\cos ns+d_n\sin ns).$$
Comment: Very interesting. This is not included in Hardy, Littlewood and Polya's 'Inequalities'.
Answer: Another "Hilbertian" example: Bessel's inequality follows from Bessel's equality. See, e.g., http://www.math.uri.edu/~quinn/web/mth629_Bessels.pdf.
And now (maybe off-topic, but the question is rather vague) an example of an inequality derived via an identity:
The (simple) identity is the so-called "multiplication of means", roughly: the expectation of a product of independent random variables equals the product of their
expectations.
The (not so simple) inequality is the Grothendieck one: http://www.ams.org/proc/1987-100-01/S0002-9939-1987-0883401-0/S0002-9939-1987-0883401-0.pdf.
(Well, it is not obtained from that identity in an obvious and direct way, but the identity is an essential ingredient in the proof.)
Comment: Bessel's inequality is also implied by Parseval's identity (given an orthonormal set, extend it to an orthonormal basis, apply Parseval, and throw away the unwanted terms).
Answer: Here are some more elementary examples.

The easier cases of the AM-GM inequality follow from equalities, namely $a^2+b^2\geq 2ab$ because $a^2+b^2-2ab=(a-b)^2$ and $\frac{a^3+b^3+c^3}{3}\geq abc$ for $a,b,c\geq 0$ because $a^3+b^3+c^3-3abc=\frac{1}{2}(a+b+c)((a-b)^2+(b-c)^2+(c-a)^2)$.
We have that for any triangle ABC the point X that minimizes $AX^2+BX^2+CX^2$ is the centroid G because of Leibniz's relation $AX^2+BX^2+CX^2=AG^2+BG^2+CG^2+3XG^2$.
Comment: The second one is nice, while the first one is too elementary.


What does $V(r)$ mean in the Schrodinger equation?

Question: The Schrodinger equation:
$$-\frac{\hbar^2}{2m}\nabla^2\Psi(r)+V(r)\Psi(r)=E\Psi(r)$$
$$\textit{kinetic energy} + \textit{potential energy}=\textit{total energy}$$
Is one of my favourite equations, but there's one term I don't understand: the  $V(r)$ term which is supposed to mean potential energy... but what type of potential energy? In the classic 0 potential well example they say that the potential out side the well is infinite but what type of potential energy are they talking about? I googled it and its also called Bohm quantum potential but I really don't get what it means. Anything would be a great help.
Comment: Hi and welcome to physics.SE! Please [do not post images of texts you want to quote](https://physics.meta.stackexchange.com/q/10563), but type it out instead so it is readable for all users and so that it can be indexed by search engines. For formulae, use [MathJax](https://math.meta.stackexchange.com/q/5020) instead.
Comment: What do you mean by "type" of potential energy here and who calls this "bhom quantum potential" (what's "bhom"?)?
Comment: Should be *Bohm* quantum potential. Fixed.
Answer: It's just a normal potential energy function. It could be gravitational potential energy, electric potential energy, or any other kind of potential energy from classical mechanics. The way that the particle reacts to the potential energy will be different, but the form of $V(x)$ is exactly the same.
For the infinite square well, we are not really concerned about what is causing the potential. It's mostly used as a teaching example, but it could provide a simplistic model for a particle strongly confined to a region by any type of potential energy.
Answer: There is not one single special potential function, rather the opposite. The potential function is a placeholder that takes a different functional form depending on what kind of physical situation you want to model. The physics and the system that we want to describe goes into the Schrödinger equation via this potential function.
The only information that the equation  gives you written in this way is the fact that it has to be a function depending only on the position variable. The function $V(x)$ may not depend on derivatives of $x$ for example.
Some basic examples for potentials are the particle in a box potential,
$$
V(x) = \cases{ 0, \ -L/2 < x < L/2 \\\infty, \ \textrm {otherwise} }
$$
With this we can model situations where a particle can move freely in a certain area, but unable to escape.
Another potential would be a harmonic potential,
$$
V(x) = \frac{1}{2}m\omega^2x^2
$$
With this we can model situations where a particle is for example resting in a local minimum that looks like a parabola. This can describe for example molecules in their stable groundstate geometry. Another example that is described by a harmonic potential would be the time dependent amplitudes of the electromagnetic vector potential.
Potential functions are also often so complicated that we are only able to obtain approximate solutions.
Comment: It's always intrigued me that quantum physics is so radically different from classical physics yet the same classical potential functions can be used in the Schrodinger equation. Is there an intuitive explanation for that?
Comment: The laws of interaction between physical entities are independent of the scale of the problem (at least for everything above the Planck scale). That is an explanation why the potentials, which are more or less a more tractable mathematical form of those laws, work in both cases.
Comment: @HansWurst Can we also say that it is a natural consequence of quantising the classical Hamiltonian?
Comment: @IndischerPhysiker My familiarity with quantization procedures starting from classical equations is limited so I'm not able to give a direct "yes or no" answer to that.
Answer: The potential energy in Schrödinger equation is the electrostatic one. Here are a few points to note:

Since the Schrödinger equation is used on a microscale, we exclude the "microscopic" kinds of potential energy familiar from Newtonian mechanics, such as, e.g., the "elastic potential energy", which are really result of the electrostatic interaction between many particles.
This leaves us with four fundamental interactions acting on the particle level: electromagnetic, strong, weak and gravitational.
I am not sure whether there is a generally accepted theory of gravity
on quantum level, so I would say that gravitational forces never
appear in the Schrödinger equation.
Weak and strong interactions, in principle, could appear in the Schrödinger equation, but a) they are rarely reducible to a purely potential interaction, b) they are usually treated using more sophisticated mathematical techniques, and c) they are often treated in relativistic limit, wwhere the Schrödinger equattion does not apply.
This leaves us with electromagnetic interactions, i.e., the scalar and the vector potentials. Thus, the potential energy in question is
$$
V(\mathbf{r}) = -e\varphi(\mathbf{r}),
$$
since the particle in question is usually an electron.
This is sufficient for describing the physics of atoms and condensed matter in non-relativistic limit, and taking properly into account the exchange interaction.
Comment: "The potential energy ... is the electrostatic one": no, it's not. It can be virtually anything you want (e.g. square potential wells). Whether it corresponds to a physically realizable situation is another matter. But even unphysical potentials can be rough approximations to physical situations. The point is that in most cases, you *impose* a potential (with no indication of *how* it is produced) and you solve the Schrödinger equation for that given potential. In particular, the electron (or whatever) whose behavior you are trying to predict, is assumed to *NOT* affect the potential.
Comment: @NickD it is not about the shape of the potential, but about its nature.
Comment: This is overly bold in ruling things out. For instance, it makes complete sense to talk about scattering an aplha particle off a nucleus (Rutherford experiment) and to model the interaction via scattering off an infinite spherical well where the potential involved is clearly a result of the strong force. It's not difficult to come up with other non-EM examples.
Comment: @jacob1729 I didn't rule this out in my answer. I even covered weak and strong interactions in some details.
Comment: My objection to the discussion of weak/strong forces is that it certainly reads like you are dismissing them as unlikely. It's also true that gravitational potentials can appear in the SE, see Collela R, Overhauser A W and Werner S A 1975 Phys. Rev. Lett. 34 1472.


What are the tools available for freshwater acoustic monitoring?

Question: Recording in freshwater is getting more popular and people usually use a handheld recorder and hydrophone for focal recordings. How about passive acoustic monitoring? There used to be a possibility to plug a hydrophone to a sound meter. But this option is no longer available. What are people using to monitor shallow water environments such as ponds and streams?
Comment: "Best" is too subjective.  I recommend narrowing this down to just one of "deep water" or "shallow water", and giving some other requirements for the solution you're looking for.
Comment: Would be good to expand this question to include things like target species, sample rate, noise floor (for example monitoring low amplitude sounds) and longevity. There are many hydrophone options - defining the above criteria will allow for more specific answers.
Answer: The Hydromoth is becoming popular! From the makers of the terrestrial Audiomoth (Open Acoustic Devices). Actually, there was a group buy just announced so you can grab some now if interested. It's through GroupGets here. And more info on the OAD website here. Plus the publication describing it here. It's pretty affordable (as far as ARUs go) too - recorder + waterproof case = $135 in group buy.
OAD (and most conservation tech manufacturers if we're being honest) has had difficulties sourcing microcontrollers because of the global shortage/supply chain issues from the pandemic, so not sure what availability will look like in the future though.
For other manufacturers of hydrophones/ocean acoustic equipment, you could search the Conservation Tech Directory (within which Ocean Instruments is listed, as referenced in the other comment :) ).
Comment: Please be aware that the Hydromoth publication linked to by @CarlyBatist includes a performance report, where lots of the time, the device has poor performance
Answer: You should still be able to use any of the marine soundscape equipment underwater. Ocean Instruments, while pricey, are the gold standard.  Depending on what frequency you would like to look at, the French company RTsys also makes underwater recorders, though I have colleagues that have tested their noise floor and isn't good for academic purposes below 1000 Hz.
Also, not for nothing, but I will be deploying some SM4+Bat FS in the middle of the North Sea strapped to buoys. The microphones will get dunked, submerged in surface saltwater in bad weather. We ran a test with one unit already, and found that the IP68 filter on the microphone was pretty resilient. So, depending on what you need, you may be able to use the SM4. I'll report back about our full deployment when I know more.
Comment: Super interesting to hear about the SM4 used in marine environments, I don't think I've ever heard of someone doing that! Great that it seems to work ok as well. Excited to hear updates about this!


Add taxonomy terms list to homepage

Question: Please help me to add taxonomy terms from custom taxonomy into home page. I have no idea how to do this as I'm coming from WordPress. In WordPress it is easy as calling get_terms().
I have following file as my home page: mytheme/templates/page--front.html.twig
I have more than one taxonomy type and all of them are going to queried in the home page.
How to query the taxonomy terms?
UPDATE:
I have created a new region called home_content in my theme.info.yml and I have created a view(block) for getting the taxonomy terms, added it to region in back-end and display it as {{page.home_content}}. It works but I have few questions.

I have fields for logo and text in the taxonomy. I want to list them too.
I need to customize the html. How can I do that?

Thanks for the support.
Answer: Just create a view and list out taxonomy terms. Then display the view in front page.
Need to place view in page--front.html.twig.
Use Twig tweak module.

{{ drupal_view('view_name', 'page_1') }}

For Block
{{ drupal_view('view_name', 'block_1') }}

Comment: Please explain further. I have no experience with drupal.

Add taxonomy terms list to homepage


Time profiling code inside of Blocks

Question: How do I use Instruments to profile the code inside a Block? Right now I am only able to see the total time for the Block, but not able to go inside the block to see where time is consumed.
As examples, case 1:
<code>if (completionBlock) {
    completionBlock(mutableManagedObjects, mutableBackingObjects);
}
</code>
and case 2:
<code>[backingContext performBlockAndWait:^{

    if (backingObjectID) {

        backingObject = [backingContext existingObjectWithID:backingObjectID error:nil];
    } else {
        backingObject = [NSEntityDescription insertNewObjectForEntityForName:entity.name inManagedObjectContext:backingContext];

    }
}];
</code>
In case 1, I am not able to profile inside the function and find out the time consumed; it just shows the total time for the Block. In case 2 also, I am just getting the % of the total Block; it doesn't show the details for the lines of code inside.
Answer: Create separate blocks and check profile of each.
<code>/*! \brief check first for backingContext as it is not set yet up here
if (backingObjectID) {

    [backingContext performBlockAndWait:^{

        backingObject = [backingContext existingObjectWithID:backingObjectID error:nil];
    }];

} else {

    [backingContext performBlockAndWait:^{

    backingObject = [NSEntityDescription insertNewObjectForEntityForName:entity.name inManagedObjectContext:backingContext];
    }];

}];
</code>
Answer: You can now go inside a block starting from Xcode 6.0.1.

Time profiling code inside of Blocks