Contextual Links add destination=node to URL - can i restrict that from happening? - stopping delete functionality

Question: I have a contextual link on a block that will take the user to an admin screen with a delete button on the admin screen.  The delete button works fine when not coming from the contextual link.  I noticed the contextual link adds "destination=node" to the end of the URL.  The fact that the contextual link adds that to the URL does not allow for my admin screen to redirect to the delete confirm admin screen.  If i remove the "destination=node" from the admin screen URL, it goes to the delete confirm admin screen with no issues.  Has anyone else had this issue?  I noticed this is for absolutely any module or block in drupal.  If going to the admin screen from a contextual link and it has a delete button on the admin screen, the delete functionality will not work!  Any suggestions?
Answer: The accepted answer is not entirely correct.  When hook_menu_contextual_links_alter() gets to act on the array of contextual links, no destinations have been set yet.
Instead, just a few lines after menu_contextual_links() (and so its alter hook) is called in contextual_pre_render_links(), there is this line adding the destination to the contextual link:
$item['localized_options']['query'] += drupal_get_destination();

If you set a query destination in hook_menu_contextual_links_alter(), the one you set will win.  But if you just want to get rid of the destination so for instance a redirect set in the form can do its thing (including, say, adding a fragment)... removing the destination before it is added here doesn't work.
This being Drupal, however, two lines later another alter hook is called:
drupal_alter('contextual_links_view', $element, $items);

(This is all in contextual module.)
So implement that hook instead.  For a module named example removing the destination from all node edit alter hooks on a given array of content type machine names available with the function example_selected_node_types(), the implementation would look like this:
/**
 * Implements hook_contextual_links_view_alter().
 */
function example_contextual_links_view_alter(&$element, $items) {
  if (isset($element['#element']['#entity_type']) &&
      $element['#element']['#entity_type'] == 'node' &&
      in_array($element['#element']['#bundle'],
               example_selected_node_types()))
  {
    $element['#links']['node-edit']['query'] = array();
  }
}

Answer: hook_menu_contextual_links_alter() allows you to go in and change anything your heart desires. :)
Comment: But not destination=path/to/where/was

In $links['node-edit'] for example, the options and localized_options are empty arrays.


creating user related user specific content

Question: Should you create a table for each user to contain information on specific content for an account, say favorite articles, interests, ect. User defined lists that would be used to generate useful content using a tag system to define groups of content. Would i be approaching this close to right, or is there a better way. i know u should not define more than one thing in a column, but i also would want the fewest number tables too?
Comment: can you draft create table statements
Comment: i can write a MySQL query to create a table as well as write a function in php to accomplish tell the db the same, what i am trying to understand in how to structure the tables to store user preferances, or what to research.. u shouldnt store more than one thing in a single column, what if u have a list of things to store. and array that varies in number of items to store, how do u store a piece of that is as such, should i just put it in a column with spaces between the words? what should i study to better understand what i am talking about in database design
Answer: Do not create a table for each user!  Create a table for each category of information you want to store.
In a relational database, a table typically represents a list of a particular type of thing which is of interest to your system.  This can be a tangible thing, like users, or an intangible thing, like interests.  The point is that each table is about a kind of thing.  The things themselves are rows in a table.  Every row in a table needs to have the same structure.  If you have no consistent structure for your data then you have to consider a No-SQL database instead.
For relational databases, study the rules of database normalization.  This will help you to understand how to structure your database tables.
Answer: There is no should for storing only one thing in a single column and define more than one thing in a column in real world implementation. Some project stores serialised object (a group of value) into a single BLOB column. Some people separated values with comma in a single TEXT column to take advantage of full-text search after denormalisation.
You may have some insight from here. As other experts say you might have performance issue if the value could not be search as full-text, so it would better to normalise a single table into many. However, tags list could be search as full text so it is up to you.


Can you kill two players with a single shot in Urban Terror?

Question: Phrased another way, does any kind of round penetrate players e.g. those fired by the PSG-1 or the SR8?
Answer: I don't think so. Maybe it can be the case with SPAS-12 (due to its ammo nature).
However, obviously, the HE grenade (and HK-69) allows you to kill more than one player with one grenade ...
Comment: One green tick for you as the only answer in quite some time :) Good point on the spas too.
Comment: Well, notice the SPAS is only a guess. But for the nades, i'm sure, as regularly see multiples "monorailkitty was reduced to a (i don't remember the word) by Riduidel grenade".


How to report that a question should be migrated to another site?

Question: How do I report that a question should be moved to a different site (from stackoverflow.com to superuser.com, in example)?
Comment: The relevant info has been edited into the FAQ, so this is now a duplicate. Please note that it's policy to close questions as duplicates of FAQs even if they're merely related, and even if the information wasn't contained in the FAQ at the time the question was asked. This is to direct all users to the canonical source containing the relevant info.
Answer: Users with more than 3000 reputation can vote to migrate any question. Users with more than 250 reputation can vote to migrate their own questions. It's actually a close vote, but the result is that the question is moved.
If you have less than 3000 points (or 250 it it's your own question) then you can do one of four things:

Leave a comment. This is not ideal as the poster might go off and post a new question on Super User and when the original question is migrated it creates a duplicate.
Flag the question for moderator attention, giving migration as the reason. This should only be used in exceptional circumstances.
Post a question here on meta with a link to the post and an explanation of why you think it should be migrated.
Leave it for other 3K+ users to spot and vote to close/migrate.

Option 4 is by far the easiest thing for you to do, unless you think that it's really urgent that the question is moved, in which case go for 3 or 2.
Answer: Vote to close it as "Belongs on [Target Site]".
If you do not have sufficient rep to vote to close, just put a comment below the question that says "Belongs on [Target Site]", or do nothing at all.  Generally, there are enough high-rep users who will see the question, and vote it to the other site.
If you feel strongly about it, and the question has gone dead (i.e. people are not looking at it anymore), flag it for moderator attention, and put in the description, "Belongs on [Target Site]."
Comment: @Ivo Also when the question is migrated the now unnecessary "Belongs on" comment is migrated with it
Comment: On my questions, how do I vote to close it? I see there is a link titled "close", but I take it closes the question directly. Is that correct, or the link allows to start the vote?
Comment: The link is to "vote to close."  Four more users must also click the link to close the question.
Comment: The problem I have with simply commenting: Belongs on ... is that some new users will duplicate the question on the target site, rather then letting the system do it's work...
Answer: If you have less than 3000 reputation, then the traditionally effective means is actually to do nothing. The people who can vote to migrate are quite active, these kinds of questions tend to be picked up very fast, and they don't need any flagging to do that job.
You can consider posting a comment saying "This should be posted at [other site]". But be careful! You might convince the poster to do that, but the original post may still be migrated, and there will now be duplication! This is actually why not saying anything tends to be more effective.
If you really are worried about it, you can flag it for moderator attention explaining which site it belong on. I really don't recommend this because it should only be used for drastic measures, and migration rarely is such. But it's always an option if you feel it is necessary.
Of course, with over 3000 reputation, simply cast a vote-to-close to migrate it. That's all you need to do.
Comment: Does this answer still apply? Sub-3000 users can specifically flag as "belongs on xyz site"; is that not good for some reason?
Answer: In general if you feel very strongly something should be migrated...

if you have 3k+ rep, vote to close it as appropriate
if you do not, flag for moderator attention with a brief note where you want it to go, and why
Comment: Have you considered allowing original authors 'one click migration' as you give them 'one click deletion?' Often, a quick comment to the OP leads to them being more than happy to move, and think of all the close votes we could save to use on the bad stuff.


Disclosing records no longer maintained, FERPA

Question: Are professors able to discuss a student's academic misconduct with others after the disciplinary file is no longer maintained after a set amount of years after the student has graduated? Even if the original academic records (eg. plagiarized exams) are still 'maintained' by the professor?
Answer: I assume there was an official hearing on misconduct, but the record was deleted from the university's holdings (following deletion policy). The disciplinary board had copies of the exam, complaint, and minutes from the hearing – and these were later deleted by policy. The instructor might still have the exam, and perhaps his own notes from the hearing. By the federal definition of education record,

(b) The term does not include:
(1) Records that are kept in the sole possession of the maker, are
  used only as a personal memory aid, and are not accessible or revealed
  to any other person except a temporary substitute for the maker of the
  record.

The exam itself is made by the student, and is not in the sole possession of the maker: the exam does not fall within the purview of this "not a record" exception. The faculty member's notes on the hearing were made by the faculty member, and they are covered by the "not a record" provision, as long as they are are not accessible or revealed to any other person. What this provision is about is that students have the right to access education records, but they do not have the right to access the faculty member's own personal notes about the hearing. Disclosing those personal notes makes them a record, meaning that consent is required.
The faculty member is probably in violation of university policy, for keeping a record past the destroy date. As an example, the final 3 pages of this records retention schedule indicate that a record is to be destroyed within 3 years of the student no longer being enrolled, at the maximum. Coursework materials are to be destroyed 2 terms after the term of enrollment. In reading this document, the wording is a bit vague: who is this addressed to? Faculty? This helpful (and authoritative) source suggests that it is directed to faculty, as does this.
Comment: As long as it's all from memory, there's no record, so no prohibition against disclosure. Any additional institutional restrictions would not be based on FERPA, and it's unlikely that there is such a rule.
Comment: Okay, then assuming there are no records maintained, would professors be able to discuss the event freely since FERPA only covers educational records that are maintained? Or is there protection even after scheduled destroy dates?


Quaternionic analysis motivation

Question: I have just heard of quaternionic analysis. It seems like the goal of this subject is to carry over concepts like homorphicity etc. from complex numbers to quaternions. However, these concepts seem to lose some of the nice properties that we have in complex analysis (eg. derivatives are no longer independent of the path we approach $x_0$ on), so what is the motivation for studying this subject? What are its uses?
Comment: I've heard that Maxwell's equations were used in quaternion form before the actual vector form. I've not seen those equations, but I think it was a good application of it.
Answer: Quaternionic analysis as an extension of complex analysis is to my knowledge a field in pure mathematics. And indeed, many nice properties of the complex variable are lost with this structure.
Quaternion algebra however, while a not much interesting field for mathematical research has quite a lot of applications. As @Botond mentioned, Maxwell's equations were originally developed in quaternion form. And as a homage to William Rowan Hamilton, there has been a long tradition of teaching physics with quaternion notation (source). Nowadays, because quaternions provide a singularity-free rotation formalism, they are used in spacecraft attitude control algortihms and in 3D video-games graphics engines. Some applications for pure mathematics may exist of course, such as Lagrange's four-square theorem.
Answer: Quaternions have many applications: they are widely employed for 3-dimensional rotations (unit quaternions are isomorphic to SU(2) as a Lie group, and SU(2) is a double cover of SO(3), and thus unit quaternions can represent 3d rotations), they also have various uses in physics (such as rigid body mechanics or quantum mechanics/particle physics, due to their connections with SU(2)).
Quaternionic analysis, on the other hand, has fewer applications but some can still be found. This important paper from G.Birkhoff and J.Von Neumann paved the way for what is commonly known as "general quantum mechanics"; one of these general quantum mechanical models is provided by quaternions: you can check this and this for more info. In C.A Deavour's paper, a quaternionic version of Maxwell's equation is presented.
Furthermore, an alternative construction of analysis of functions of a quaternionic variable (alternative with respect to the classical analysis due to Fueter) has been shown to be useful for various problems in computer vision and other areas of applied science.

Quaternionic analysis motivation


Connect to an available wireless network using VB.NET

Question: Using VB.NET how do I connect to an available wireless network. I have been able to list all the available networks.
Answer: Assuming you are wanting to control the Windows biult-in wifi stack, you should be able to do it with the WlanConnect Function. A signature is availeble at pinvoke.net.
MSDN has a list of the articles pertaining to wifi here.
The MSDN page does not say whether this is the case, but an application might need elevated permissions to use this API...
Answer: If you have the WLAN profile saved in your PC, this approach is simple.
<code>Sub connectTo(ByVal name As String)
    Dim p = "netsh.exe"
    Dim sInfo As New ProcessStartInfo(p, "wlan connect " & name)
    sInfo.CreateNoWindow = True
    sInfo.WindowStyle = ProcessWindowStyle.Hidden
    Process.Start(sInfo)
End Sub

'use the sub to connect to your AP. connectTo("myAP")
</code>
Otherwise, it is easier to use ManagedWifi or SimpleWifi dll libraries. Here is my code where I used SimpleWifi.dll to connect to a network with a passkey.


Distinction Between Deontic Logic and Formal Ethics

Question: What, if any, is the distinction between "formal ethics" and "deontic logic"?
Comment: "Have you thoroughly searched for an answer before asking your question? Sharing your research helps everyone. Tell us what you found and why it didn't meet your needs. This demonstrates that you've taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer!"
Answer: Formal ethics comprises more than just deontic logic. Deontic logic is primarily concerned with a logical analysis of notions such as 'ought', 'must', 'may', or 'being permitted', whereas formal ethics comprises all ethical and moral reasoning that makes use of formal methods.
Apart from deontic logic, formal ethics is also concerned with the modelling of formal systems of norms and rules (which are usually conflicting with each other, sometimes also defeasible and context-dependent), the formal modelling of the permissiveness of moral rules as 'soft constraints', dealing with vagueness of norms, laws, and moral rules, game-theoretical explanations of moral norms, formal models of distributional justice, the formal modelling of values including value incommensurability, moral issues of decision making under uncertainty (e.g. the Precautionary Principle), problems of value and preference aggregation, and utilitarian ethics in general.
Some of these topics are also addressed in AI research, formal epistemology, game theory, and economics. Research in this area is fairly interdisciplinary.
Comment: Is either field currently fashionable (in philosophy academia) right now?  Would it be a good signal to submit a paper on either topic to grad schools in philosophy?
Comment: There is no general answer to this, because it depends on where you study and what people are in your department. Philosophy of Economics is currently perhaps more fashionable than classical deontic logic, at least in Europe where I live. That being said, it would be insane to base your research direction on how fashionable the topic  is. Trends come and go. On the other hand, if you'd write just one seminal paper that everybody reads then you'll still be invited to conferences to talk about it 30 years later - no matter which topic it covers.


Can the Xbox One be jail broken/modded?

Question: I have an Xbox one X. I was wondering if it could be jail broken or modded without a computer. I have only found outdated methods of methods that require a computer. Can anyone help?
Comment: @Lemon It's not asking for more information, so it's not a comment. If you don't know what the question is asking, leave a comment to that effect, not an answer.
Answer: Jailbreaking electronics refers to customers being able to escape the limitations imposed by manufacturers, usually related to the operating system. As of now, the Xbox One cannot be jailbroken.
Modding may refer to installing custom hardware, most often related to the console's visuals or to installing modified code to run all or parts of the hardware. This is currently not possible. Furthermore, this would certainly require another device of some kind to provide the code.
Technical reasons for these limitations are related to lessons learned from the previous console generation. The Xbox One runs signed code, which means you cannot simply alter existing code without going through the certification process. While you can circumvent this with the developer mode of the Xbox One, you would still not be able to customize the operating system as the developer mode is run by the OS. Furthermore, other security features, such as sandboxing or running dedicated VMs. separate environments which makes it hard to use memory exploits to insert custom code.

Can the Xbox One be jail broken/modded?


Is a current varying output or voltage varying output for a 4-20 mA sensor more reliable for a rocket?

Question: For the internal plumbing system of a rocket which is expected to reach 100 km above the ground, industrial pressure sensors with a 4-20 mA current output and a 0-10 VDC output are available. What would be a more reliable choice?
Comment: The 4-20mA option has the advantage of being able to detect an open in the sensor connection (the current goes to zero) where the 0-10V output can't distinguish between 0V and an open fault.  The two schemes will differ in EMI susceptibility, but which is better depends on conditions.  Other than that, all of @MarcusMüller 's comment apply.
Comment: That's impossible to say, and the reliability of the sensor as is has little to nothing to do with the output being current or voltage. Read the datasheet. Check especially for temperature, pressure, and vibration ratings. If you want to put something on a rocket, contact the manufacturer of these sensors
Comment: Related but not to the question per se :-) : - Ejection charges often fail at altitude due to chemical reactions proceeding differently under low (or here no) pressure. Be **CERTAIN** that zero pressure and zero-cooling by convection do not compromise your craft. || You are probably not using LOX, but, LOX valves often freeze - usually closed but open is possible.  || Probably solid, but, if liquid, be sure that end of burn handling of propellant and oxidiser do not allow unexpected mixtures and re-ignitions which compromise craft. Early Atlas missiles were lost that way.
Comment: Current loop is fine. Digital bipolar is also fine. Avoid single ended voltage (you know that) but even that can be made fine enough. Beware spurious boundary states (glitches during staging or launch) - "full size" rockets have been lost that way. Digital interconnects with suitable layers of integrity / error checking where possible give you a better chance of bulletproof data integrity. || Ensure cooling does not become an issue. Be aware of max max real world vibrations and g forces.
Answer: As far as signal integrity, 4-20mA is almost always better. Two reasons why:

Noise is usually less of an issue.
Circuit discontinuity is instantly detected.

As for its use in high g applications, that is more up to the sensor itself, both electrical and mechanical construction. Note if it is more then just a sounding rocket, i.e. entering LEO, then you need to start considering radiation from the environment as well and it's effect on the electronics.
Answer: There are several situations where choice of 4-20mA current is necessary
a) Where the receiver already exists and is 4-20mA
b) Where you need to transmit over a substantial distance of wiring
c) Where there are particularly high levels of EMI
Other than those, you have a fairly free choice. The reliability of the sensor and the control electronics themselves will be similar, especially if made by the same vendor.
Most people find it easier to design around a voltage interface, and you may well use fewer components doing it. In which case you'll least chance of messing it up going the 'easier' route of a voltage interface.
Bear in mind that in electronic design, getting an interface to do what you want when everything else is behaving as you expect is the easy bit. Anticipating what can go wrong, and handling it without causing other things to blow up, that's the hard bit. With a rocket, you usually only get one chance to test it live, so figuring out how to test it adequately before flight ought to consume >90% of your research.
Comment: In efforts to develop their equivalent of the Saturn5 moon-launch-rocket, the Soviet bundled 20+ engines into the N1 rocket. The large number of engines required a maze of plumbing to route fuel and oxidizer, with many turbo-pumps to implement the forced-feed rates. Each launch ended with explosions, fortunately later and later after launch, indeed even after stage1 separation, for the 4rth launch. Thus the Soviets retained hope. For 5th launch, they used 130,000 sensors and over a Billion-bits-per-second of downlinked telemetry. After that 5th test also exploded, they gave up.
Answer: I assisted very senior engineers in producing 6" BY 6" BY 4" HIGH black telemetry boxes for TRW. In assisting them, I had the opportunity to examine the schematics.
The inputs were:
....high-level analog single-ended,
....low-level analog differential-ended into amplifiers
....and digital switch-closures (logic levels)
MOSFETS (tho sometimes special-doped bipolars) were used as the analog multiplexors.
Analog Digital Converters, using 0.01% red-cased wirewound resistors in R-2R-4R-8R etc DAC structures, using the UA710 single comparator, were the state-of-art and extremely reliable. [I'd written UA711, but was 710]
These small telemetry systems had to, after being conformal coated against fungus, sit in storage at Cape Canaveral for 25 years without failing, then be launched in extreme vibration and shock, and then perform for 25 years in orbit --- all sorts of particles impinging on the circuits to degrade current gain and degrade junction leakage. Glass sealed tantalums were the favored large-value capacitors; glass capacitors used in precision timing.


start up sculpting a human head

Question: I'd like to start Blender by sculpting a human head . How can I import a ready made model head , and where can I find the classical sculpting tools of sculpting?
Answer: Answer - you can import your head by going to File > Import > Wavefront (.obj). If your model isn't a .obj file, select the other option that matches yours. Sculpting tools are in the sculpt panel, top of the screen under Sculpting.
Advice - do not start with a head. If you're new to Blender, start with something simple. Human head is a really complicated model even good artists can struggle with. :-)

start up sculpting a human head


Ham Radio Exam in English in West Europe

Question: Is the Ham Radio License exam conducted in English in any of the western European Countries?
Comment: Hello! Thank you! Thrilled to be here!
Comment: Welcome to ham.stackexchange.com!
Answer: The UK is a western European Country - aside from Brexit.
The exams are conducted in English language (multiple choice test).
With the "Full Licence" you will receive the HAREC (Harmonized Amateur Radio Examination Certificate) according CEPT recommendation T/R 61-02.
A person who holds a HAREC issued by a country that participates in recommendation T/R 61-02 may apply for a licence in a lot of other countries on production of that HAREC.
See also:
https://rsgb.org/main/clubs-training/for-students/
and
https://www.ofcom.org.uk/__data/assets/pdf_file/0026/82637/amateur_radio_licence_guidance_for_licensees.pdf
Comment: Thank you @dingensfredi I will take a look
Answer: As already mentioned, the UK conducts test in English. Ireland does also - https://www.irts.ie/cgi/st.cgi?applying.
In addition you can sometimes sit the US FCC exam in various locations through Europe. This can then be used to apply for a US license. The ARRL lists some/most/all dates: http://www.arrl.org/find-an-amateur-radio-license-exam-session
I am assuming you are a European resident trying to get a local license without speaking the local language. If so then check the rules carefully with regard obtaining a local license before proceeding. The FCC don't issue HAREC certificates and this might complicate matters when applying for a local license. Others will know more on this if Google doesn't help.
Doing the exam in the UK is how I got my German license though so I know that definitely works! Note that, maybe depending on your local country, you probably have to qualify for the full UK license to be able to apply for a local license. That means passing the Foundation, Intermediate and Full exams (and there is a practical assessment as well). I'm not sure about Ireland so maybe its simpler there.
Comment: https://www.us-afu-lizenz.de/index.php/en/german-license says that you can use a US license to apply for a German license, even without HAREC, so maybe you can where you are to.


Create web services on the fly based on WSDL

Question: Using some Java library I want to provide web services to clients at run time. The web services should be based on WSDL definitions, which are unknown at compile time. The web service implementation itself will be some generic implementation getting the service name and field values and passing it to some external system (e.g. storing key / values into a database) and fetching the result some seconds later. The implementation is something like a proxy translating services / WSDL unknown at compile time at run time with generic code to backend systems.
I've found libraries doing WSDL -> java code or java code -> WSDL, but what library is capable of dynamically registering WSDL at run time?
Answer: You may be interested in the java Service class, which can be used to generate dynamic proxies to a web service.
I didn't find any great new examples, but the 1.4 tutorial has a walk-through you might use to get started.


Can an angel do more than one mission?

Question: When the three angels visit Avraham, the mefarshim go to length on why each Malach was needed and the different missions each was required to carry out - why don't we have the same when 5 malachim visited Hagar in the previous parsha and what were these 5 unique missions that required 5 malachim?
Comment: When did 5 angels visit Hagar? Please [edit] in which verse or commentary you're citing for the benefit of those not familiar.
Comment: `the mefarshim go to length on why each Malach was needed and the different missions each was required to carry out` Could you give an example of one such mefaresh?
Answer: It appears that you are referencing Lech Lecha 16:9 - 12 since Raashi says

And the angel of the Lord said to her, etc.: For each statement,
  another angel was sent to her. Therefore, the word מַלְאָךְ, angel, is
  used with each statement. — [from Gen. Rabbah 45:7]

There are meforshim such as Rav Sorotzkin who explain that Hagar refused to listen to the malachim and in effect sent them back with the "mission" a failure. As a result, each message, being a different promise, required a different mal'ach.

Go back to Sarai and bear this child who will be part of the family of Avram and Sarai.

She refused and had a miscarriage.

Go back and you will have children who will become great.

This is similar to what happened with her (as Keturah) after the death of Sarah when Yitzchak brought her back to Avrohom.
She again refused and the mal'ach had to end his mission leaving her behind.

You will get pregnant and have Yishmael who will be a wild man (פֶּרֶא אָדָם) and terrorize to world.

This is what she finally accepted and when she agreed to go back. This is analogous to the modern Arab mothers who raise their children to become terrorists.
Thus, each time it says וַיֹּאמֶר לָהּ מַלְאַךְ יְהֹוָה it was actually a new mission.
Comment: @DavidKenner The implication was that she would not return in any event.
Comment: Then what was the reason the malach who asked her where she came from and where she is going, had to be replaced? What was the refusal there?
Comment: She absolutely refused to answer and did not pay attention to the Malach. Note that when Hashem asked Adam, he answered Him.
Comment: Gen. 15:8 "..And she said, "From before Sarai my mistress, I am fleeing." She did answer the malach.?
Comment: Why did she merit to have 5 angels pursue her after her outright refusal?! I understand she merited because she left pharaoh to be with Avraham, but why was this so critical for gods plan??

Can an angel do more than one mission?


difference between "missing" and "lost"

Question: Is there any difference in the meaning between "a lost dog" and "a missing dog?"
Is it both correct to say "my lost dog came back" and "my missing dog came back?"
Answer: A "missing" dog is a dog that isn't where we are looking for it. It may not be there for many reasons; it may have been stolen, killed, run away (and known to be coming back two days later), sold on, or actually lost. (Or misplaced, thanks, Kris).
If one child in a class of schoolchildren is missing, I'd hope very much that the child hasn't been lost (that's what you might say if 20 school children go on an excursion and only 19 return; one child is missing; the teacher lost one child), usually the child is ill at home, or maybe playing truant.
On the other hand, I have a box with hundreds of screws and some may be lost, but as long as I don't notice it, they are not missing.
"Missing" is also used for things that have never been there. I brought all the tools to do some repair work, but I forgot to bring a hammer. The hammer is missing; it isn't lost.
Answer: It depends on the context. I assume you mean the dog cannot be found, it's missing. In this case, "lost dog" and "missing dog" are synonymous.

lost (adjective): if something is lost, you had it but cannot now find SYN missing

(Longman)
If you mean the dog lost its way, then you obviously cannot use the term "missing". In this case, it's a lost dog, not a missing dog.
Comment: The 2 downvotes might be related with this [question](http://english.stackexchange.com/questions/222291/shipment-has-been-lost-vs-is-missing). Take a look. I made it to -1.
Answer: This dog is lost.  It is a lost dog.
The dog is unable to find its way home.
I have lost my dog.  My dog is lost/missing.
I cannot find my dog.
Answer: There are instances where 'lost' and 'missing' mean exactly the same as here in the post.
But a deeper understanding of these two terms suggest that 'lost' is subjective and somewhat psychological.

He is lost in thoughts.

Here lost is not missing. Moreover, the subtleties of a 'lost' and 'missing' dog has been made amply clear. When you yourself is responsible for any quandary we prefer 'lost'.
In contrast, 'missing' is objective and terrestrial. It suggests what is missing may perhaps be found out(a hope lurks some where), in 'lost' it is distanced farther. The evocative power of 'missing' to rouse all the sensory feelings  all at once is unique; 'lost' comes nowhere near.

Something is missing; Laila is not home yet.

** She is all tears for missing lost love.
The order can't be reversed.
Back to the basics. In our example, a'lost dog' is exactly a 'missing dog'; no denying that.
Comment: And let's not forget "lost souls", who may be perfectly healthy and present, but are (in the judgement of the speaker) "lost" due to their failure to accept some (usually religious) doctrine.
Answer: It's different talking about a dog than it would be talking about a person.  You're not apt to hear "a missing dog" because the assumption is that your dog would never leave you unless it got itself lost and couldn't find its way back.  On the other hand, we hear about "missing persons" because a person might run away or be abducted (a dog can be abducted, too, but it's not a likely scenario).

difference between "missing" and "lost"


Matrices whose all principal $k\times k$ sub-matrices are positive semidefinite

Question: I would like to know whether the set of $n\times n$ Hermitian matrices  whose all ${{n}\choose{k}}$ principal $k\times k$ sub-matrices---the matrices obtained by removing $n-k$ columns as well as the corresponding rows---are positive semidefinite is a well-studied set, and if so under which name. This is for a given $1\leq k\leq n$. If $k=1$, this is the set of $n\times n$ matrices whose diagonal entries are non-negative, and, if $k=n$, it is the set of $n\times n$ positive-semidefinite matrices. I am interested in what is known for the general case $1\leq k\leq n$, in particular for the non-trivial case $1<k<n$, for $n\geq 3$.
Answer: RC Thompson had a series of problems exploring questions regarding principal minors of Hermitian matrices in full:
Principal submatrices of normal and Hermitian matrices
Principal submatrices II: The upper and lower quadratic inequalities
Principal submatrices III: Linear inequalities
Principal submatrices IV. On the independence of the eigenvalues of different principal submatrices
Principal submatrices V: Some results concerning principal submatrices of arbitrary matrices
Principal submatrices VI. Cases of equality in certain linear inequalities
Principal submatrices VII: Further results concerning matrices with equal principal minors
Principal submatrices. VIII. Principal sections of a pair of forms
Principal submatrices IX: Interlacing inequalities for singular values of submatrices
Comment: It is unclear to me if this answers the question (I am not saying it does not). Did Thompson consider matrices with positive principal k-minors? If so, in which of the 9 papers you listed? If so, what did he prove about them?
Comment: For example in the second paper he discusses lower and upper quadratic bounds on the eigenvalues of the matrix based on the eigenvalues of the $(n-1) \times (n-1)$ submatrices. Positivity can be derived from these inequalities.
Comment: Dear @NickR , many thanks for your contribution. There are some results in those papers that might turn out to be useful, but I am not sure your answer is what I was hoping for, exactly because of the generality of some of the results there, and of the specialization of some other ones. It seems more like a starting point to attack the specific problem I am interested in, rather than a direct analysis of it.


Ubuntu 13.10 Driver for Lexmark c543dn

Question: I have a Lexmark c543dn that shares the same home network as my ubuntu 13.10 Thinkpad (Z61t). When I installed 13.10, ubuntu found the 543dn fine and automatically installed would appeared to be a generic printer driver. Problem is that whenever I try to print anything, the computer becomes slow and unresponsive and in many instances, I need to do a hard reboot to recover. And the printing process takes forever. I went to the Lexmark website and the only driver that they had for devon/Linux (?) resulted in the following error message: " Archive Manager An error occurred while loading the archive" after it appeared that I had successfully downloaded the file.
It appears that the print driver loaded by ubuntu is in conflict with the OS and that is causing the processor being taken over and the slow printing.
Appreciate any suggestions to resolve. Thanks.
Answer: When the installation asks you to select a driver, select the PPD option, not the 'generic' driver or 'library of printers'.
Instead choose the file from within the PPD folder which can be downloaded from Lexmark's support site.
That's what I did and printing is fast and I can also access my printer through the browser.
If you have any problems downloading the file, let me know and I can email it.
It's only 134 kb
All the best
Steve

Ubuntu 13.10 Driver for Lexmark c543dn


Instagram and Image Size

Question: I shoot a Nikon D750. In a image size Large. I know Instagram has limitations, but what are they. Should I shoot in Image size Large, Medium, or Small? Or shoot size Large, then adjust in Lightroom or Photoshop? If so, how, where? Thanks so so much.
Comment: What is the purpose of the link as it relates to this question?
Answer: Maximums from http://colorlib.com/wp/size-of-the-instagram-picture/
<code>Square Image: 1080px in width by 1080px in height

Vertical Image:  1080px in width by 1350px in height

Horizontal Image: 1080px in width by 566px in height
</code>
Not said as clearly, but verified at
http://help.instagram.com/1631821640426723
D750 Small image is
FX  3008 x 2008
DX  1968 x 1312
How? Google Lightroom resample
One result is http://photographylife.com/how-to-properly-resize-images-in-lightroom
Or Photoshop resample
One is
http://www.photoshopessentials.com/essentials/resizing-vs-resampling/

Instagram and Image Size


What are advantages and disadvantages of a Sorcerer/Rogue multi-classed character?

Question: I have recently joined a 5e campaign and I was thinking about making a Sorcerer Rogue multi-classed character.  Before I commit to that character build, what are the pros and cons of multi-classing in the 5e stystem that apply to mixing those two classes: Sorcerer and Rogue.
Comment: This is a very broad question, but you might be interested in [this related question](https://rpg.stackexchange.com/q/91346/15469) as a starting point.
Comment: @Miniman I have tried to scope this question more tightly with an edit.
Comment: Zack, do you have an idea of how long your group will play D&D with these characters?  Up to 5th level? Up to 11th level?  To 20th?
Answer: One advantage is that you will have a more varied array of options available to you.
One disadvantage is that those options will all be of a lower level than you could have had if you stuck to a single class.
If you take 10 levels of one class and 10 levels of another class you will have twice as many level 10 and level 5 class features to use, but you won't have any level 15 or level 20 class features.
Answer: The main disadvantage seems to be that ability score increases (ASI's) are tied to class level in 5e rather than character level, so you really need to keep your multi-class levels in multiples of 4 in order not to lose this important feature.
Spell casting is another major thing, especially for a sorcerer. If you don't multi-class with another spell caster you will lose access to spell slots, which I understand is pretty important for a Sorcerer.


How to see time that one IP login on Gmail?

Question: The "last account activity" link on Gmail shows just last 10 logins. How can find more, and exact time (including hour, minute) for one IP address?
Answer: The "My Activity" page will show everything you've done with your Google Account, including all of your Gmail accesses. Unfortunately, it doesn't show IP addresses (although it will show the device used to access).
If you're concerned that someone may be accessing your account from elsewhere, go to the "Recently used devices" page under My Account. There you can see all of the devices (with OS and location) that have accessed your account in the last 28 days and, if necessary, you can remove access.
Unfortunately, Gmail will only show the last 10 accesses. There isn't a way to get more.


The convergence of $\sum_{n=1}^\infty (-1)^n\left(\frac{n}{e}\right)^n\frac{1}{n!}$

Question: I'm trying to figure out if the $\sum_{n=1}^\infty (-1)^n\left(\frac{n}{e}\right)^n\frac{1}{n!}$ converges or not. I've tried the Leibnitz test for alternating series, but it leads to Stirling's formula and I was wondering if there's any other way so I could avoid using it. I'll be grateful for any idea.
Comment: @Anonymous But I think it does go to $0$.
Comment: Check to see if the inside of the sum converges to $0$. If it does not, then the sum is divergent.
Comment: @Milten My bad, you're right.
Comment: Related: https://math.stackexchange.com/questions/2741644/requesting-basic-explanation-of-the-lagrange-inversion-theorem/2741758#2741758 and https://math.stackexchange.com/a/2556105/44121
Answer: $$a_n = \frac{n^n e^{-n}}{n!} $$
is a positive and decreasing sequence with limit zero, hence the series is convergent by Leibniz rule.
$$\text{decreasing}:\qquad \frac{a_{n+1}}{a_n} = \frac{1}{e}\left(1+\frac{1}{n}\right)^n<1. $$
$$\text{convergent to zero}:\left\{
\begin{eqnarray*}\log(n!)&=&\sum_{k=1}^{n}\log(k)=n\log n-\sum_{k=1}^{n-1}k\log\left(1+\frac{1}{k}\right)\\&\geq &n\log n-\sum_{k=1}^{n-1}k\left(\frac{1}{k}-\frac{1}{4k^2}\right)\\&\geq &n\log n-n+\frac{1}{4}\log n.\end{eqnarray*}\right.$$
By the Lagrange inversion theorem (see 1 and 2)  we have
$$ -\frac{W(x)}{1+W(x)} = \sum_{n\geq 1}\frac{(-1)^{n}n^{n}}{n!}\,x^n$$
for any $x$ sufficiently close to the origin, with $W(x)$ being Lambert's function, i.e. the inverse function of $x e^x$.
It follows that
$$ \sum_{n\geq 1}\frac{(-1)^n n^n}{e^n n!} = -\frac{W(1/e)}{1+W(1/e)} $$
and by Newton's method the value of the series is approximately $-0.2178117$.
Comment: @BarryCipra: that is easily derived from Stirling's approximation $n!\approx n^n e^{-n}\sqrt{2\pi n}$.
Comment: And is there any other way how to show that the limit of sequence is 0 if I couldn't use the Stirling's approximation? Thanks for the quick answer @Jack D'Aurizio
Comment: @BarryCipra: I have added a proof of $a_n\to 0$ independent from Stirling's approximation. It is enough to exploit summation by parts and the inequality $\log(1+x)\leq x-\frac{x^2}{4}$ on $(0,1]$.
Answer: Too long for a comment but not a (complete) answer:
Notice that there is a theorem due to Stirling asserting that for big $n$ one has:
$$n! \approx \sqrt{2n\pi} \left(\frac{n}{e}\right)^n$$
So, in particular, for big $n$, the term of your sum is $(-1)^n\frac{1}{\sqrt{2n\pi}}$ which tells us that it will for sure converge (since it is an alternating sum of decreasing and tending to zero values).
Answer: It is possible to show convergence while avoiding Leibniz', and other, convergence tests. However, I've used a slightly convoluted route. I'm assuming that's what you meant, not avoiding Stirling's approximation. First, combining odd and even terms with $b_n=a_{2n}-a_{2n-1}$, the series equals
$$\begin{aligned}S&=\sum_{n=1}^{\infty}\frac{\left(-1\right)^{n}\left(\frac{n}{e}\right)^{n}}{n!}
\\
&=\sum_{n=1}^{\infty}\frac{\left(2n\right)^{2n-1}-e\cdot\left(2n-1\right)^{2n-1}}{e^{2n}\cdot\left(2n-1\right)!}
\end{aligned}
$$
The factorial can be bounded with the lower bound of Stirling's approximation, $\sqrt{2\pi}\ n^{n+\frac12}e^{-n} \le n!$
$$\begin{aligned}|S|\leq
\left|\frac{1}{e\sqrt{2\pi}}\sum_{n=1}^{\infty}\frac{\left(\frac{2n}{2n-1}\right)^{2n-1}-e}{\left(2n-1\right)^{\frac{1}{2}}}\right|
\end{aligned}
$$
Note the series on the right is negative so its sign is flipped by the modulus from this point. With $\ln n \leq n-1$, we have $\left(\frac{2n}{2n-1}\right)^{2n-1} = e^{-\left(2n-1\right)\ln\left(1-\frac{1}{2n}\right)}\geq e^{1-\frac{1}{2n}}$
$$\begin{aligned}|S|&\leq
\frac{1}{\sqrt{2\pi}}\sum_{n=1}^{\infty}\frac{e^{\frac{1}{2n}}-1}{e^{\frac{1}{2n}}\left(2n-1\right)^{\frac{1}{2}}}
\\
&\leq
\frac{1}{\sqrt{2\pi}}\sum_{n=1}^{\infty}\frac{e^{\frac{1}{2n}}-1}{\left(2n-1\right)^{\frac{1}{2}}}
\end{aligned}
$$
As $e^x=\frac{1}{e^{-x}}\leq\frac{1}{1-x}$,
$$\begin{aligned}|S|&\leq
\frac{1}{\sqrt{2\pi}}\sum_{n=1}^{\infty}\frac{1}{\left(2n-1\right)^{\frac{3}{2}}}
\\
&\leq
\frac{1}{\sqrt{2\pi}}\left(\sum_{n=1}^{\infty}\frac{1}{n^{\frac{3}{2}}}-\sum_{n=1}^{\infty}\frac{1}{\left(2n\right)^{\frac{3}{2}}}\right)
\\
&\leq
\frac{1-\frac{1}{2\sqrt{2}}}{\sqrt{2\pi}}\sum_{n=1}^{\infty}{n^{-3/2}}
\end{aligned}
$$
Finally, as the series on the right has a strictly decreasing summand, we have $\sum_{n=1}^{\infty}{n^{-3/2}}\leq 1+\int_2^\infty (t-1)^{-3/2}\ \mathrm{d}t=3$, so $|S|\leq\frac{3}{4\sqrt{\pi}}\left(2\sqrt{2}-1\right)=0.774$ and $S$ is convergent.
Comment: I'm sorry for misunderstanding, but this is exactly what I didn't mean- I was actually trying to avoid Stirling, not Leibnitz rule :) but thank you for your time anyway


How can I drain a low pan into a drain at standard sink height?

Question: I am a dog groomer and the building I recently moved in was used as a Beauty Shop. The drain that my bathing tub is supposed to hook up at is located too high. I know the water will not drain uphill. Does anyone have any ideas on how to remedy this issue? I cannot put a drain in the floor due to concrete slab. I don't care about passing inspection or code, only if it will work. Thank you.
Comment: We would need to have some idea about the situation to help. Otherwise the answer is just "lower the pipe". Please provide a photo, sketch, or clear written description of the plumbing and wall or floor structure.
Comment: Are you leasing the building? Is your landlord OK with you opening up the wall to adjust plumbing?
Answer: Move the tub's connection to the drain lower at the wall (may need to make a hole) or put the dog tub higher. There are not a lot of options here.
If all else fails then a solution would be to drain the tub into a container on the floor and have an electric (or manual) pump to pump the water into the drain as it gets close to full.
Comment: Presumably there was a line of lavatories on the wall at the right height for reclining chairs to position people's heads for hair washing. There would have been p-traps in drains at some height above the floor.  In a commercial setting like a beauty shop would the p-traps have been outside or inside the wall? Would the p-traps be above the floor or under the floor? If inside the wall, presumably they are still there. If the traps are low enough, the OP may be able to just cut off some of the drain above the trap to get it below the drain from the dog washing station. Open the wall and see.


What is the meaning of "you know, be the pie"?

Question: Source: Head First JavaScript by Michael Morrison (2008)

With the right ingredients and a few flicks of the wrist, I can whip up just about anything. I just have to get close to what I'm making... you know, be the pie.

What does you know, be the pie mean? Here's the picture:
Answer: Be the pie is idiomatic, and means to become like the pie by entering the same state as it. If one is as the pie is, then concentration and baking skill will improve, by virtue of understanding, from the pie's perspective, the necessary qualities and processes for being delicious, as well as forgetting about all of the other things which commonly distract or worry us. The phrase can even go as far as meaning having a profound connection to some 'essence of pie'.
This is a twist on the common sports advice / trope be the ball.
You'll get a great (and hilarious) explanation if you watch this clip from the classic movie Caddyshack.
Answer: The idiom is actually "Be the X" or "Be X." "Be the pie" in the sentence you quoted is just the idiom as applied to that one situation. It's half-joke, half-serious.
The idiom is a parody of various schools of performance that encourage the student to abandon conscious control or preconceptions and pay attention to the task in a Zen-like manner. For example, in Method acting, you are taught not to "act like the character" but to "BE the character". Going back to the teachings of Constantin Stanislavski, this approach cultivates the actor's ability to act naturally and spontaneously, just as one acts in real life, as opposed to "classical acting", which taught gestures, intonations, and analysis of the script in order to create deliberate, consciously controlled effects. In Method acting, if the character is supposed to be feeling a certain emotion, the actor should genuinely feel that emotion during the performance. This makes emotional expression truthful, as opposed to merely "indicated" as in classical acting.
Sport has a similar need to let go of conscious control in order to get your best performance. In the 1970s, the book The Inner Game of Tennis by Timothy Gallwey became popular among both tennis coaches and acting teachers, for its techniques of getting the conscious mind "out of the way" so one's unconscious talents could respond spontaneously to the situation. The most famous exercise of this book was to watch the rotation of the tennis ball in order to give the conscious mind a sort of distraction while enabling the unconscious mind to see the motion of the ball and orchestrate all the precise muscular movements needed to hit it accurately.
Martial arts involve the same difficulty. One of the earliest famous "Be X" exhortations is Bruce Lee's "Be water, my friend" from 1971.
This whole style of teaching and coaching was briefly parodied in the 1980 movie Caddyshack. A pro golfer says to his caddy, "Danny, I'm going to give you a little advice. There's a force in the universe that makes things happen. All you have to do is get in touch with it. Stop thinking, let things happen, and be the ball." Danny finds it hard follow this advice, leading the golfer to complain, "You're not being the ball." This made "Be the ball" into a catchphrase in U.S. culture.
I don't know if any sports or acting coach ever really said "Be the ball," but this kind of teaching and coaching did reach some truly silly excesses in the 1970s. There's a famous, possibly not-entirely-true story about Dustin Hoffman and Laurence Olivier working together on Marathon Man in 1976. Hoffman came in for work disheveled and unrested. Olivier asked what happened, and Hoffman said he had stayed up three days and nights just as his character had. Olivier said, "Why don't you just try acting?" It should be noted, though, that Method acting really did revolutionize acting in the mid-20th century, producing acting performances more emotionally powerful and genuine than anything anyone had seen before.
Not to be confused with this.
Answer: I need to be the pie, in other words, I need to imagine that I am the pie. I need to look at things from the pie's perspective – Am I sweet enough? Do I need more sugar?
It sounds like a very Zen approach to cooking.
Comment: Every time I try this I end up getting burned.
Answer: The clue is in the earlier part of the sentence:

I have to get close to what I'm making [...]

The sentiment expressed is this: "Really get intimately familiar with what you are making. Let it get under your skin." This is what method acting is all about - the actor pretends not to be an actor, but to be the subject he is portraying. To act scared, you have to be scared. To act surprised, you have to be genuinely surprised. And to make a great pie, you have to,

you know, be the pie.

The expression "you know" in this sentence fragment is sometimes called a "filler" or "discourse particle". You could get by without it - but it creates a little bit of tension or anticipation. At the same time, it is often just used by the speaker to collect his thoughts - to come up with the perfect expression. The speaker believes it buys him time. In this case, without those two words the sentence would be come quite awkward; it might need to be rephrased like this:

I have to get close to what I'm making; I have to become one with the pie.

The filler "you know", in this case, makes the words flow more easily - in keeping with the sentiment expressed.
Answer: I think that the idea behind this statement, and the related ideas that other answers have shared, became popular in English because of this quote from Zen in the Art of Archery:

In the case of archery, the hitter and the hit are no longer two opposing objects, but are one reality.

In Western thought, there's a bit of poking fun at the idea, as you can see.
I'm not convinced that method acting is behind it, but of course that's as valid a point of view as this one.
Answer: Dr. Martin Luther King, Jr. once said, "Be the change you want to see in the world."  This means if you want the world to be a more polite place, be polite yourself.  If you want more understanding, be understanding.
It is an idea that by embodying the aspects of what you want to change, you can change the world a little bit at a time.  Understand what it is you want changed, and you can determine how to do so.
Sometimes we want a world of peace and tranquility, and sometimes we want a world with a flakier, buttery crust.
Comment: (2) Martin Luther King didn't say it, and neither did Gandhi (whom it's usually attributed to). The quotation is debunked as bumper-sticker fluff at ["Falser words were never spoken"](http://www.nytimes.com/2011/08/30/opinion/falser-words-were-never-spoken.html) and ["Misquotes that Bapu is forced to wear"](http://timesofindia.indiatimes.com/city/ahmedabad/Misquotes-that-Bapu-is-forced-to-wear/articleshow/10211948.cms?referral=PM).
Comment: There are two errors here. (1) The meaning is wrong. "Be the _X_" means to give up conscious control and let it happen the way the object "wants" it to, while "Be the change you want to see in the world" is the ultimate in conscious preconception and willful assertion.


I am flying from the UK to the EU. Can I bring meat products I bought previously in the EU?

Question: I have some meat products I bought in an EU country. They are in factory shrink wrap, with the producing country prominently displayed. Then I went on to visit the UK. Now I am heading back to the EU, a different country. Is it allowed to bring these meat products back?
Answer: The United Kingdom is not listed as country where exceptions are allowed in REGULATION (EU) 2019/2122 Article 7(e)

Andorra, Iceland, Liechtenstein, Norway, San Marino or Switzerland

There is no meation of returning goods, of EU origin, in their original undamaged, packaging.
Since meat products are listed in Part 2 of Annex I (List of goods which are not exempted from official controls at border control posts provided for in Article 7(c)), you should present/declare those goods to the customs official at the port of entry and let them decide if you may retain them or not.
Not declaring such items could lead to fines.


Would a low albedo substance warm up Mars?

Question: If Mars were coated in a dark substance that absorbs sunlight (including infrared light), would this heat up Mars?  I am envisioning a fine dust that is dispersed into the atmosphere, but possibly settles on Mars's surface all around.  If we were able to change the albedo, possibly down to as low as 1%, would that make Mars habitable (temperature wise)?  If the albedo were changed all the way to 1%, could this even make Mars too hot?
Comment: Whatever dark, fine dust you drop on Mars will have to compete with the massive quantity of, presumably lighter, fine dust that is already there.
Comment: Mars surface area is about 145 million square kilometers. Covering this would take a massive amount of black stuff. And once covered, winds would mix it with martian dust. It would take a astronomically massive amount.
Comment: One of the hopes is that a slight boost in temperature would vaporize frozen CO2 and trigger a runaway greenhouse effect. In my opinion this is unlikely. See http://hopsblog-hop.blogspot.com/2014/02/terraforming-mars-vs-orbital-habs.html
Answer: Of course! Actually this is one of the possible ways we have in order to make Mars friendlier
to humans. This technique is called Terraformation and it inludes the altering of the Mars surface's albedo. However, the feasibility of this plan is yet questionable and there are maybe better ways to achieve this increase in the temperature like CO$_2$ emissions. Here is a nice article discussing exactly this subject.
Answer: Asphalt roads do a great job at heating up cities! Mars can actually get up to 80F, so part of the challenge is preventing losing that heat in the low pressure atmosphere.


Connection to periodically electrify equipment

Question: I am designing a system where I have a set of 4 electrical components rotating in a circle. In the bottom stage, the electrical component is submerged in water. In the top stage, the electrical component needs to attach to a high voltage rail. I have a few ideas for this connection, but
I don't like most of them. Was looking for some input from here on ideas for this connection point (rotate in and contact, rotate out and release contact). Cost isn't a big issue here.
Comment: my first thought is to have leaf springs (bits of metal)sticking out on the ends of the components to make contact with the rail
Comment: you must specify , lead impedance, R+jX, arc voltage , suppression method, and a few other things
Answer: The safest would be to inductively couple the power and the device; similar to how a toothbrush charger works. Alternating current electricity goes through one side of the transformer, the magnetic field transfers the energy to the electronic load via a second transformer and power supply electronics. This will be a bit more expensive because each set of electronics will need this inductively coupled power supply. Depending on your configuration you may be able to mount the inductive coupler at the axis of rotation and one unit could power all of the devices at all times. Inductive coupling will be the safest option because there will be no exposed electrical connections.
The lowest cost (for a given power density) and riskiest option would be to use brushes. You would want to make sure you use proper safety measures to make sure humans were prevented from entering the area while the device is powered.
Answer: It is not clear, which part of setup you are asking about.
Old TVs and some radios have heterodyne module of such design, where contour coils or even small PCBs with active components switched with knob. Example: https://www.rfcafe.com/references/popular-electronics/taming-tv-tuner-popular-electronics-march-1967.htm They require cleaning, may be, every decade or two.
To drive such drum, obvious choice is to use AC or DC geared motor. Usage of maltese-cross gear is advisable to get good contact and overall simple and reliable operation.
Transformer with separate detachable switchable coils, or rotary transformer as signal and power coupler will require design and manufacturing of it and of additional electronic circuits both for rotor and stator parts, as it transfers only AC signal.
There will be a problem, what will happen when wet device will be powered on. If it is hermetic, then drying or blowing of at least connector part will be required.
Simplest and most reliable solution, i think, is to keep all devices always connected and assembled in parallel, dip them into water, then pull out and test. In this setup you can use just 4 (or much more) sets of typical relays to do sequential test, just like in typical test equipment, and simple up-down mechanism.


isaac random number generator and the type of encryption it is used for (game packet encryption)?

Question: I recently found isaac but I'm not sure what type of encryption is possible using it. Does the random number generator itself become the message somehow or does it get used as a seed for an encryption method? If so, what; and can someone maybe give some code example in a C based language (if possible). If you just mention the encryption name thats fine. Basically I need this for encrypting mmorpg tcp packets (online gaming for the non-gamer) in order to prevent MITM attacks and whatever other attacks are possible to prevent.
Comment: Why not just use SSL? It'll give you even better transport security and most languages have built-in support.
Comment: @Polynomial I'll try that instead.
Comment: Don't roll your own crypto. However, ISAAC may be somewhat appropriate if you are actually using it only for (CS)PRNG purposes as part of the game (rather than as part of crypto for the game). That said, ISAAC is old (semi-abandoned) code which was implemented before the advent of 64-bit hardware.
Answer: If you want to ensure security of your communications, in particular prevent Man-in-the-Middle attacks, you need much more than encryption. Encryption only provides confidentiality, but does not prevent alterations (e.g. replaying packets, dropping packets, reordering packets, switching bits...). You also need some integrity checks, and a way to guarantee that the client is talking to the right server. Assembling cryptographic protocols is very hard (making it run is not hard; achieving security is hard), so the smart thing to do is to reuse an already defined protocol which does the job and has been well studied. This is called SSL (aka "TLS" in its recent versions). It will be much better than any homegrown scheme, and much easier for you since libraries implementing it already exist. The software which is easiest to implement is the software which has already been implemented.

For your specific question, it is possible to turn a deterministic cryptographically secure PRNG into an encryption scheme by using as key the internal starting state of the PRNG: you generate the key-dependent pseudo-random stream, which you then XOR with the data to encrypt; decryption is identical. This is how most stream ciphers work. Usage is delicate: you must NEVER encrypt two messages with the same key, because that would be the infamous two-times pad situation. When SSL uses RC4 (another, more well-known stream cipher), each connection uses a new key.
Whether ISAAC is cryptographically secure remains to be seen. It is old, and has attracted some reviewing by cryptographers, which is good; however, it was not part of the eSTREAM project and has not even been submitted to eBASC (for benchmarking on a lot of types of PC), so it looks a bit "abandoned". Since the "seeding" part (turning an initial key, as a small sequence of bits, into the starting initial state of the PRNG) is not specified, one can argue that ISAAC, as a cryptographic algorithm, was never "completed", precluding any decent effort at cryptanalysis. Studying it for academic purposes is fine, but I must recommend against using it for any production usage. And, anyway, you should really use SSL.
Comment: Is there any way to pick the type of encryption SSL uses for sending packets for example in openSSL, or what type of encyrption does openSSL generally use?
Comment: In SSL, the set of algorithms in force for a given connection is called a _cipher suite_ and is negotiated between the client and the server. The client announces what cipher suites it supports and is willing to use, and the server chooses one among them. All decent SSL implementations (including OpenSSL) allow you to configure both client and server in that respect.
Answer: In short, given that you can't or don't want to use SSL (that would be a good choice imVHo), here's how to use ISAAC to encrypt a stream

Pick a key, either entered by the user or derived from informations you have about him (stuff stored somewhere and/or retrieved from the current connection)
Use PKCS #5 v2.0 to generate an adequate number of bytes deriving them from the above key
Seed the ISAAC CSPRNG using the derived bytes block
Now, for each input byte, get a byte from ISAAC and use XOR to en/de-code the byte

That's all, the approach is the same as using OTP and basically gives you the same security level of the vanilla XOR applied to an input stream and having a totally random key of the same length of the input stream.


STM32CubeIDE: Why does Serial Wire Viewer show Unknown Function?

Question: I'm trying to use the STM32CubeIDE's Serial Wire Viever Statistical Profiling tool. The problem I face with is that the result table does not show all functions visited. I, especially, want to see the functions from my own 'mySource.c' file. I tried to add a 500ms delay into some of them, but even then I couldn't see any entry for them in profiling table. I'm sure that those functions are visited at least one time. Also, an entry named "Unknown function" is in table somehow. It has an instruction address of 0x80033F4, which is located at the very end of machine code, in a function named "_fini".
What do you think that I'm doing wrong?
Comment: @Andyaka might be pretty microcontroller-debugging-specific
Comment: Is this a valid EE question?
Answer:
Compilers will inline functions if their call-chain is trivial, so that it looks like your function doesn't exist
Sometimes, that can also lead to emission of "anonymous functions"
A debugger can't know in what function it is if the stack frame isn't set up in a way the debugger understands. That's a common problem with interrupt handlers, or if you're using an operating system on your target that the debugger doesn't understand.
Your "delay" is quite possibly not a time spent in that function, but actually a call to the RTOS to commence execution at that point in 500 ms and do something else or go to sleep in the meantime.
<code>_fini</code> is a function name that you find in UNIX-targetting shared libraries. It's what the runtime loader calls before it tries to unload a shared library. I'm pretty sure you don't have shared libraries on an STM32, so that symbol should not exist. You're probably not using the right linker scripts and the wrong EABI for your compiler. Have you perhaps been trying to link against some shared library by accident? For example the fully-fledged libc?


Insufficient privilege error when deleting Salesforce Files (ContentDocument) from Web service call

Question: I am unable to successfully delete a file from Salesforce with Apex when executed as a web service call from an external service. Running the following code behaves differently depending on whether it is executed anonymously via dev console or from the external service via the SOAP API. I've simplified the code to keep it succinct, but this captures the essence of what I'm trying to do.
global with sharing class CRMDocumentIntakeService{

    // CRM Document Metadata elements
    global class CRMDocMetadata{
        webservice String filenetGUID;
        webservice String documentID;
        webservice String docTitle;
        webservice String docDescription;
        webservice String docType;
        webservice Date   docReceivedDate;
        webservice String source;
        webservice String channel;
        webservice String workflowSubscription;
        webservice String indicator1; // defaults to 'CRM'
        webservice String objectType; // eg CRM Docs
        webservice String recordID;    //  eg Says Source and required
    }
}

global with sharing class CRMSFDCDocumentService{

    WebService static void processCRMDocument(CRMDocumentIntakeService.CRMDocMetadata filenetDoc,String messageID) {
        System.debug('Running user: ' + UserInfo.getUserName());
        CRMSFDCDocumentServiceHelper.processCRMDocument('0691g000000GkaNAAS');
    }

}

public with sharing class CRMSFDCDocumentServiceHelper {
  public static void processCRMDocument(Id documentId) {

      ContentDocument objContentDoc;

      objContentDoc = [SELECT Id FROM ContentDocument WHERE Id = :documentId];

      delete objContentDoc;

  }
}

I created a file by uploading a PDF to a Case record with my own user account. I have the Salesforce Files setting enabled to automatically use the "set by record" sharing option.

When I execute the code via the external service (triggered by outbound message), then I receive the following error message: Delete failed. First exception on row 0 with id 0691g000000GkaNAAS; first error: INSUFFICIENT_ACCESS_OR_READONLY, insufficient access rights on object id: []
If I log in as the same service account user and execute the code via developer console, then no error occurs and the file is successfully deleted. Here's the anonymous apex block I'm running:
CRMDocumentIntakeService.CRMDocMetadata filenetDoc = new CRMDocumentIntakeService.CRMDocMetadata();
filenetDoc.source = 'P8';
filenetDoc.indicator1 = 'CRM-a0g1g000000mT9p';
filenetDoc.filenetGUID = '{70949B73-0000-C210-9788-ECC0F8579CCE}';
filenetDoc.documentID = 'a0g1g000000mT9p';
filenetDoc.channel = 'WEB';

CRMSFDCDocumentService.processCRMDocument(filenetDoc, '6bc2316ed1bf13eaaef8');

I am aware that permissions around Salesforce Files work much differently than the old attachments object, but the fact that the service account user is able to delete the file from the Files tab in the UI and through Anonymous Apex leads me to believe that this difference may be due to how the web service call runs within system context. I tried changing the classes to be "without sharing", but that did not make any difference. I also updated the API version on all 3 classes to no avail. I also confirmed that the user has a CRM Content feature license and that the profile has the "Manage Salesforce CRM Content" permission enabled.
Any help would be most appreciated.
Thanks!
Comment: when the web service user logs in to sfdc, there's an explicit API version. Any chance it is  an "older" version; execute anonymous would be using the current version (v49)
Comment: @cropredy I'm sure it is an older version, but would the API version of the authentication request override the API versions of the Apex classes being executed?
Answer: This ended up being an issue with API version. I thought I had updated all of the classes to 49.0, but I missed one. Changing it resolved the permissions issue.


KVM: virt-install "Unsupported sound model 'ich6'"

Question: Is it possible to add "Intel HD Audio" to a KVM VM with "virt-install" in Ubuntu 11.04? Using "kvm" could do this so I think it is only a problem of virt-install, maybe the script needs an update. On Fedora 15 "--soundhw ich6" works perfect.
Answer: What you see is what you get:

$ lsb_release -sd
Ubuntu 11.04

$ qemu -soundhw help
Unknown sound card name `help'
Valid sound card names (comma separated):
pcspk       PC speaker
sb16        Creative Sound Blaster 16
ac97        Intel 82801AA AC97 Audio
es1370      ENSONIQ AudioPCI ES1370
hda         Intel HD Audio

-soundhw all will enable all of the above

So try -soundhw hda


When setting up LAMP for testing at a local machine, how do I make sure it's not remote accessible?

Question: I'm setting up a LAMP stack on my local machine for testing. How do I make sure the web server is not remote accessible?
Comment: Use a private IP address. https://en.wikipedia.org/wiki/Private_network Make sure you are not using NAT for the IP address range. These IP addresses are not supposed to be routable. Just make sure you are not using a highly predicable IP address such as 10.0.0.1, 10.0.0.2, etc. You may need to use the IP range on more than one computer so that you can see your server.
Comment: Assuming you are accessing the internet behind a router then... Unless you specifically setup port forwarding to forward requests made to your external IP on port 80 to your web server hosted on your local machine then your web server is not going to be accessible remotely.
Answer: In your http configuration file set up Allow from and Deny from rules.
Example:
Deny from all
Allow from 127.0.0.1

(insert your ip address in place of the 127.0.0.1)
The exact rule is different on apache 2.2 vs 2.4
Review this page to see the difference betweeen 2.2 and 2.4:
https://httpd.apache.org/docs/2.4/upgrading.html
Example Deny All Rule 2.2 vs 2.4:
2.2 configuration:
Order deny,allow
Deny from all

2.4 configuration:
Require all denied

Answer: I have a better approach to this:
There is a Listen directive in apache that allows you to specify which ports and IP addresses you want apache to work with.
For 100% security away from the outside world, use the following setting:
Listen 127.0.0.1:80
That IP address 127.0.0.1 represents localhost and is never accessible to anyone outside. Any outsider trying to access your site via that address will either get a bunch of errors or resources from their computer only.
When using this setup, start your URLs with http://127.0.0.1 when running tests.
Comment: Could you elaborate a bit on where I specify this? Place `Listen 127.0.0.1:80` in `http.conf`, is it that easy?
Comment: More precisely: On Apache2, where should I put it?
Answer: I recommend setting up a Virtual Machine (VirtualBox or VMWare) with LAMP set up within that. You can use ssh to interact with, send, or retrieve files in/out of the Virtual Machine or you can use a virtual monitor to connect to the desktop. You only have to worry about outside access if you explicitly set it up and you can set up your application just as if it was on a production server with a FCDN (www.Example.test) by editing your host file.
When developing a LAMP application I like to keep my bare metal OS and development environments separate.
Your Local machine got a virus? Just save the Virtual Machine with your lamp stack somewhere else and refactor your local drive.
You messed up a setting in your LAMP setup? just use the Virtual Machine software to roll back.
During backup do you back up the full os or just the new LAMP code you are working on? With this setup you back up everything on the virtual machine including setting, files, "hardware" specs... Everything.
What about the dependent software? Are you comfortable having those potentially exposed on your local machine?
A virtual machine makes all of these questions moot and will make your development process a lot easier.
Also as long as you are not using NAT on your router or some similar setup you should be fine.