Slowing down 16 Psyche using an enormous solar sail to reach the inner planets

Question: I am writing a sci-fi story and would like my science as hard as possible.
I was thinking of using the solar sail as a kind of sea anchor. Slowing down, the asteroid would move down to the inner planets, where the metals would fetch a higher price than in Jupiter orbit.
In my story it would take more than a century to reach Mars and the whole solar sail is a scam to keep the miners placid. It won't slow the asteroid appreciable, and the owners use an array of rail guns to launch extremely accelerated slugs of metal to slow down the asteroid.
My question is how big a solar sail should be to slow down an asteroid? My protagonist discovers the scam when he tries to calculate the size of the solar sail. Alas, I am unable to do the calculation myself.
Comment: The "scam" makes no sense. Unless it's very nearly big enough to do the job, any observers will be able to see if the sail isn't big enough, not just your protagonist. If it's so close to being big enough, making it slightly larger would probably be cheaper than adding a bunch of mass drivers. And why would miners care about the propulsion system used, anyway?
Comment: Aside from that, whatever propulsion system they use for moving the asteroid in a century or so could instead start delivering smaller amounts of mined material in a few years. Those mass drivers could shoot the material directly to its destination. Moving the whole asteroid only really makes sense if you need all of the material in one place.
Comment: You could start reading here: https://www.quora.com/Could-we-add-large-solar-sails-to-asteroids-to-slowly-change-their-orbits-How-much-mass-could-we-move-to-Earth-L2-point-or-maybe-a-bit-closer-using-sails-to-keep-them-in-place-Could-this-slowly-increase-Earths
Answer: First up, the answer for 'how big does the solar sail need to be' is always 'enormous' but lets see roughly HOW enormous.
Using impulse delta V calculations for a solar sail will get results that are too low, but it is quick so we have a look at maps like this and see that we need between 1 and 1.5 kilometers a second to do an asteroid belt/Mars transfer. If we want to do this maneuver in 10 years we need thrust that gets around 5*10-6 meters per second (5 micro meter per second) since we have lots of seconds to work with. F=ma gives us a needed thrust of 115 Tera Newtons since 16 Psyche is heavy.
The performance of solar sails is best right in close to the sun, and a lot of studies assume operation around Earth/Venus rather than out near Jupiter. Using the Earth orbit math from here indicates 9 micro Newtons per meter at Earth orbit. Using 1  μN per square meter getting 115 TN total needs a sail 10 million kilometers on a side. The gap between the orbits of Mars and Jupiter is around 500 million km to give this some scale.
This calculation ignores a LOT of things, starting with the mass of the sail, the non ideal thrust axis and using impulse delta V calculations for continuous thrust however the answer 'big enough that physically fitting between Mars and Jupiter is a problem' remains valid.
This number may seem implausibly large, but if solar thrust was substantial 16 Psyche would have already blown away given the long lifetime of the solar system.
In terms of the story this scam would seem unlikely to work since even with poor prior assumptions the needed sail area is just clearly immense. Solar sail projects often design with less 10kg of payload on a 100*100 meter sail.
What might make the plot work is that stated scheme is a team going out, processing the asteroid into sail material and sending economically meaningful amounts of material to be re-processed into other things on arrival (eg sail IS the payload). They launch sails that are visible, and take longer to arrive than planned (because they were 'so rich'). When decades latter they do start arriving they are instead found to be light weight inflatables, performing poorly be design not because they are heavy.
Would suggest the plot aspects of how fake sails are identified are more on topic in world building SE.


What should we do with questions tagged Home Remedies?

Question: Now that the site has been renamed, what should we do with questions marked with the home-remedies tag?
Answer: Does anything need to be done about them? I went through a bunch of them and they range from bad questions that should have been closed the day they were asked to some pretty good ones with good answers. We could close the bad ones, but that wouldn't put much of a dent in the inventory of old, bad questions so I don't know if it's worth it.
Going forward, I expect most questions with that tag will end up closed as requests for advice, for lack of prior research, or for being ungrounded in sound science. (We need to revisit our close reasons and that last one needs to be added, IMO).
Answer: I want to throw out some thoughts that need to be considered when discussing this.
A number of those Qs have evidence-based answers already, such as "does X work for a cold?" and the studied non-pharmacological remedies are listed with solid evidence for efficacy (honey, zinc, etc).  But in general MANY things that could be grouped in "home remedies" haven't been scientifically studied, including a plethora of off-the-wall speculation "do pickles cure cancer?" type questions, so there is not going to be a good evidence-based answer for some of these questions.
Ideally that should be the defining factor: is there a sufficient evidence base to answer it.  But there are several difficulties to that requirement.
One is that most askers won't know the difference between a ridiculous claim from someone's blog and a truly evidence-based home remedy ahead of time.  That's basically exactly why they're asking.
Two, part of the deficit is in OUR OWN knowledge - the "evidence" is not universally known by everyone for everything. Naturopaths have journals that review evidence that isn't in standard medical journals, and some of what I HAVE read stands up very well to scrutiny.  Same with functional medicine, which is often still considered fringe by mainstream allopathy despite the varying degrees of evidence for their tenets. This could become a minefield depending on who participates here. There is always a lag between new research and adoption into clinical guidelines.  That's part of why clinicians learn how to appraise literature themselves.
Three, we have a fairly small expert participant base at this time.  For example, we have 200+ well-written-but-very-niche questions on tendonopathies but no orthopedist with specialized knowledge in that area.  So they sit unanswered and pile up.  So what is answerable and what is not isn't always clear.
I look forward to seeing other thoughts on how to approach this.


Protocol for Submitting Fellowship Application where I need to see my advisor's Recommendation Letter

Question: I'm applying to a graduate fellowship program that has extremely strict rules about submission, and I must submit my application as one PDF, including my letter of recommendation from my advisor. He's written me several letters before that I haven't seen, but how am I supposed to ask for this letter?
Answer: Just ask.  Tell him the rules of the fellowship application (with a link so he can verify) and ask if he's comfortable writing a letter that you would be able to read.
If he's not (and this would be an entirely reasonable position), see if you can work out something else.  For instance, you might be able to send all your other materials to your advisor, or to some third party such as an administrative assistant, who would compile everything together with the letter and submit it on your behalf.  Or you (or better, the professor) could contact the fellowship funding organization and explain the situation, and ask if they can suggest any alternative methods of submission.
In the worst case, if there is no way to resolve the conflict, then you simply won't be able to apply for this fellowship.  Seek out others.
Comment: What possible reason could someone who has agreed to write a recommendation letter before have for refusing to write another one that the student would be able to see?


How can I nominate one of my own questions for deletion?

Question: Some of my old questions could even be misleading, since they ask about some software or framework that is completely different today, or my own subjective understanding that a question from my account has been irrelevant for many years, or could lead to some misunderstanding about something else. The "obstacle" is usually that my question has been answered and then it usually needs some exceptional reason to get deleted (it would delete the answers and comments as well I suppose). But if the question really is "low-quality" and appears irrelevant for everybody today, even though it was answered and answer got accepted, is there a routine for me to request it to be deleted, or would that be considered some violation of agreement to do it?
Comment: *"How can I nominate one of my own questions for deletion"* - Hm. It's probably best not to consider them yours anymore. How to delete a piece of community property that you brought into existence is more like it.
Comment: But that is simply the wording of it, I mean even if a movie is not copyrighted (many movies do not have copyright, sometimes by mistakes), one may still call it the work of the director or why not? https://en.wikipedia.org/wiki/List_of_films_in_the_public_domain_in_the_United_States Many films are in the public domain but does that mean that it isn't the director's work still
Comment: @Gimby Also say it to the answer that got 17 upvotes that they are immediately wrong when calling it my question "You delete a lot of your questions"
Comment: I said you should consider it differently, you personally. Doing so makes it easier to reason when you should or should not delete something. How it is phrased in the question and especially the answer does not really matter all that much, it is how you personally choose to interpret the situation that matters.
Answer: Hmm. You delete a lot of your questions (~28% of the total number asked). I haven't looked into any of the details (i.e., I haven't read any of the deleted questions), but I don't really understand that or why you think it's helpful.
Just because software or frameworks change doesn't mean that the older questions about it are not useful. People still use older versions of things. If your questions are not clear and might be confusing to people, then edit them instead of deleting them outright.

The "obstacle" is usually that my question has been answered and then it usually needs some exceptional reason to get deleted (it would delete the answers and comments as well I suppose).

Yes, that's exactly why. Not only have people put time into answering the question, but if the question and/or its answer(s) have been upvoted, then it's a pretty good sign that people have found it useful over the years. Deleting that would be destructive of value. The whole purpose of Stack Overflow is to become a repository of knowledge. If you delete useful knowledge from that repository, that makes the repository a whole lot less useful.
Of course, as you say, there are inevitably going to be exceptions to this rule, but they're a lot fewer and far between than you seem to think. The only questions that would be "irrelevant for everybody today" are those that ask about services (e.g., APIs) that have been permanently shut down—and, even then, that doesn't always make the Q&As useless. Just because the Q&As are no longer useful in an obvious way to you doesn't make them categorically useless.
At any rate, there is one way that you can get the questions deleted, even though the system won't let you do so: raise an "in need of moderator intervention" flag on the post and use the space provided to explain in detail why you are convinced that the post no longer adds any value whatsoever to the site (or, equivalently—even preferably—why you think it is harmful to leave it visible). It would also be a good idea to mention why you are asking a moderator to delete it, rather than doing it yourself. Something as simple as, "The system won't let me delete this, but I think it should be deleted because ..." is fine.
Note that, by doing this, you are essentially requesting that a moderator review your argument(s) and decide whether or not they agree with you. That, of course, means that it's possible that a moderator may disagree with you. Some people are shocked by this; don't be. We aren't offended because you legitimately asked us for help, even if we ultimately decide not to do what you asked. A declined flag on such a request doesn't necessarily mean "you shouldn't have asked"; it might just mean what it says: "declined". (Alternatively, it could mean that you failed to provide adequate explanation/justification for why the post should be deleted, or that you failed to explain why the task required moderator intervention. But if you followed the instructions and/or template given in the previous paragraph, that should not be an issue.)
Comment: *Nobody* uses old versions of the editor?
Comment: Having been that one person using an old version of software and having to dig through archive.org to find now deleted answers, please consider how useful it is to have old questions and answers available to people finding themselves dealing with legacy software for whatever reason.
Comment: A good example is questions from 2014 how to do something in the Unity 3D editor. Reading that answer today has nothing to do with the solution today. For my own questions, many of them are very hard to believe that they are relevant to other people, even less after a long time has gone. That somebody put in time and effort to answer it just to help me and nobody else, may not be a great reason to keep it around, and there might very well be a reason to keep the answer or the reward for the answer without the "stupid question" being there, about a situation with CSS or something like that
Comment: One guy in Iran with a 16 bit computer does so... No but my main point is that I had a lot of questions that seem too specific for only my own problem and would not qualify as relevant to anybody else. Maybe there is an idea of finding out if a very old question from me about CSS ever was relevant after it was answered. I do not believe it was. It is still there for the sake of SO rules and nothing else. It is impossible for me to believe that those questions fulfil the requirement of being relevant to other people than (1) the OP (2) the guy who answered (3) the SO staff upholding the terms
Comment: @NiklasRosencrantz - You can delete a question yourself, provided it's not been answered.  However, asking a question and then deleting it, is really toxic behavior.  Instead you should edit the question so it can be answered. If the question has been answered then you won't be able to delete them yourself.


Make "minimum quantity allowed in shopping cart" an attribute in product edit form

Question: I would love to bring "minimum order quantity in shopping cart" (per product) forward from advanced inventory to just below quantity field in product edit form.
Please help
Answer: Firstly, you can add a attribute for minimun qty products.
Secondly, you should capture and validate your minimum qty of product:

Event: "checkout_cart_product_add_before" validate minimum qty product
Plugin: beforeupdateItems in class Magento\Checkout\Model\Cart

Hope it will help you :)


Is the DeLorean locked to the Pacific Time Zone?

Question: Suppose the Doc or Marty drove the DeLorean to Arizona, which is one hour ahead of California, and then set the time coordinates for one hour ahead. Would the car realise that the local time had changed and adjust accordingly (as a 2017 mobile phone would by picking up the time from the cell network) or would it still show the present time on its display as the time in Hill Valley (as the clock on the dash of an ordinary car would)? And would the time jump result in the car travelling two hours ahead, one hour ahead or no time at all?
Comment: Very good article on the interface of the time control in the DeLorean : https://scifiinterfaces.wordpress.com/2015/10/21/time-circuits/
Comment: Oh! And how about DST?
Answer: Let's assume the DeLorean only moves in time, not in space.
Doc says there are three lines :

Where you are going
Where you are
Where you came from

I suppose the "where you are" should automatically adapt to the local zone when you travel through states, so every destination date modification should take account of that previously modified timezone.
I'm French so I don't know how people managed timezones during trips in USA in 1985 so I don't know if this sort of automation was possible. Maybe the driver must had to change the time on the time circuits manually...
Comment: Yes, it's all relative . . .
Comment: WRT your last comment: I guess they did have to adjust their watches manually; same as travelling between, say Spain and Portugal. The technology to change clocks automatically was available, but it was far too expensive for ordinary people to have access to.


Upgrading 13.04 to 13.10 compatibility

Question: I have an AMD CPU with radeon graphics card tower. When I tried to install 12.04 and 13.10 using burned disc I had problems with the graphics from the installation phase. 13.04 installed without problems and after the installation I downloaded the catalyst software which improved performance. I was wondering if upgrading to 13.10 using the notification popup that appears at startup is going to mess up the drivers again, or it should be safe?
Answer: I had an AMD/Intel Hybrid Graphics Card with proprietary driver working well under Ubuntu 13.04 and I experienced a number of problems while upgrading to 13.10, and finally managed to get it done a couple of weeks ago.
I don't know much about the cause(s) of upgrading problems (which I never had before in years with Ubuntu) I experienced and how they disappeared as I took the precaution of disabling the proprietary AMD driver and switching to much more trouble-free Intel driver before upgrade on both occasions.
But my experience shows that it's very handy to use Clonezilla to backup your Ubuntu partition so that you can always go back in time in case of a disaster ;-)
Answer: A simple way is to check!

Get the Ubuntu 13.10 ISO.
Get your hands on a USB drive or a Cd/DVD.
Create an bootable USB/CD/DVD using unetbootin or multibootusb or any of your favorite software.
Boot the device and check if everything goes well.
If everything is fine, upgrade.

If you want to save some data, you can use the iso to do an in-place-upgrade. Just select install-->update existing OS.

The easier way is to upgrade!(blind dive in)
You can even ask someone with same/similar configuration using Ubuntu 13.10

Upgrading 13.04 to 13.10 compatibility


Canonical form for marginal liklihood integral: random variable from exponentially modified gaussian with power mean-variance relationship

Question: For a group of random variables $X_{i:\,0\leq i < k}$, I am interested in finding the liklihood $f(x\in X_i)=\text{P}(x|\text{model}$) given that $X_i \sim \mathcal{N}(\mu_i+\Theta_i, e^{\beta_0}(\mu_i+\Theta_i)^{\beta_1})$, $\Theta \sim \text{Exp}(\phi)$. Or, in other words, an exponentially modified gaussian with a mean-variance relationship modeled with two parameters $\beta_0,\beta_1$ s.t. $\log\text{Var}(X) = \beta_0+\beta_1\log\mathbb{E}(X)$. This gives the marginal liklihood:$$f(x) = \frac{1}{\phi\sqrt{2\pi}}\int_0^\infty e^{-\frac{1}{2}\beta_0}(\mu_i+\Theta_i)^{-\frac{1}{2}\beta_1}\exp\left(-\frac{(x-(\mu_i+\Theta_i))^2}{e^{\beta_0}(\mu_i+\Theta_i)^{\beta_1}}-\frac{1}{\phi}\Theta_i \right)d\Theta_i  $$
Currently I use numerical integration, but I am wondering if there is a canonical form that could speed up the integration (such as in terms of hypergeometric functions)? Any suggestions, including suggestions on algorithms that avoid integration all together, are welcome.
EDIT: While writing this, I found this post about the integral of a polynomial exponential, which I adapted to my particular rational function to yield:
$$\frac{1}{\phi\sqrt{2\pi}}e^{-\frac{\mu_i}{\phi}}\sum_k^\infty \left[\sum_{\substack{p \\2n+m=k}}^\infty\frac{\phi^N\Gamma(N)}{(-2)^{n+p}e^{(n+m+p)\beta_0}n!m!p!}\right]x^k$$ where $N=m+2p+1-(n+m+p+\frac{1}{2})\beta_1$. Not sure if this actually converges, or if it is any better than numerical integration, though if the series converges for at least $|x| < 1,\phi < 1,$ and is rapid enough, it might be. It would also be nice to have a closed form for the coefficients. They seem to converge only when $\beta_1 > 1$, even though the integral should converge for all values of $\beta_1$. Using $2-\beta_1$ as the highest power when evaluating the integral might fix that.
Answer: I found a solution in the Gauss-Laguerre quadrature, which significantly sped up the numerical integration when compared to the standard integrate function in R.


Screen command set shell title to current host name

Question: I would like to know how can I set the shell title to the name of host we are currently logged into.
My scenario is like this.
I log into host  A then open up screen
and create several new windows and ssh to different hosts on those windows.
So I would like screen title at the bottom to show the current host it is in.
Comment: I'm using terminator
Answer: One way to do this is to use the LocalCommand feature of ssh. With this method, an escape sequence to change the terminal's title will be printed after a successful connection to a remote host.
Edit or create ~/.ssh/config to include something like:
Host *
    PermitLocalCommand yes
    LocalCommand printf '\033]0;%%s\007' '%h'

The downside of this method is that the title remains changed after logging out of the remote server. You can get around that with:
printf '\033]0;%s\007' "$(uname -n)"

If you want to automate this, you could use a function:
lssh () {
    /path/to/ssh "$@"
    printf '\033]0;%s\007' "$(uname -n)"
}

This answer assumes that your terminal emulator uses the same escape sequences as XTerm. If this is not the case, you should check the documentation for your specific terminal emulator.
One caveat in the case of GNU screen is that a single terminal window may contain several virtual windows. In that case, you could use a different escape sequence (\033k%s\033\\) to set the internal title of a single virtual window.


Why can't I open the console in Oblivion?

Question: I used to play Oblivion on my old HP Laptop and the console commands worked fine, but since I brought my new computer, suddenly the console doesn't open when I press the tilde key. (Next to the 1 key.) I have an MSI AE 2020 touchscreen computer with NVIDIA ION. My keyboard is a MSI StarTypeES500.
Comment: You probably just haven't enabled the console in your new install http://www.uesp.net/wiki/Oblivion:Console
Answer: Make sure you have set bAllowConsole to 1 in your oblivion.ini file.
It's likely you had this set on your old PC and not on the new one.
Comment: Additionaly: Check if disabling any infrared receiver in the Device Manager helps. Seriously - Oblivion has problems with that specific kind of HID, and Bethesda as usual never bothered to patch it ...
Answer: There is a known issue with Microsoft eHome Infrared Transceiver - If the other methods don't work, then uninstall this:

Go to your Control Panel,
Click System and Security, -> System,
Go to Manage Devices, and find & click on Human Interface Devices
Once in there find a file called "Microsoft eHome Infrared Transceiver" and uninstall it (My info came from here: http://www.gamefaqs.com/boards/959559-/56821937)
Comment: How, exactly, does a completely unrelated system affect what you can or can't do in Oblivion?
Comment: "Thank you so much. Now I can mess around all I want and try to kill every last living thing on the wasteland." –OP of the GameFAQs question. How or why it works is a SU question.
Comment: @Frank Seems to be an unresolved issue, see http://www.uesp.net/wiki/Oblivion:Console. (General Info / Note at bottom)
Comment: Had this issue on Windows 7 -- solved with this answer. Thank you.


What are the implications of differences in confidentiality timeliness?

Question: From a security standpoint, what are the differences that must be addressed between data with a day-long confidentiality timeliness and data with timeliness of a year or more?
Answer: As a practical matter, in 2015, there is no difference provided we are talking about encryption using computing systems.
When data were encrypted by hand, or with relatively slow machines, it made a difference.  "We attack at dawn" could be encrypted with a much faster but weaker algorithm than "Swiss bank account: 123456."  Claude Shannon made note of this during World War II when he said that the amount of secrecy needed determines the amount of work that's appropriate.
Today, you'd use strong encryption for both because the time saving from using a weaker algorithm over, say, AES, is insignificant.
Furthermore, a weak-but-fast algorithm will fall very quickly today because the adversary will surely be using computers even if you are not.  The weak-but-fast algorithm is no longer useful.


Are settlers suited to specific tasks?

Question: For example, are some settlers better at farming than others? Are some of them better at fighting? Or can everyone do every job equally well?
Answer: Settlers are either assigned or not. There are no statistics regarding settlers and opening up VATS on them doesn't reveal any additional information either. Even if they're not they'll still fight if an enemy approaches them.
The exception being that the named settlers from Sanctuary cannot be used to set up Supply Routes.
Comment: Is this why the "original 5" do not seem to respond to my "assign" command(s)? (they are "named settlers?")
Comment: You should be able to assign them (I've got one standing on a guard tower) but you won't be able to set up a supply route (because the option is greyed out)
Answer: All settlers are non-personal which means that they can use any job you will give them.
There are no specials, advantages etc. if we are talking about simple settlers, not companions you sent to the settlement.
So if a settler doesn't do the job well, it means that there is no resource.   For example, each settler generates 6 food, but if it is less - there are just no plants to use.

Are settlers suited to specific tasks?


Alternative for OR condition after where clause in select statement Cassandra

Question: Is it possible in Cassandra to use multiple conditions union ed together after the where clause in a select statement like in any of the RDBMS. Here is my code :
SELECT * from TABLE_NAME WHERE COND1= 'something' OR COND2 = 'something';

Answer: Assuming COND is the name of your table's primary key, you can do:
SELECT * from TABLE_NAME WHERE COND1 in ('something', 'something');

So, there is no fully general OR operation, but it looks like this may be equivalent to what you were trying to do.
Remember, as you use CQL, that query planning is not meant to be one of its strengths. Cassandra code typically makes the assumption that you have huge amounts of data, so it will try to avoid doing any queries that might end up being expensive. In the RMDBS world, you structure your data according to intrinsic relationships (3rd normal form, etc), whereas in Cassandra, you structure your data according to the queries you expect to need. Denormalization is (forgive the pun) the norm.
Point is, CQL is intended to be a more familiar, friendly syntax for making Cassandra queries than the older Thrift RPC interface. It's not intended to be completely expressive and flexible the way that SQL is.
Comment: the paul, I have tried the above statement but its showing error in cql shell stating mismatched input 'IN' expecting set null. Remember In the example COND1 is secondary index.
Answer: Simple answer: there is no equivalent of OR
http://www.datastax.com/docs/0.8/dml/using_cql
Here is the command reference for v0.8:
http://www.datastax.com/docs/0.8/references/cql#cql-reference

SELECT [FIRST N] [REVERSED]  FROM   [USING ]
  [WHERE ] [LIMIT N];

..

The WHERE clause provides for filtering the rows that appear in results. The clause can filter on a key name, or range of keys, and in the case of indexed columns, on column values. Key filters are specified using the KEY keyword, a relational operator, (one of =, >, >=, <, and <=), and a term value. When terms appear on both sides of a relational operator it is assumed the filter applies to an indexed column. With column index filters, the term on the left of the operator is the name, the term on the right is the value to filter on.
Answer: Here is the syntax of CQL v3:
SELECT * | select_expression | DISTINCT partition
FROM [keyspace_name.] table_name
[WHERE partition_value
   [AND clustering_filters
   [AND static_filters]]]
[ORDER BY PK_column_name ASC|DESC]
[LIMIT N]
[ALLOW FILTERING]

then you can not use OR operation like SQL.


Variable observation space at each episode

Question: I have an enviroment with continuous actions and state variables. Every time I reset my env, between 2 and 5 balls spawn randomly in a box of 100x100 size. One of those balls (the red one) will receive an action (direction of movement) and will move according to some physics. This ball will always spawn.
Notice that the observation space only changes when we reset and start a new episode (when we move a step in time the observation space size remains the same). An example of my env:

Action space: the angle that we want to move the red ball
Observation space: the coordinates of the blue balls

The problem is that sometimes there will be only one blue ball, or two, or three... so the number of 2D coordinates in the observation will change.
Most of the reinforcement learning techniques have a fixed size state spaces, how can I deal with my dynamic size observation space and apply algorithms such as AC2, PPO, ... ? Should I consider an observation space with the maximum number of balls and make 0 the coordinates of the ones that didn't spawn ?
Answer: Actually, in most of these algorithms, that state is just used as input for some functions (e.g. some value or policy functions).
Given the correct class of functions (e.g. recurrent neural networks), these algorithms do have the ability to handle dynamic size observations.


Troubleshoot SysV slow shutdown

Question: The shutdown completes eventually but takes 7-8 min to finish. The OS is sles11. So I wonder is there anyway that I can add debug script to print any running processes and ask sysV init to execute it at the last stage of shutdown?
Answer: Script /etc/init.d/local.halt is executed when system shutdown. So put debug code to this file.

Troubleshoot SysV slow shutdown


Why do you create a View in a database?

Question: When and Why does some one decide that they need to create a View in their database?  Why not just run a normal stored procedure or select?
Comment: Check my [answer](https://stackoverflow.com/a/47203703/5320562) to a similar question, hope it helps!
Answer: A view provides several benefits.
1. Views can hide complexity
If you have a query that requires joining several tables, or has complex logic or calculations, you can code all that logic into a view, then select from the view just like you would a table.
2. Views can be used as a security mechanism
A view can select certain columns and/or rows from a table (or tables), and permissions set on the view instead of the underlying tables.  This allows surfacing only the data that a user needs to see.
3. Views can simplify supporting legacy code
If you need to refactor a table that would break a lot of code, you can replace the table with a view of the same name.  The view provides the exact same schema as the original table, while the actual schema has changed.  This keeps the legacy code that references the table from breaking, allowing you to change the legacy code at your leisure.
These are just some of the many examples of how views can be useful.
Comment: item 3 is a reason that no one else seems to have pointed out yet
Comment: 3 Is really the most powerful property of views. It's what help provides *logical data independence* the fact that you can provide an interface to the DB independent of the underlying logical database is a very powerful concept.
Comment: I think point 3 is more of stop gap than anything else. Eventually when you get round to updating the legacy code, you'll not only have to change the code behind the view but also all the code that have been built on top of the view. My 2cents
Comment: @John this incurred technical debt has to be repaid sooner or later no? In 10 years it might not matter to that engineer who wrote it 10 years ago but it matters to the company.
Comment: Changing your main DB and everything depending on it is a bad choice to make because you might 'need it in 10 years'. Technical debt isn't to be avoided at all costs, only if the expected cost of fixing it later is more than the definite cost of fixing it now.
Comment: @Crappy 4. Views can also be indexed physically (e.g. Indexed Views in MS SQL Server)
Comment: How about query performance? Can view increase the performance of my queries?
Comment: As per your 3rd point, can we create view with same name as table?
Comment: It's kind of vaguely implied in the 3rd point - the original table would be renamed to something else while the view is given the original name.
Comment: @devツ in MySQL 8, is not possible.
Comment: @DaveCarlile I am confused with 3, I understand a schema how the table definition (fields and types) and a View represents complex queries based in the mentioned original table schema (and perhaps from other tables - UNION scenario). So how a view would define a new schema definition? Pls can you expand the idea?. Seems here the trick is have the view having the original table name and returning the same fields retrieved,  such as if was used the original table. Am I right?
Comment: @DaveCarlile Thus the original table can be change its name, add/change/delete  fields, the view should update this once and the clients are not aware about this. Am I correct?. Seems here would be problematic if some fields are removed from the original table
Answer: Among other things, it can be used for security. If you have a "customer" table, you might want to give all of your sales people access to the name, address, zipcode, etc. fields, but not credit_card_number. You can create a view that only includes the columns they need access to and then grant them access on the view.
Comment: I assumed that the other answers to this question would describe the "other things". :-)
Comment: @PranavBilurkar Yes, if you completely control the queries that the users run. If the users have the ability to run their own queries (through some interactive SQL program or writing their own scripts), they can run `select * from customer` which gives them access to everything. If you give them access to the view and not the table, they **cannot** access fields that aren't in the view.
Comment: `Select name, address, zipcode from customer` wouldn't serve the purpose instead of `creating a view`?
Comment: interesting.   Security is a good answer.  What 'other things' do you have in mind?
Comment: This is the best explanation of why we need to create a view because it included examples.
Answer: A view is an encapsulation of a query.  Queries that are turned into views tend to be complicated and as such saving them as a view for reuse can be advantageous.
Comment: How complicated is a personal choice really, there's no set threshold. You would often use a view if you don't want to duplicate logic in multiple applications or different points in your application for example. By making it a view you hide that logic and are able to share it easily.
Comment: @MedicineMan - A stored procedure returns a result-set whereas a view represents a virtual table that allows you to use as a table in other queries.
Comment: can't you do the same with a stored procedure that has a select?  have i incorrectly thought of stored procedures as a way to store complex query logic?  should complex queries be done in views instead of stored procedures? Whats the advantage of a stored procedure here?
Comment: I think this point about result set vs virtual table seems to be a key point that I didn't understand.
Comment: So you would want to create a view when you have a complicated query?  How complicated of a query, what's the threshold? What do you gain from making it a view?
Comment: FYI some database systems allow selecting from a stored procedure as if it were a table or view, so you get the best of both worlds.
Comment: I believe in the past there were caching advantages also.
I tend to use views for reusability. also its handy to tie lots of different db's together into a views layer for instnace (not that i entirely agree with this )
Answer: I usually create views to de-normalize and/or aggregate data frequently used for reporting purposes.
EDIT
By way of elaboration, if I were to have a database in which some of the entities were person, company, role, owner type, order, order detail, address and phone, where the person table stored both employees and contacts and the address and phone tables stored phone numbers for both persons and companies, and the development team were tasked with generating reports (or making reporting data accessible to non-developers) such as sales by employee, or sales by customer, or sales by region, sales by month, customers by state, etc I would create a set of views that de-normalized the relationships between the database entities so that a more integrated view (no pun intended) of the real world entities was available. Some of the benefits could include:

Reducing redundancy in writing queries
Establishing a standard for relating entities
Providing opportunities to
evaluate and maximize performance
for complex calculations and joins
(e.g. indexing on Schemabound views
in MSSQL)
Making data more accessible and
intuitive to team members and non-developers.
Comment: can you elaborate on this?  Your answer is being voted up quite a bit, but I'm not getting the value that everyone else seems to
Answer: Several reasons:
If you have complicated joins, it is sometimes best to have a view so that any access will always have the joins correct and the developers don;t have to remember all the tables they might need. Typically this might be for a financial application where it would be extremely important that all financial reports are based on the same set of data.
If you have users you want to limit the records they can ever see, you can use a view, give them access only to the view not the underlying tables and then query the view
Crystal reports seems to prefer to use views to stored procs, so people who do a lot of report writing tend to use a lot of views
Views are also very useful when refactoring databases. You can often hide the change so that the old code doesn't see it by creating a view. Read on refactoring databases to see how this work as it is a very powerful way to refactor.
Answer: The one major advantage of a view over a stored procedure is that you can use a view just like you use a table. Namely, a view can be referred to directly in the FROM clause of a query. E.g., SELECT * FROM dbo.name_of_view.
In just about every other way, stored procedures are more powerful. You can pass in parameters, including out parameters that allow you effectively to return several values at once, you can do SELECT, INSERT, UPDATE, and DELETE operations, etc. etc.
If you want a View's ability to query from within the FROM clause, but you also want to be able to pass in parameters, there's a way to do that too. It's called a table-valued function.
Here's a pretty useful article on the topic:
http://databases.aspfaq.com/database/should-i-use-a-view-a-stored-procedure-or-a-user-defined-function.html
EDIT: By the way, this sort of raises the question, what advantage does a view have over a table-valued function? I don't have a really good answer to that, but I will note that the T-SQL syntax for creating a view is simpler than for a table-valued function, and users of your database may be more familiar with views.
Comment: Depending on the structure of the view, some views can be indexed. That is a big improvement over table valued functions.
Comment: +1 for being one of the few answers to address the issue of stored procedures against SELECT statements.  You're right to raise the issue of table functions.  Basically, view are likely to perform better than functions because they share the same engine.  There is an overhead (at least in Oracle) to be paid when switching from SQL to trabsactional SQL (i.e. PL/SQL).  But all the other stuff - security, encapsulation, etc - applies equally to procedures or functions as to views.
Answer: It can function as a good "middle man" between your ORM and your tables.
Example:
We had a Person table that we needed to change the structure on it so the column SomeColumn was going to be moved to another table and would have a one to many relationship to.
However, the majority of the system, with regards to the Person, still used the SomeColumn as a single thing, not many things.  We used a view to bring all of the SomeColumns together and put it in the view, which worked out nicely.
This worked because the data layer had changed, but the business requirement hadn't fundamentally changed, so the business objects didn't need to change.  If the business objects had to change I don't think this would have been a viable solution, but views definitely function as a good mid point.
Comment: interesting.  In your case, it is almost like an interface to the tables.
Answer: Here are two common reasons:
You can use it for security. Grant no permissions on the main table and create views that limits column or row access and grant permissions to users to see the view.
You can use use it for convenience. Join together some tables that you use together all the time in the view. This can make queries consistent and easier.
Answer: To Focus on Specific Data
Views allow users to focus on specific data that interests them and on the specific tasks for which they are responsible. Unnecessary data can be left out of the view. This also increases the security of the data because users can see only the data that is defined in the view and not the data in the underlying table. For more information about using views for security purposes, see Using Views as Security Mechanisms.
To Simplify Data Manipulation
Views can simplify how users manipulate data. You can define frequently used joins, projections, UNION queries, and SELECT queries as views so that users do not have to specify all the conditions and qualifications each time an additional operation is performed on that data. For example, a complex query that is used for reporting purposes and performs subqueries, outer joins, and aggregation to retrieve data from a group of tables can be created as a view. The view simplifies access to the data because the underlying query does not have to be written or submitted each time the report is generated; the view is queried instead. For more information about manipulating data.
You can also create inline user-defined functions that logically operate as parameterized views, or views that have parameters in WHERE-clause search conditions. For more information, see Inline User-defined Functions.
To Customize Data
Views allow different users to see data in different ways, even when they are using the same data concurrently. This is particularly advantageous when users with many different interests and skill levels share the same database. For example, a view can be created that retrieves only the data for the customers with whom an account manager deals. The view can determine which data to retrieve based on the login ID of the account manager who uses the view.
To Export and Import Data
Views can be used to export data to other applications. For example, you may want to use the stores and sales tables in the pubs database to analyze sales data using Microsoft® Excel. To do this, you can create a view based on the stores and sales tables. You can then use the bcp utility to export the data defined by the view. Data can also be imported into certain views from data files using the bcp utility or BULK INSERT statement providing that rows can be inserted into the view using the INSERT statement. For more information about the restrictions for copying data into views, see INSERT. For more information about using the bcp utility and BULK INSERT statement to copy data to and from a view, see Copying To or From a View.
To Combine Partitioned Data
The Transact-SQL UNION set operator can be used within a view to combine the results of two or more queries from separate tables into a single result set. This appears to the user as a single table called a partitioned view. For example, if one table contains sales data for Washington, and another table contains sales data for California, a view could be created from the UNION of those tables. The view represents the sales data for both regions.
To use partitioned views, you create several identical tables, specifying a constraint to determine the range of data that can be added to each table. The view is then created using these base tables. When the view is queried, SQL Server automatically determines which tables are affected by the query and references only those tables. For example, if a query specifies that only sales data for the state of Washington is required, SQL Server reads only the table containing the Washington sales data; no other tables are accessed.
Partitioned views can be based on data from multiple heterogeneous sources, such as remote servers, not just tables in the same database. For example, to combine data from different remote servers each of which stores data for a different region of your organization, you can create distributed queries that retrieve data from each data source, and then create a view based on those distributed queries. Any queries read only data from the tables on the remote servers that contains the data requested by the query; the other servers referenced by the distributed queries in the view are not accessed.
When you partition data across multiple tables or multiple servers, queries accessing only a fraction of the data can run faster because there is less data to scan. If the tables are located on different servers, or on a computer with multiple processors, each table involved in the query can also be scanned in parallel, thereby improving query performance. Additionally, maintenance tasks, such as rebuilding indexes or backing up a table, can execute more quickly.
By using a partitioned view, the data still appears as a single table and can be queried as such without having to reference the correct underlying table manually.
Partitioned views are updatable if either of these conditions is met:
An INSTEAD OF trigger is defined on the view with logic to support INSERT, UPDATE, and DELETE statements.
Both the view and the INSERT, UPDATE, and DELETE statements follow the rules defined for updatable partitioned views. For more information, see Creating a Partitioned View.
https://technet.microsoft.com/en-us/library/aa214282(v=sql.80).aspx#sql:join
Comment: I must say I've learned a few things here. "To Combine Partitioned Data" is something I was unaware of even the performance is a good benefit. If you build those partitioned tables correctly it could be a perfect improvement.
Comment: I also want to point out that this information is from an SQL2000 source that is no longer available in web page form, except in a legacy downloadable PDF from Microsoft with 20k pages (follow the link in the post above to download it). Page: 1139 "Scenarios for Using Views"
Answer: There is more than one reason to do this.  Sometimes makes common join queries easy as one can just query a table name instead of doing all the joins.
Another reason is to limit the data to different users.  So for instance:
Table1: Colums - USER_ID;USERNAME;SSN
Admin users can have privs on the actual table, but users that you don't want to have access to say the SSN, you create a view as

CREATE VIEW USERNAMES AS SELECT user_id, username FROM Table1;

Then give them privs to access the view and not the table.
Answer: Views can be a godsend when when doing reporting on legacy databases. In particular, you can use sensical table names instead of cryptic 5 letter names (where 2 of those are a common prefix!), or column names full of abbreviations that I'm sure made sense at the time.
Answer: Generally i go with views to make life easier, get extended details from some entity that's stored over multiple tables (eliminate lots of joins in  code to enhance readability) and sometimes to share data over multiple databases or even to make inserts easier to read.
Answer: Here is how to use a View along with permissions to limit the columns a user can update in the table.
/* This creates the view, limiting user to only 2 columns from MyTestTable */
CREATE VIEW dbo.myTESTview
WITH SCHEMABINDING AS
SELECT ID, Quantity FROM dbo.MyTestTable;

/* This uses the view to execute an update on the table MyTestTable */
UPDATE dbo.myTESTview
SET Quantity = 7
WHERE ID = 1

Answer: When I want to see a snapshot of a table(s), and/or view (in a read-only way)
Comment: what do you mean by a 'snapshot of a table'?  When or why would you want to do that?
Comment: There are many scenarios; say you want to run a complex query/store-precedure on a table without effecting and underlining table. You create a view (a read-only representation)
Comment: so if you want to run a complex query store procedure, couldn't you access the view in a read only fashion?  I really don't have the database experience to 'get' what you are talking about here.  Could you elaborate or provide a detailed example?
Answer: I like to use views over stored procedures when I am only running a query. Views can also simplify security, can be used to ease inserts/updates to multiple tables, and can be used to snapshot/materialize data (run a long-running query, and keep the results cached).
I've used materialized views for run longing queries that are not required to be kept accurate in real time.
Comment: when you are running a query as opposed to?  Why?  This point doesn't quite make sense
Comment: when you use a view, you know you are only perform a DML operation, when you call an SP you don't what else maybe happening before you get your data. I.e. calling a cache function, may return the cached dataset, but it doesn't mean you should call the SP everything you want the data. It simplifies the API to the data IMO
Answer: Views also break down very complex configuration and tables into managable chunks that are easily queried against. In our database, our entire table managment system is broken down into views from one large table.
Answer: This doesn't answer your question exactly but I thought it would be worth mentioning Materialized Views. My experience is mostly with Oracle but supposedly SQL-Server is fairly similar.
We used something similar in our architecture to address XML performance problems. Our systems are designed with a lot of data stored as XML on a row and applications might need to query particular values within it. Handling lots of XMLTypes and running XPaths across large number of rows has a large impact on performance so we use a form of materialized views to extract the desired XML nodes out into a relational table anytime the base table changes. This effectively provides a physical snapshot of the query at a point in time as opposed to standard views which would run their query on demand.
Answer: I see a stored procedure more as a method I can call against my data, whereas to me a view provides a mechanism to create a synthetic version of the base data against which queries or stored procedures can be created.  I'll create a view when simplification or aggregation makes sense.  I'll write a stored procedure when I want to provide a very specific service.
Comment: can you give examples of small services
Answer: One curious thing about views are that they are seen by Microsoft Access as tables: when you attach a Microsoft Access front-end to an SQL database using ODBC, you see the tables and views in the list of available tables.  So if you are preparing complicated reports in MS Access, you can let the SQL server do the joining and querying, and greatly simplify your life.  Ditto for preparing a query in MS Excel.
Answer: I only have 10 or so views in my production databases.  I use several for columns I use all the time.  One set I use come from 7 tables, some with outer joins and rather than rewrite that constantly I only have to call that view in a select and make one or 2 joins.  To me it is just a time saver.
Comment: pardon me if this is outside the scope of the question, but several people have mentioned this-- don't you incur some kind of performance penalty for doing this?
Comment: Not at all.  SQL Server optimizer show the exact same plan to select * from view as it does for the SQL joins equivalent to the view
Answer: I am creating xxx that maps all the relationships between a main table (like Products table) and reference tables (like ProductType or ProductDescriptionByLanguage). This will create a view that will allow me retrieve a product and all it's details translated from its foreign keys to its description.
Then I can use an ORM to create objects to easily build grids, combo boxes, etc.
Answer: For security: Gives each user permission to access the database only through a small set of views that contain the specific data the user or group of users is authorized to see, restricting user access to other data.
Simplicity for queries and structure: A view can draw data from several tables and present a single table, simplifying the information and turning multi-table queries into single-table queries for a view and it give users a specific view of the database structure, presenting the database as a set of virtual tables specific to particular users or groups of users.
For create consistent database structure: Views present a consistent, unchanged image of the database structure, even if underlying source tables are changed.
Answer: I think first one .To  hide the complexity of Query. Its  very appropriate for views .How when we normalize Database tables increases.Now to fetch data is very difficult when number of tables increases.So best way to  handle is follow views.If i am wrong correct me.
Comment: If you google it You would have got a very clear information for this question.
Answer: We create view to limit or ristrict from accessing all rows/column in a table.If the owner wants that only specific or limited rows/column needs to be shared,then he will create a view with those column.
Comment: This is only one reason why you should/could use a view.
Answer: Think of it as refactoring your database schema.

Why do you create a View in a database?


How do I manage eclipse plugins, preferences and configuration for a team?

Question: All the members of my team works with Eclipse. However, each one have different configuration, preferences and plugins. What is the best way to keep a baseline of plugins, preferences such as code styling and formatting, and other configuration in order to have similar start point but to allow each team member for specific configuration.
I am looking for a solution that will be easy to maintain also, means not too many files that resides in different locations.
Answer: A simple approach for preferences is to use File>Import and File>Export, choosing General>Preferences, then the preferences you want to share. For a few of my past teams, we stored the baseline preferences in version control.
Comment: Thanks, just stumbled upon this---it was exactly what I was looking for. I got a new dev box today and needed to copy my key bindings/prefs to a pristine Eclipse install. Worked like a charm...
Answer: You should check out Pulse. I've only used it in a standalone, single user environment, but it seems to work pretty well. I believe with the paid versions you can manage workspace preferences and settings across your group. I may try and get my company to try this out soon.
Basically, Pulse provides a central launchpad for Eclipse. It allows you to create Eclipse install profiles that consist of an Eclipse install and various plugins. From the launchpad, you select a profile and install it. This downloads Eclipse and the various plugins to a central folder on your machine. It then sets up a profile folder that somehow links the specified plugins for the profile. So when you launch, you only get the items in the profile regardless of what other profiles have installed.
Answer: We use a "baseline" approach where we have a central version managed by a few core members. The idea is to get the version downloaded, configured as you wish and then the workspace AND install packaged to the central location. Additionally, some plugins have config files that we store in a central location and we then point the baseline them (templates, formatter files, etc).
There is also commercial software that will do all this for you, if I can find it I'll post the link.
Hope this helps.
Answer: I asked a similar question and was recommended Yoxos. Havent had time to try it yet, but it looks promising.
Answer: I found a solution in another question on the site.
It recommends a plugin called workspace mechanic. Looks like it solves the preferences and configuration issues.
I am using it and it looks good for configuration. it doesn't give a solution for plugins though.
Answer: The most important part is the plugins that you are working on, I suppose. What we do is to put the source for all the plugins that are subject to development into revision control, then import the projects into a fresh Eclipse workspace without copying them. This is probably obvious.
A little trickier is the plugins that are part of the runtime environment. We have a special project (also under revision control) that contains those jars, organized in directories. Some are from Eclipse, some are from Spring, logging stuff etc. There also is a target definition file, that defines which of these plugins make up the environment. So you are not compiling and running against the Eclipse copy that you are developing in, but an independent set of plugins that is defined as the target platform.
Understanding and using a target platform makes a big difference, as it doesn't matter anymore what exact version of the IDE you are using - all developers will link against and test the same code. A nice side-effect is that you control the subset of plugins that are part of your product, and it is impossible to accidentally pull in 17 new plugins through an innocent new dependency.
PDE/Build unfortunately doesn't know about target definitions, but the file format is easy enough to figure out.
Finally, preferences and formatting etc can be exported to a file and stuck in revision control, if it matters. Standard formatting rules are useful, I guess.


My Sharepoint list is still in classic format despite migrating it to modern version

Question: I have a Sharepoint list switched in to the modern version but the look and feel didn't change although it says its already in the "new experience". It still displays the classic format. I've tried switching several different sharepoint lists under the same site and they worked perfectly fine. Does anyone know what could be the reason? Thanks in advance.
Answer: Have you checked the list page? Please edit the page of the list with issue, if there is a classic web part like a script editor, it will make the list unable to switch to modern experience.
Here is a blog having more information, you can have a check.


What is public key pinning

Question: How does public key pinning work and what problem does it solve?
Comment: Well, I know what certificate pinning is, but that might differ from generic "public key" pinning.
Comment: possible duplicate of [What is certificate pinning?](http://security.stackexchange.com/questions/29988/what-is-certificate-pinning)
Comment: For SSL, pinning means your browser should not automatically accept a new website certificate for an existing site as there are enough flaws in the Root CA ecology, that the new valid cert could be a government sockpuppet or a successful server hack.
Comment: That's why I'm here to ask :) well I have a rough idea but maybe one can give a clarifying example
Comment: to be honest I'm not sure. I did read the answer to that post but it didn't mention any concepts of public key pinning that I'm aware of right now.
Answer: It means that rather than trusting a central authority for validating the PKI, you are utilizing your own means to determine that a public key is valid.  Pinning allows removal of the trust of a central authority and instead takes that responsibility on directly.
The "problem" that it is trying to solve is relying on third party trust, however it requires that proper steps be taken to ensure first party trust and to make sure that revocation is not impeded if the pinned certificate/public key's corresponding private key is lost.
Many techniques can be used for establishing the trust, but some common ones are distributing the pin with an application that requires communication or verifying via an offline side channel.  Revocation checking could be done through operating a revocation list similar to how a CA would normally do so, though this takes some more setup to do properly.
There isn't a practical difference between certificate and public key pinning as a certificate is just a public key with details about the holder of the private key.  Pinning just implies trust of that cert/key.
Comment: ok, thx for your input. Can you explain how the trust is actually achieved then?
Comment: There are way to many possible ways to enumerate here, but I added a couple to the post.

What is public key pinning


Inserting new character into a formula at a particular position (Excel)

Question: So let's say I have a formula "=A1/5" and I want to change it to "=A1/sqrt(5" i.e. inserting something at the second last position.
(subsequently I can do a simple = cell&")" to complete the formula).
I managed to do it but I took a very lengthy route, so wonder if anyone has idea how to quickly accomplish this.
My approach now:

Deformularize by replacing "=" with "" aka nothing.
Extracting the left part and rightmost part of the string separately by =LEFT(cell,LEN(cell)-1) and =RIGHT(cell,1)
For the rightmost part extracted (which is a single digit number), I simply do a ="sqrt("&cell
I then concatenate together a "=", the extracted left part and the amended right part.

this works, but as you can see, it took quite a bit of work.
Answer: This tiny macro will do the work for you:
Sub formulaFixer()
    Dim s As String
    s = ActiveCell.Formula
    arr = Split(s, "/")
    ActiveCell.Formula = arr(0) & "/SQRT(" & arr(1) & ")"
End Sub

It will convert:
=A1/5

into:
=A1/SQRT(5)

In fact, it can convert =something/something else into =something/SQRT(something else)
We can loop it over several cells, if necessary.
Comment: Thanks, I will try it out!


Flat pedal road bike shoes

Question: I have road shoes but would like to also get a pair of shoes for flat pedals that still look like road shoes but have grip for the flat pedals etc..  Can anyone please suggest anything, thanks :)
Comment: Why do you want them  to look like road shoes?
Comment: Why not a cycling shoe with recessed SPD cleats?
Comment: Cycling shoes generally have quite hard soles for durability. A lot of the SPD shoes (certainly Shimano) come with an insert that is designed to be removed so you can fit the cleats. But you don't _have_ to remove the insert, if you leave the shoe "as is" it'll be good for flat pedals.
Comment: Voting to close under "Questions seeking product, service, or learning material recommendations are off-topic because they tend to become obsolete quickly. Instead, describe your situation and the specific problem you're trying to solve."
Answer: For flat pedals, here's my suggested preference order of shoe type:

A skateboarding shoe. They have flat grippy soles with more stiffness than most shoes.
A traditional bicycling shoe (intended for use with clips and straps).
A shoe made for any indoor sport. Indoor soccer shoes (like John Zwinck linked to in a comment), basketball shoes, etc. These will have a flat grippy sole intended for hardwood, that any flat pedal will grip quite nicely. Probably avoid anything "high top".
A shoe made for athletic activities on pavement. Walking shoes, running shoes, etc. These won't be as flat or as grippy as the indoor sport shoes, but will still be quite good.
Any athletic shoe. A shoe made for trail running will tend to have a fairly lumpy sole, but that may still work just fine on your flat pedals.
Any shoe. Face it, flat pedals work with any shoe you can walk in. Preferably something with a secured heel and toe coverage. I don't recommend it, but I've even done it in flip-flops with no problems.

Categories 2 through 5 all have available models that have that sort of futuristic aerodynamic look favored by clipless cycling shoes.
If you're doing long distance riding with flexible shoes and small pedals, you may find you get a bit of a "hot spot" where your foot pushes on the pedal. Stiffer soles and a larger flatter pedal platform can both help with this.
A high-end "BMX" or "mountain biking" flat pedal is much kinder to your foot than the traditional cage pedals that often come free with the bike. To me, the ideal is a thin pedal, just as wide as your shoe at the ball of your foot, with replaceable pins. Those cage pedals have small platforms with a sort of serrated knife edge rim.
Comment: try to make sure that the shoes you do use don't have a cushioning air sole - I pedalled 250miles on those and would never ever ever do it again.
Comment: Thanks for all this information, I really appreciate it :)

Flat pedal road bike shoes


How do I unlock new uniforms in COD: Ghosts?

Question: I don't like the uniform I have in Call of Duty: Ghosts.  I want something that's harder to see.
How do I unlock new uniforms for my soldier?
Comment: Just find a hack like all the other CoD jackwagons
Answer: You unlock them by completing challenges.  Find one that you like and work out what challenge is associated with it.  For instance, the Ghillie suit needs you to make 850 kills using a sniper rifle with a chrome barrel.  (Choose the one with in-built steady aim to counterbalance the additional sway caused by the heavier barrel)
Then, check your operations and make sure that you have the appropriate challenge listed there.  You may need to change your operations a few times until you have the mix you want.  Note that it costs 1 squad point to "re-roll" them and you'll get a random selection each time.
When you have the challenge you need, click on it to highlight.  That'll "lock" it so it'll not be randomised.  You can only lock one challenge in each of the five sections locked.
When you've unlocked your uniform, go to "Create a soldier" and then choose the "Customise" option.  This is F2 by default on the PC.  Go to "Special" at the top of the list and select your Ghillie suit.
Here, you can select a uniform.  Job done.
Comment: This is why I've lost interest in Ghosts.  Why does that have to be so complicated!


How to concatenate different properties into one column

Question: on TypeScript i'm trying to concatenate two properties into one column, is it possible?
For example, i have "Dog" and "Cat" properties and i want to show both into a single column named "Animals" in the matTable.
So in a single cell of the column "Animals" i'm going to see "Dog, Cat".
Here i made two separate columns but I'm not sure how to see more than one property in the same cell:
configureColumns() {
    this.columns = [
      {
        key: "Dog",
        display: "Dog",
        styles: { flex: "0 0 10%" }
      },
      {
        key: "Cat",
        display: "Cat",
        styles: { flex: "0 0 10%" }
      },

Answer: Try this:
const result = columns.map(elt => elt.key).join(" ");
console.log(result);

Answer: I solved my own problem by using the "value" property of the package:
{
        key: "DogCat",
        display: "Animals",
        styles: { flex: "0 0 25%" },
        value: (animal: AnimalDTO) => animal.Dog + ", " + animal.Cat
      }

This is going to give me exactly the result i was looking for.
Thanks Oscar for your answer, much appreciated.


Adding token image into smart contract

Question: can we directly add the token logo to the token smart-contract so that we can visualize it in Wallets and Exchanges and so that we don't have to register it in another way
Please help
erc20 token standard
Answer: The ERC20 standard has no way of adding a logo to it. And in general, you shouldn't store images in the blockchain, since data storage is extremely expensive in Ethereum.
It's up to various external services to store the logo and to retrieve it from various places. You have to consult the documentation of the services you want to use.

Adding token image into smart contract


Is my question on Gaming.SE not counted as a question in my SE profile because it was put on hold?

Question: I asked a question on Arqade, which was put on hold pending meta discussion. The community decided overwhelmingly to reopen the question, but it does not appear to be included in the question count on my SE network profile. It is my only question on Arqade, but the "Accounts" tab for my profile reads "0" questions. Shouldn't it count if it's reopened?
Comment: Can we see the link?
Comment: It reads as "1" question for me. I can't repro this. CACHING!
Comment: The SE servers. Took them 3 months to get my rep right in Area 51... :(
Comment: @PythonMaster Question link is in the question, and here's the profile link: http://stackexchange.com/users/225392/sss4r?tab=accounts
Comment: FWIW, I cleared my local cache, made no difference, of course. Where is this caching taking place? On the SE servers? Interesting that we can see different results on the same page, I didn't realize that was a thing.
Comment: BTW, I haven't a clue which of the two answers should be accepted--they say the same thing basically. I suppose I could accept the one that was posted first? I think that was @nicael
Comment: Never mind, if I read it correctly, the answer is caching, and @PythonMaster went there first. Thanks to you both, I'm just trying to be fair.
Answer: The fact that it's closed or not, locked/ not locked, etc doesn't count. The questions do count, unless deleted. Your question should have been shown even if it stayed closed.
So, you've just found a bug (wait 6 to 8 weeks though, maybe you should blame caching) :)
Comment: Are you kidding me? *Maybe* we should blame caching?!
Comment: @M.A.Ramezani lol :D
Comment: Hey, that was my idea!! The one about caching
Comment: @Python Yeah, I added about caching :) Cheating, you mean? But you added the paragraph similar to my first one :D
Comment: I guess we are even then
Answer: Seemingly, caching is taking a long time to catch up with the present. You should check that later and see whether it has updated or not. I know how long it could take since that happened to me... Took 3 months to finish caching. Just be patient and it should be there soon.
Oh, questions will always show up on your account if it is not deleted. If it is closed, put on hold, or open it should still be there.


Why did Nietzsche used "genealogy" of morals instead of the "origins" of morals?

Question: This question is about philosophy merged inside an historian's perspective.
Comment: Genealogy is "a line of descent traced continuously from an ancestor", the entire lineage, not just "origins". And Nietzsche's approach was clearly historicist, his distaste for Hegel notwithstanding, he wanted to show not only where it came from but also how it got where it is.
Answer: There is always more than a little risk in interpreting Nietzsche. On my understanding of 'The Genealogy of Morals', genealogy is more than an investigation into origins.
It does involve an inquiry into origins, however. Nietzsche does want to know what has produced morality, what it is that has given rise to it. If Nietzsche were offering merely a myth or speculation to explain the origins of morality, he would not go into so much historical detail. (He is not offering the kind of myth or speculation that Rousseau uses in 'Origins of Inequality' to explain the institution of property and the source of certain social emotions such as vanity and envy.)
His concern with the origins and history of moral values is evident when he talks of the 'need to know about the conditions and circumstances under which the values grew up, developed and changed ... [W]e have neither had this knowledge up till now nor even desired it' (GM, Preface, §6 : Nietzsche, 'On the Genealogy of Morals', tr. C. Diethe, Cambridge : 1997, 8.)
But genealogy means more than this quest for origins. Nietzsche also wants (a) to examine the value of morality as currently understood, to see whether it genuinely contributes to human flourishing :
'So let us give voice to this new demand : we need a critique of moral values, the value of these values should itself, for once, be examined' (GM, Preface, §6: Nietzsche, 'On the Genealogy of Morals', tr. C. Diethe, Cambridge : 1997, 7.)
He also (b) asks what authority morality has. He wants to uproot the idea that morality derives from some supernatural or other authority. We tend to think of moral judgements as truths but we practise a kind of self-deception about their status.
'In practice it means that moral judgments are torn out of the conditionality they grew from and within which alone they make sense, out of their Greek and Greek-political soil, and, under the semblance of sublimation, are denaturalized. The great concepts "good," "just"are severed from the preconditions they belong to, and as "ideas" set free they become the objects of dialectic. One seeks a truth behind them, one takes them as entities or as signs of entities: on e fabricates a world where they are at home, from which they originate [wo sie herkommen ]' (NL 1888: 14[111] - NL = Nachlass = Notes.
We treat moral values, those we have inherited, as objective and moral judgements as true. Often we see them (or did in Nietzsche's time) as divine commands, as having a supernatural origin. In fact they are just remnants of an older civilisation.
As such they have no authority. We are free to create our own values. This is partly what Nietzsche has in mind when he talks of a 'transvaluation of all values'.
If this is clear, you may now understand why Nietzsche used 'genealogy' of morals instead of 'origins'.
Comment: @Julius Baggett. You have answers to your question about genealogy.
Answer: Nietzsche is talking about how morality appears to arise in a succession of changes, each base upon the previous one.  He wants to emphasize the organic nature of the succession of moral theories.
He argues that slave morality is formed in reaction to master morality. It can only be understood as a 'second generation' rebelling against its origins.
And ultimately he does not seek an underlying reason for the original master morality.  So he is not going all the way back to origins, or even trying to.  To that extent, to use such a label would be misleading.


Upgrading My Mac Os X without losing data

Question: I currently have mac os x 10.7.3 , I did download OS X El Capitan but did not install it, I'm afraid of losing data. So will I really lose data if I install it? And if so, is there a way to upgrade my mac os without losing data?
And thank you so much.
Comment: Buy an external drive and backup your data.
Answer: Normally, installing an updated version of MacOS should not cause any data loss. If you launch the installer app downloaded from the Mac App Store, then the new OS is installed leaving all your existing apps and data in place.
However, you should ALWAYS have a backup to mitigate the loss of any data. Things can go wrong; disks can fail; hardware can get stolen, catch fire, drenched with water, etc, etc.
There are a large number of posts here from people who have accidentally lost their data while trying to do something. These exist as warnings.
Files without a backup are waiting to be lost.


Why is 433 MHz used widely in RF modules?

Question: I was planning to interface an RF module to my PIC16F877A microcontroller and was exploring the web. I came across many modules which use 433 MHz as the standard frequency. Why is it so? Can't we change the frequency as per our requirements?
Answer: The usage of frequencies is restriced by authorities in each country. The 433 MHz ISM band is free to use in many countries and thus very popular.
Comment: It is also worth noting that 433 MHz falls squarely within an amateur radio band, and you thus need to allow for the possibility of not just low-power interference (other ISM transmitters) but also high-power interference (amateur radio transmissions in that frequency range are commonly in the 10-100 W range).
Comment: @MichaelKjörling Indeed. Car keyfobs tend to have issues with this, which is why it's nowadays relatively hard to get approval for a 70cm amateur radio repeater in an urban area.
Answer: This is because traditionally, the 433.050 - 434.090 MHz band could be used without license in many countries. For example it is license-free in all European countries. This is nice, since applying for a license is  bureaucratic, has to be done nationally, involves a yearly fee, and is restricted to a geographic area.
However, the European Union has tried to harmonize the use of radio frequencies, adding some restrictions to the 433MHz band:
"Short range devices" (generic radio) using 433.050 to 434.040 MHz are not allowed to use an output power greater than 1mW (or 10mW in case they use 10% "duty cycle"). They are allowed to use 10mW from 434.040 to 434.900.
National exceptions to this still exist, and unfortunately radio amateurs are excluded from these power requirements.
And in other countries in North America and Asia, you can't use 433MHz at all. In some countries it is a restricted band for RFID container identification systems only.
Comment: @Aresloom Because they are free to send with massive output power and thereby jam out all other radio use on the band.
Comment: Hey if you cheap out on your front end design and filtering you deserve whatever happens to you during a contest. Also, Hams are actually secondary users, the MOD is primary at least in the UK. Seriously, the UK limit for hams is less then 60dB above the 1mW limit, and designing a front end to cope with that is not that hard (Just costs a few quid in LO drive power and filters).
Comment: Why do you say unfortunately?
Comment: @DanMills The worst culprit of polluting the band is indeed not radio amateurs but various SRDs. But no design in the world is going to save you if someone else transmits on the very same carrier frequency as you do - it's all a gamble who wins in that case.
Comment: Well yea, but no Ham is going to try to communicate there because of all the QRM.... The OOK am stuff should be really narrow band, you would have thought an IF bandwidth broadly comparable to CW, so a few hundred Hz or so would get it done, but the manufacturers do not I suspect shop at inrad or KVG for their IF filtering. FM kit will be wider of course, but capture effect should help there if you get the keyfob close to the rx.
Comment: @DanMills The commercial 433MHz narrowband FM/FSK single-chip radios typically have a IF bandwidth of somewhere between 10-20kHz (programmable). Ideally they should work even with powerful disturbances in the adjacent channel 12,5kHz away. The ETSI standards are rather picky. Now if radio designers would actually follow them (as required by law), the band wouldn't be nearly as polluted...
Answer: Taking into account that whole automatic branch uses 433MHz I don't recommend You to use this frequency. I have done my engineering project with this modules:
http://www.ebay.com/itm/433MHz-Radio-Transceiver-Transmitter-Sender-Module-Remote-Arduino-/252184498733?hash=item3ab75e122d:g:MyAAAOSw2xRYWe46
so I know what I'm talking about. If You want to save Your time, use any other frequency, for example 868MHz or 2.4GHz. 433MHz is full of noises. For instance if Your neighbor uses wireless thermometer be sure that You can receive nothing.
Comment: There is no difference between those public bands. There's as much noise on the 868 band, if not more, since the 1st overtone of 434 ends up there too. 2.4GHz is even worse, but it is a larger band. The reason your 433 modules didn't work well is more likely because they are cheap AM crap. The same solution would work poorly on any band.


Is the modulation on my WiFi different to the modulation on cellular?

Question: Is the modulation method, or nature of modulation otherwise, between my phone and my WiFi modem, versus my phone and a cellular mast, different?
Comment: Yes. Modulation even changes for different WIFI protocols and connection speeds.
Comment: yes. Wikipedia-level research could have answered that!
Answer: From google:
3G-5G appears to use OFDM —along with QPSK og QAM depending on channel conditions.
WiFi 802.11b used some CDMA-dialect, 802.11a and g uses OFDM along with BPSK, QPSK or QAM.
WiFi mainly use frequencies around 2.4Ghz, while cellphones have used lower frequencies around 900Mhz (due to larger distances). Both have recently added capability for using higher frequencies.
Comment: 3G is typically a specific kind of DSSS-CDMA. But things are still pretty different – due to the very different problems encountered by the respective channels.


Question about charging and using an iPad mini

Question: I just purchased a cellular iPad mini but I cant seem to find out if charging an iPad mini while using the device affects battery life, and does charging overnight affect battery life?
Answer: You should be fine using the iPad while it is charging. The thing you want to avoid that affects battery life is always keeping it plugged in. You want to make sure you regularly "use" your battery, allowing it to drain and then recharging to full. If it is always plugged in and sitting at full you'll start to notice a decrease in performance when the battery finally does get drained.


How to change mc (midnight command) bash prompt on OS X?

Question: I observed that my custom bash prompt does not work on mc. How do I customize it?
Comment: WHere do you set your custom bash prompt?
Comment: My custom bash prompt is setup in `.bash_profile`
Answer: The issue is that .bash_login files are only read when bash is run as the login shell. mc probably just calls a new shell which will read its startup from ~/.bashrc See bash documentation for details.
To make the shell run in a common way it is often suggested that you call .bashrc from .bash_login e.g.
if [ -f ~/.bashrc ]; then
   source ~/.bashrc
fi

Comment: That bugreport https://www.midnight-commander.org/ticket/2027#comment:21 has clear answer:

>> Is there a way to get the prompt colors show up also in MC?
> Unfortunately no. It is not supported, аll control sequences in the
> prompt are ignored.
Comment: I did this and now I see the prompt correctly, still there is a difference: all ANSI escapes had vanished from mc prompts, it's not colored.
Comment: I suspect $TERM has been changed as man mc says it is " run it in a pseudo terminal,"
Answer: Read the INVOCATION section of the man page, it's there for a reason.  MC is most likely not launching a login shell and you are only configuring your prompt for login shells.
Comment: Excerpt from `man mc`: "An extra added feature of using the subshell is that  the  prompt  displayed  by  the Midnight Commander is the same prompt that you are currently using in your shell." - As you probably observed this is not true, the prompt is clearly not the same, in fact I suspect it's the default prompt for bash `bash-3.2$`.


What makes some aluminium alloys so strong while remaining light?

Question: Compared to cast iron, for example, certain alloys of aluminum have both strength and weight advantages. How can aluminum be so strong while being so light?
Comment: Diamond is also very light and stronger than Aluminum. Lead is very heavy and soft. There is no connection between strength and density.
Comment: Can you be more specific on the question. Each metal has its straights and weaknesses.
Answer: ONE thing which makes Aluminum better than steel in SOME applications is its higher Strength/Weight ratio.  A big contributor to this better ratio is the much lower density of Aluminum
There are some classes of aluminum alloys which are stronger than steel alloys, but, in general, aluminum is actually a bit weaker than steel.
However, aluminum is MUCH lighter (less dense) than steel: $2.8g/cm^3$ for Al as opposed to $7.8g/cm^3$ for steel, making Al a clear winner in the strength/weight arena.
The lower density of Al is due to its lower atomic weight.
Comment: There is no linear correlation between density and atomic weight. Look
https://en.wikipedia.org/wiki/Densities_of_the_elements_(data_page)
Answer: The density of aluminium is driven by two factors, the atomic mass of the atoms and the volume they occupy when in solid form.
Here is a chart showing how density varies across the periodic table rows and columns.

Aluminium is row 3 column 13(group XIII).
I understand the properties of each element are principally due to the form of their outermost electron shells. Some are spherical, s shells, others have lobes. Aluminium has three electrons in its outer shell, and can form three bonds.
Aluminium has a face-centered-cubic (fcc) structure which means the density is related to the cube of inter-atomic separation. For element of similar atomic mass this arrangement results in lower densities.
There are a number of elements with similar density to aluminium, but their other properties make them very different. Aluminium is metallic and therefore malleable, it is less likely to break than to bend. It is relatively inert in our environment and solid at standard temperature and pressure.


Did you see the cat?

Question: When there is a cat present in the room, how would you ask your one-year-old kid whether she see/saw the cat?
-Did you see the cat?
-Do you see the cat?
-Have you seen the cat?
Comment: All three are fine, although "do you see the cat" asks if you see the cat *right now*.
Answer:
"Do you see the cat?"

Asks about right now. Draws attention to the cat in the room.

"Did you see the cat?"

Asks about earlier. If the child is no longer looking at the cat, but you want them recall something or go back and look at it.

"Have you seen the cat?"

Asking if they have noticed the cat or where the cat is now. Usually used when the cat is not around and you are wondering where it is. So, probably not appropriate if the cat is in the room, unless this is the very first time the child has encountered this cat.
Answer: The sentence "Have you seen the cat?" is grammatically correct.
I think, it doesn't matter who you ask questions. It's good grammar which is important anywhere.

Did you see the cat?


My Instagram profile is public but my photos are posted as private

Question: For the last week now, every photo that I post can only be seen by people that follow me and not publicly - eventhough my profile is set as public. Does anyone know what could be the cause of this? I have tried uninstalling and reinstalling the app.
Comment: Have you turn off the private account setting?
Answer: Double check that your profile is actually private. If it actually is set to private (i.e only followers can see your posts), then when you try to look at your account while not logged in, or an a non-follower account, it will inform you that only followers can see your content. It will also have a 'requested' button when you try to follow. If you would like to supply your URL, we would happily check for you.
In order to check if it is private:

Go to your profile.
Go to your settings (gear icon usually).
Untick the 'Private Account' switch.

However, the way you're describing it (non-followers can access your account but not view photos) may be a symptom of shadowbanning. This is where Instagram silently bans your account and hides your content without telling you. It's a method of stopping malicious users from instantly creating a new account and breaking rules again, since they don't realise straight away.


RPM dropping after refueling

Question: It only happens when I refuel and then drive and everytime I come to a complete stop it drops RPM from a normal 1k to 500 and then goes back up to 1k I am not sure what's wrong I use 93 premium because I got 2017 mustang ecoboost twin turbo. Haven't stalled yet after driving for maybe 20 min it never does it again. Please help?
Comment: Welcome to Motor Vehicle Maintenance & Repair! I'd personally be wondering why your engine is running at 1k rpms after it's warmed up. I know my truck idles at ~450-475rpms after it's fully warmed up. It's a 2018 Silverado with a direct injection LTx engine. I don't know for sure, but I believe manufacturers started tuning them with a lower idle for better fuel consumption.
Comment: Well the mustang manufacturers usually set it 700-1000 rpm idle, I just don't understand why it drops after refueling then after 20 min it does not do that until next refueling.
Comment: A similar thing happened to me, I filled in fuel from another country (different from my type of fuel) the engine light came on, after that, the RPM drops when filling the fuel, and after that the car turned off after filling up for some time and I changed the sensor and it did not turn off after filling up but when stopping and filling it still is The RPM drops. now the car is turning off with frequent stops!! (after years xD). The mechanic suggested that I change the petrol pump and some of the sensors, and clean the injectors, throttle, etc... i still waiting to receive my car and i will up
Answer: I'm not very experienced on this subject, but these are my thoughts:
The problem may have to do with the air pressure inside the fuel tank. When you remove the fuel cap, the pressure is equalized to the surrounding air pressure.
When you're driving, fuel is sucked out of the tank which could cause the air pressure inside the tank to drop. (it causes a small 'vacuum').
Maybe this is somehow related? Maybe something in the evap system is broken?
I'll leave the answering to someone more experienced, but hopefully this puts you in the right direction.

RPM dropping after refueling


Automatic persistence of state with MassTransit 4.0 saga with EntityFramework Core

Question: Hi I've just started using MassTransit 4.0 with .net core and EntityFramework Core.
I have defined a state spanning several classes, which I have wired up in a 1-many relationship using
public class SagaInstanceMap3 : IEntityTypeConfiguration<InstanceState>
{
    public void Configure(EntityTypeBuilder<InstanceState> builder)
    {
        builder.HasKey(x => x.CorrelationId);
        builder.HasMany(x => x.Args);
        builder.HasMany(x => x.MoreArgs);
        builder.Property(x => x.RowVersion).IsRowVersion().IsRequired();
    }
}

When creating an initial state everything is stored in the DB, but when fetching state in the following transition, only the main table is fetched.
I've been able to remedy this using queryCustomization as seen below
   public static void Main()
    {
        var saga = new MySaga();

        var contextFactory = new SagaWithDependencyContextFactory();

        using (var context = contextFactory.CreateDbContext(Array.Empty<string>()))
        {
            context.Database.Migrate();
        }

        Func<DbContext> sagaDbContextFactory = () => contextFactory.CreateDbContext(Array.Empty<string>());

        var efSagaRepository =
            new EntityFrameworkSagaRepository<InstanceState>(sagaDbContextFactory,
                queryCustomization: q => q.Include(it => it.Args).ThenInclude(it => it.MoreArgs),
                optimistic: true);

Unfortunately, this means that I have to remember to map all my relations twice! Is there at way to have the EF Core integration eagerly fetch all child tables upon transitions?
The EF6.0 integration with previous releases of MassTransit did not require me to do the queryCustomization trick.
Comment: It is because EF Core works differently than EF 6.0. This is why the query customisation was added. I think there is no other way unless you do something in the mapping. MT has nothing special in the EF Saga repository implementation, you can check the code yourself.
Answer: It is because EF Core works differently than EF 6.0. This is why the query customisation was added.
As per your implementation, I think there is no other way unless you do something in the mapping.
MassTransit has nothing special in the EF Saga repository implementation, you can check the code yourself.
Answer: Im not using Masstransit anymore but perhaps this project https://github.com/kbilsted/EFCoreEagerFetching can be of use for others in terms of defining the relationships only once.
Comment: Thanks Carlo but I need to use Masstransit only


Is an "International Driving Permit" from the AAA in United States valid in Bulgaria?

Question: Has anybody used an International Driving Permit (IDP) issued by the AAA in the US for car rental in Bulgaria?
Comment: An IDP is an official translation of your driver license.  You will be renting the car using your valid US driver license - the IDP is only used if requested by the rental car company.  I would be surprised if the rental company required your IDP (unless perhaps the country required you to hold one), but yes it should be accepted if required.  You will still need to carry your valid US license.
Answer:
Is an "International Driving Permit" from the AAA in United States valid in Bulgaria?

Yes. Here is the list of countries in international driving permits issued on 2019-10-14 by AAA in United States. It includes Bulgaria:


Is withdrawing from two courses in my PhD bad for my future?

Question: I am a 2nd year PhD student. So far, I've taken 5 courses, 3 of which I got A and the other two I withdrew from. The reason was mainly it was not until the 6th session that I understood those two courses were not particularly relavant and helpful towards my thesis. My question is how bad is my situation regarding gettting a post doc, faculty position, or a position in industry, in the future?
Comment: Nobody care about the courses you take or do not take. They only care about your papers.
Comment: I'd say the effects will be negligible. There are plenty of valid reasons students might drop a course.
Comment: @qsp: For research-oriented faculty jobs, that's true, but some other academic jobs do pay attention to graduate coursework.  For instance, if you have substantial coursework in a secondary field, that can be helpful evidence that you are qualified to teach courses in that field, which can be a plus for some teaching-oriented jobs.  I am also not sure whether what you say applies to industry.
Comment: Do you have at least a temporary advisor?  If not, you can ask your department to assign you one, or you can seek out a professor you feel some affinity with.  It is always good to check one's progress periodically with someone in your department. // When you meet with this person, bring an unofficial transcript, and find a couple of positives to mention, in addition to the information in your question.
Comment: In general, giving out too detailed information about yourself on the internet can be long term damaging for lots of different aspects in your life. We would probably be able to answer without the details which make co workers and others able to figure out who you are.
Comment: @mathreadler Thanks for the advice, I edited my post :)
Answer: For postdoc and position in the industry, it will not cause any problem.
However, faculty positions depend on grants, and commitees pick people who are able to obtain fund grants, and publish papers. It is unlikely they will care about your grades.
Comment: why do you think committees are responsible for hiring @padawan?
Comment: Committee, in this context, is used in a generic way. Even if it is one person, there is a process that approves the applications and decides who to accept. This process is held by a **committee**.