Preventing methods from being inherited

Question: I have a base class Foo that is concrete and contains 30 methods which are relevant to its subclasses.
Now I've come across a situation that is specific only to the base class,and I want to create a method that cannot be inherited, is this possible?
Class Foo
{
   /* ... inheritable methods ... */

   /* non-inheritable method */
   public bool FooSpecificMethod()
   {
      return true;
   }
}

Class Bar : Foo
{
    /* Bar specific methods */
}

var bar = new Bar();
bar.FooSpecificMethod(); /* is there any way to get this to throw compiler error */

EDIT
I'm not sure if I was clear originally.
I do understand the principles of inheritance, and I understand the Liskov substitution principle. In this case there is a single exception that ONLY deals with the 'un-inherited' case, and so I did not want to create an 'uninheritedFoo' subclass.
I was asking if it is technically possible to create a situation where
foo.FooSpecificMethod() is a valid and publicly accessible method, but subclassoffoo.FooSpecificMethod() throws a compiler error.
Essentially I want a sealed method on an unsealed class.
Comment: does FooSpecificMethod() need to be publicly accessible or only internally to Foo?
Answer: I would rethink the need for this.
If you are using inheritance, you are suggesting that "Bar" IS A "Foo".  If "Bar" is always a "Foo", methods that work on "Foo" should also work on "Bar".
If this isn't the case, I would rework this as a private method.  Publically, Bar should always be a Foo.

Just to take this one step further -
If you could do this, things would get very complicated.  You could have situations where:
Foo myBar = new Bar(); // This is legal
myBar.FooSpecificMethod(); // What should this do?
                           // It's declared a Foo, but is acutally a Bar

You can actually force this behavior using reflection, though.  I think it's a bad idea, but FooSpecificMethod() could check the type of this, and if it isn't typeof(Foo), throw an exception.  This would be very confusing, and have a very bad smell.

Edit in response to question's edit:
There is no way for the compiler to enforce what you are asking.  If you really want to force the compiler to check this, and prevent this, you really should consider making Foo a sealed class.  You could use other extension methods than subclassing in this case.
For example, you might want to consider using events or delegates to extend the behavior instead of allowing the object to be subclasses.
Trying to do what you are accomplishing is basically trying to prevent the main goals of inheritance.
Comment: Your reflection solution. That would throw a run-time error, not compile time, correct?
Comment: Yes.  You could have FooSpecificMethod throw a runtime error if the caller's type is not a Foo (ie: if you pass a Bar object in).  This would allow myBar.FooSpecificMethod above to compile, but throw at runtime, since it's actually a typeof(Bar) and not typeof(Foo).
Comment: Foo myBar = new Bar(); This creates the memory allocation needed for a Bar, but the program is given a Foo variable. The Bar is implicitly CAST to a Foo. It is the same as saying Foo myBar = (Foo)(new Bar()); So after that line executes, there is no Bar in existence anymore. only a Foo.
Comment: No, not true.  There is a Bar in memory, allocated as a bar, but it's being USED as a Foo.  If you use reflection, and get the type of myBar, it will be a Bar still.  If you want to see, just break in the debugger, and check :)
Comment: If you create a new Bar(), it doesn't matter what you return.  You can assign it to a Foo, or even a System.Object, but it's still (and always will remain) a Bar object.
Comment: ok. cool.
I've decided to make Foo abstract, and create an 'emptyFoo' class for this specific method.
Comment: an 'emptyFoo' subclass of Foo, that is.
Answer: Brian's right about Liskov Substitution (upmodded). And Reed's right about "is-a" (also upmodded); in fact they're both telling you the same thing.
Your public methods are a contract with users of your class Foo, saying that, "you can always" call those methods on Foo.
Subclassing Foo means that you're saying that a Subclass, e.g. Bar, is always acceptable to use where a Foo could be used. In particular, it means you inherit not (necessarily) Foo's implementation (you can override that, or Foo may be abstract and give no particular implementation for a method).
Inheritance of implementation (if any) is a detail; what you're really inheriting is the public interface, the contract, the promise to users that a Bar can be used like a Foo.
Indeed, they may never even know they have a Bar, not a Foo: if I make a FooFactory, and I write its Foo* getAFoo() to return a pointer to a Bar, they may never know, and sholdn't have to.
When you break that contract, you break Object Orientation. (And the Java Collection classes, by throwing NotSupported exceptions, entirely break OO -- users can no longer use so-called subclasses polymorphically. That's poor, poor design, which has caused major headaches for many many Java users, not something to emulate.)
If there's a public method that Foo subclasses can't use, then that method shouldn't be in Foo, it should be in a Foo subclass, and the other subclasses should derive from Foo.
Now, that does NOT mean that all methods in Foo should be callable on subclasses. No, I'm not contradicting myself. Non-public methods are not part of a class's public interface.
If you want a method in Foo that can't be called on Bar, and shouldn't be publicly callable in Foo, then make that method private or protected.
Comment: +1 - Nice details, and another great way to word the concepts.
Comment: Thanks. I find it helps to give a learner several ways to read the same thing; one, r the combination, may "click".
Comment: If it's protected, shouldn't bar have access to it?
Comment: Yeah, Bar can call a protected member of Foo; but users of Bar can't. That's the distinction.
Comment: In languages with single-inheritance, the LSP only applies to members which can be accessed by other instances.  If none of the classes which would be able to access a protected member in outside instances does so, the LSP does not require that the member be available to derived classes. Given `FortExplorer:Car` and `ToyotaPrius:Car`, a reference of type `Car` might refer to a `FordExplorer` or `ToyotaPrius`; within `FordExplorer`, however, though the nominal type of `base` is `Car`, but it's guaranteed *not* to refer to a `ToyotaPrius` (nor anything else that not derived from `FordExplorer`).
Answer: No, this would violate the Liskov substitution principle.
Pragmatically, you can either have it "throw NotImplementedException()" in Bar, or remove the method from Foo and move it down to the subclasses to which it applies.
Comment: There are two cases where it would not violate LSP: (1) If the member is `protected`, and code in or above the present class which could access that member in outside instances doesn't do so; (2) If the base-class contract specifically states that some derived classes may not implement that member usefully.  Hiding a public member of a base class won't prevent code from calling it--it will just make it more cumbersome.  One should thus refrain from doing so if calling code would need that member.  If the member is useless anyway. however, there's no reason it should be easy to call.
Answer: Making the function private will prevent it from being called by the subclasses directly.
If you are talking about virtual functions that you do not want to be overloaded, marking the function as sealed at the point that you want to "lock" the function works.
Even if it is a private function, it could still be called by reflection.
You could also declare the function on an interface, and explicitly implement the interface on the class, which would force you to cast it to the interface to use the function.
Answer: You could make a private function, and then call it using reflection.  Probably a little overboard.  Anyway, just put the function in your base class, along with comments saying it should only be called from the base class.  Maybe even those nice /// comments that show up with intellisense. Then, you might get a bug, but then well, you'll always get bugs, and the best you can do is document this situation to try and avoid it.
Answer: I have been trying to achieve this myself and came across this post which has some great answers without achieving what the poster was after, but there is a way to enforce this.  You need to override the existing method and then use the Obsolete attribute.  Setting the Obsolete attribute's error property to true will prevent compile.
Class Foo
{
   /* ... inheritable methods ... */

   /* non-inheritable method */
   public bool FooSpecificMethod()
   {
      return true;
   }
}

Class Bar : Foo
{
    /* Bar specific methods */

   [Obsolete("Don't use this for whatever reason", true)]//true triggers the compiler error
   public new bool FooSpecificMethod()
   {
      return true;
   }
}

var bar = new Bar();
bar.FooSpecificMethod(); /* this now throws a compiler error */

Answer: The solution I ended up using was creating a public inner inherited class. That way it is able to access the private variables of the baseclass (as it needs to) and I don't need to expose publicly any of those private variables or functions (which I don't want to).
Thanks so much for all your advice, it caused me to rethink exactly what I needed from this arrangement.
Answer: There are two reasons a derived class may hide base-class members without violating the Liskov Substitution Principle:
If the member in question is `protected`, it essentially represents a contract only between the parent class and the derived class.  As such, it does not impose any obligations on the derived class, except as required by the contract with the parent.  If public members of the base class relies upon some non-public particular member of outside instances having some particular meaning, a derived class which changes the meaning of that member could violate LSP even though the member itself is not public, since changing its meaning could alter the behavior of the public members which use it.  In cases where a base class defines a protected member but does not use it, however, a derived class could do anything it likes with that member without violating LSP.

A key thing to understand with protected members is that the reason a `ToyotaCar` should not alter the semantics of public members of `Car` is that a reference to a `ToyotaCar` might be given to code which is expecting a `Car` rather than a `ToyotaCar`.  On the other hand, if `ToyotaCar` alters the behavior of a protected method of `Car` in a fashion which isn't exposed by any public members, the only code which could notice such alteration is code which is within either `ToyotaCar` or a derivative thereof, and such code is going to know that it has a `ToyotaCar`.  Code which is in some other `Car` derivative (e.g. a `FordCar`) can access the protected members of `Car`, but is guaranteed *not* to access those methods on an instance of `ToyotaCar`.

Sometimes it is useful to have a base type or interface expose a number of members which will not all be applicable to every implementing type.  While the Interface Segregation Principle would suggest that one should avoid "kitchen-sink" interfaces, there are cases where such interfaces may be more practical than any alternative.  For example, some kinds of a "stream" class might support different handshake modes, but other types would not.  If references streams will be passed through code that won't care about handshaking, it may be easier to have a Stream class include a handshake-selection property which may or may not be usable, than to require code to try casting a passed-in reference to `IHandshakeSelector` and set `IHandshakeSelector.HandshakeMode` if so.  On the other hand, if a particular stream class would behave identically for all handshake modes except `XonXoff`, which would throw an exception if code tries to set that, it may make sense for that class to hide the `HandshakeMode` property.

I would posit that while base-class member hiding is often a sign of bad design, there are cases where hiding base-class members would be more appropriate than leaving them exposed; if a derived class cannot possibly use a protected method  correctly (as would be the case with the MemberwiseClone method available to derivatives of List<T>) there's no reason to have it exposed.  Unfortunately, there's no completely clean way of hiding such members.  The best one can do is declare a public member of the same name (using a "new" modifier) which would block off all access to the base-class member.  For example, code could define a nested public static class named MemberwiseClone with no members.  The EditorBrowseable attribute could be used to prevent Intellisense from showing that nested class, but even if code did try to use that class, it has no members, and one cannot create a storage location of that type, so it should be pretty harmless.
Answer: You should consider Composition [http://en.wikipedia.org/wiki/Composite_pattern} over inheritance if you want to achieve what you are trying to do and expose methods from the private object (i.e. the one you are currently inheriting from).
Answer: As others have pointed out, this is not possible, and most importantly, it shouldn't be necessary.
I came across the same problem when I had the following structure:
- A parent class with properties of child classes.
- The child classes would expose different properties, but all had the same initialisation procedure, so I put the code in the parent class.
public class Parent
{
    public CHILD1 Child1;
    public CHILD2 Child2;

    public Parent(params args){
        Child1 = new CHILD1(arg1, arg2);
        Child2 = new CHILD2(arg1, arg2);
    }
    //split here
    public Parent(object arg1, object arg2) {
        PropertyInfo[] list = this.GetType().GetProperties();
        foreach (var pi in list) {
            pi.SetValue(this, BL.Method(arg1, arg2, this.GetType().Name, pi.Name) // get data
        }
    }
}

public class CHILD1 : Parent
{
    public CHILD1(object arg1, object arg2) : base(arg1, arg2) { }

    public object C1Property1 { get; set; }
    public object C1Property2 { get; set; }
    // ..
}

public class CHILD2 : Parent
{
    public CHILD2(object arg1, object arg2) : base(arg1, arg2) { }

    public object C2Property1 { get; set; }
    public object C2Property2 { get; set; }
    // ..
}

Now I could call parent.Child1.C1Property1. But the code would also allow a call of the following: parent.Child1.Child1.Property1, which wouldn't make sense and result in an exception because the Child1.Child1 property would always be null.
In order to fix this, all I had to do was split the code of the parent class into two classes:

One holding the Child properties and calling child constructors
and one with the constructor logic to fill the properties.
Answer: Perhaps you could simply create it as a virtual method on the parent class and then override it, throwing a NotImplementedException or something similar, on the child class that inherited it.
Also, but only if you're willing to put up with some spaghetti, you could put the method's signature in an interface and then have all the classes that'll require such method implement it. The downside is you'll have to declare the same method in all those children.
I'm not sure if it's even possible, but maybe an extension method could be written for that interface?
Keep in mind that these are all violations of OOP's encapsulation principle, albeit minor, which makes them all the more fun.

Preventing methods from being inherited


Internet Explorer Caching asp.netmvc ajax results

Question: I'm having an issue with a page in internet explorer.
I have an ajax call that calls a form, in other browser, when I click the link it passes in the controller and load correctly data. but in IE, when its loaded once, it aways brings me the same old results without passing in the controller.
Comment: Possible duplicate of [Unexpected Caching of AJAX results in IE8](http://stackoverflow.com/questions/1013637/unexpected-caching-of-ajax-results-in-ie8)
Answer: Try:
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]

This attribute, placed in controller class, disables caching. Since I don't need caching in my application, I placed it in my BaseController class:
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
public abstract class BaseController : Controller
{

Here is nice description about OutputCacheAttribute: Improving Performance with Output Caching
You can place it on action too.
Comment: @Malcolm Frexner: Caching strategy differs in browsers. There are some problems with IE.
Comment: This should not be the issue because the caching only happens in IE
Answer: You could try setting  the cache option to false:
$.ajax({
    url: '/controller/action',
    type: 'GET',
    cache: false,
    success: function(result) {

    }
});

This option will force the browser not to cache the request.

UPDATE:
Based on the comment you could add a unique timestamp to the url to avoid caching issues:
var d = new Date();
var myURL = 'http://myserver/controller/action?d=' +
    d.getDate() +
    d.getHours() +
    d.getMinutes() +
    d.getMilliseconds();

Comment: I'm upvoting this because this is the correct answer if you're using jQuery.  In fact, if you're using jQuery and not the MS Ajax handlers in MVC, IE will totally ignore all those attributes you set on your methods.
Comment: Well, I'm using Microsoft Ajax, not jQuery. ;) This setting works for all ajax based calls? even for msAjax?
Comment: oops, sorry, I've missed this important part of your question.
Answer: You can use HttpMethod = "POST" on your AjaxOptions
var ajaxOpts = new AjaxOptions { UpdateTargetId = "TargetDiv",  HttpMethod = "POST"};

like this exp;
@Ajax.ActionLink("Text","ActionName", new AjaxOptions { UpdateTargetId = "TargetDiv",  HttpMethod = "POST"})

Answer: I've blogged about fixing the IE cache issue for both jQuery and the MS client library:
http://yoavniran.wordpress.com/2010/04/27/ie-caching-ajax-results-how-to-fix/
Hope this helps!
Answer: I also found this very useful on a similar (but not identical) issue.
http://forums.asp.net/t/1681358.aspx/1?Disable+cache+in+Ajax+ActionLink+extension+method+in+asp+net+MVC
Basically make sure that you're using POST as opposed to GET in your requests. Doing so seems to prevent IE from caching.
Eg:
@Ajax.ActionLink("Clear Contacts", MVC.Home.ClearContacts(), new AjaxOptions{HttpMethod = "POST", UpdateTargetId="targetDiv"})
Answer: If you are using the Ajax Helper, you can set the AllowCache parameter to false like this:
@Ajax.ActionLink("AjaxCall", "AjaxMethod", "DeconflictedFiles",
                 new { },
                 new AjaxOptions
                 {
                     AllowCache = false,
                 })

And IE won't cache the results of the call.
Comment: This is not working as expected, I tried it and still it's cached
Answer: actually in IE browser caching not clear automatically.
but in chrome scripts working accepted.so you need to try for
clearing data in browser level.


Why 'in itself', why not just 'itself'?

Question:
Life in itself is neither good nor evil. It is the place of good and evil, according to what you make it.
Comment: *In itself*, in and of itself, is an idiomatic turn of phrase and is itself more incisive than *itself* :)
Answer: According to my dictionary (New Oxford American, 2e), the phrase in itself means

viewed in its essential qualities; considered separately from other things

Plug in this meaning into your sentence, and you will see why it makes sense the way it is. You may also come across the hackneyed in and of itself, which means the same thing, as in:

Life, in and of itself, is neither good nor evil…

Using only itself would also work, but then the emphasis on life would not be as strong and it would not have quite the same meaning:

Life itself is neither good nor evil.

Itself merely functions as a pronoun for emphasis. In itself, however, adds more depth, as it specifically indicates the subject is being deliberately considered in all its possible ramifications.
Comment: @lovespring: anytime!
Comment: Would that mean that emphasis grows as follows: "Life" < "Life itself" < "Life in itself" "Life in and of itself"? Sounds to me like someone got way too carried away with what looks like an add-more-words-with-no-new-meaning-so-that-the-subject-takes-an-ever-larger-part-of-the-sentence approach... I get the need to emphasise, but "itself" does that: all the rest feels like someone trying to describe a greener green than green: a pleonasm of sorts.

Why 'in itself', why not just 'itself'?


How do I make an item break a certain block in Minecraft Java 1.14.1?

Question: I am trying to build an adventure map, but I'm afraid the player will place the button in the wrong place. So I need to make a pickaxe to break just the button and not break anything else to reduce cheating and make secret ways. But none of the tutorials are for Java 1.14 or seem to work.
Comment: It works the same as in 1.13 and even there didn't change much compared to before.
Answer: Nothing has really changed from my knowledge, the command to make a tool break a specific block is somewhat simple
<code>/give [Name] minecraft:wooden_pickaxe{CanDestroy:["minecraft:stone_button"]}
</code>
Just replace the [Name] section with your Minecraft username, or if you dont want it on a wooden pickaxe just replace it with any other tool (E.g: stone_pickaxe, iron_pickaxe, etc)
<code>/give [Name] minecraft:stone_pickaxe{CanDestroy:["minecraft:stone_button"]}

/give [Name] minecraft:iron_pickaxe{CanDestroy:["minecraft:stone_button"]}

/give [Name] minecraft:diamond_pickaxe{CanDestroy:["minecraft:stone_button"]}
</code>
If you want to add more than just a stone button, like say, make it also able to destroy an oak button or something, it would be like this
<code>/give [Name] minecraft:diamond_pickaxe{CanDestroy:["minecraft:stone_button","minecraft:oak_button"]}
</code>
The tool can also be used to break specified blocks in Adventure mode if you change the 'stone button' and 'oak button' parts to some other block. But you could also make a button that can only be placed on specific blocks
<code>/give [Name] minecraft:stone_button{CanPlaceOn:["minecraft:stone","minecraft:cobblestone"]}
</code>
You can change out what it can be placed on by just replacing the 'stone' and 'cobblestone' with some other block like before with the buttons, but if it's broken once placed, it will no longer have the 'CanPlaceOn' specific's that allowed it to be placed on certain blocks in adventure mode.
To my knowledge, there is no way around that. But I hope I helped.
Edit: This is on Minecraft Java 1.14.1


Ubuntu Bridge network interfaces on 4 port gigabit card

Question: I've seen this on the internet before.
I have a Ubuntu server with a 4 port gigabit network card.
I would like to bridge the interfaces so that, if an interface is busy, the packets will go through an interface that isn't being used.
thanks
Comment: It's called Bonding or Teaming. Bridge is something else.
Answer: The term is NIC Bonding, or NIC Teaming.

Nic bonding is defined as bonding of two or more network cards on a server/pc to form a parallel single connection. This is a great way of achieving redundancy to a server if it's having more number of network cards.

(https://www.linuxnix.com/nic-bonding-in-linux/)
Tutorials on the Internet abounds on how to do this. Explaining this can take several pages to show all options.
Some of note are:

UbuntuBonding
Debian / Ubuntu Linux: Configure Network Bonding / Teaming / Aggregating NIC
How to Configure Network Bonding or Teaming in Ubuntu
NIC Teaming under Ubuntu 16.04 - Can only ping DNS servers and nothing else
Ubuntu Server 16.04: Setting up NIC Teaming

Here is an example of an active-backup set up from the Ubuntu documentation:
<code># eth0 is manually configured, and slave to the "bond0" bonded NIC
auto eth0
iface eth0 inet manual
    bond-master bond0
    bond-primary eth0

# eth1 ditto, thus creating a 2-link bond.
auto eth1
iface eth1 inet manual
    bond-master bond0

# bond0 is the bonding NIC and can be used like any other normal NIC.
# bond0 is configured using static network information.
auto bond0
iface bond0 inet static
    address 192.168.1.10
    gateway 192.168.1.1
    netmask 255.255.255.0
    bond-mode active-backup
    bond-miimon 100
    bond-slaves none
</code>
(Note: this is just an example, one should read at least the Ubuntu documentation on this before doing this!)

What is network bridging?
To quote Wikipedia:

A network bridge is a computer networking device that creates a single aggregate network from multiple communication networks or network segments. This function is called network bridging. Bridging is distinct from routing. Routing allows multiple networks to communicate independently and yet remain separate, whereas bridging connects two separate networks as if they were a single network. In the OSI model, bridging is performed in the data link layer (layer 2). If one or more segments of the bridged network are wireless, the device is known as a wireless bridge.

(https://en.wikipedia.org/wiki/Bridging_%28networking%29)
An example of bridging would be connecting a computer to a WAN (internet) and LAN (work) network and the computer being able to go to both networks. It could also include making other computers on the LAN being able to go to the Internet via the PC that is connected to both.


what is the different between X.509 certificate and 2-way SSL? or both are same?

Question: Can anyone clarify what is the difference between an X509 certificate and two-way SSL? or both are same?
Comment: Does this help you http://security.stackexchange.com/a/1441/10439 ?
Answer: X509 is the type for SSL certificates, these can differ in the purpose they have. When using a SSL connection with a server you use a X509 certificate with the purpose of server authentication: TLS Web Server Authentication (188.8.131.52.22.214.171.124.1) when using it for client authentication (2 way SSL) you need a certificate with TLS Web Client Authentication (18.104.22.168.188.8.131.52.2).
Most certificates you buy already have these 2 purposes, you can check this by looking at the extended key usage in the certificate details.
Answer: An X.509 certificate is a format for sharing a public key along with the name of the entity that holds that public/private key pair and optional extensions such as usage.  It is usually signed by a certificate authority in order that it is trusted.
A X.509 certificate is used in many applications that rely on public/private keys for authentication and/or encryption.  One example as you point out is SSL/TLS.  They are also used in other applications such as secure and/or signed emails using S/MIME. IPSec also uses them. Certificate Authorities use them to derive trust.
So, to answer your question: X.509 is a format for handling certificates. SSL is a protocol that, along with other protocols, uses those certificates.


Visual Studio 2013 not letting me paste code

Question: I am using visual studio 2013 and I am trying to use ctrl+c and ctrl+v to copy and paste my code from notepad (or wherever) to visual studio but nothing happens. I researched the problem and people say that it is because remote desktop is running, but I am not using remote desktop on my computer. I have been able to copy and paste code from the same file in visual studio. thank you for any and all help.
Answer: The problem was caused by my antivirus Webroot. Explained here https://community.webroot.com/t5/Webroot-SecureAnywhere-Complete/Copy-Paste-Stops-Working-in-some-applications/td-p/21588#.UajauI7K48h you can fix this by going to settings in Identity Protection-> Application Protection and setting wdeexpress.exe to allow.


How do you respond to "Where are you from"?

Question: I am from spain and I am learning English. Someone said "where are you from". I said, "Spain".
Should I have said something else?
Comment: A one-word answer is a bit abrupt; you could say "I come from Spain", or even mention the city or region.
Comment: ^ Or, "I'm from Spain".
Comment: A one word answer is only abrupt if it seems to end the conversation. It would be fine to say, "Spain. How about you?" or perhaps, "Spain. Have you ever been there?" or maybe, "Spain. But I've been looking forward to seeing America/England/Australia for a long time."
Answer: Speaking few words can sometimes be perceived as rude by listeners. But you're trying to learn a foreign language, so it's fine for you. In general, I suggest trying to speak in full sentences or clauses, varying the words and grammatical constructions as you best you can. This way, you gain more practice, improving your English, and impressing your listeners.
As for greetings, here are some templates to work with:

I come from Spain.

I come from a Spanish town/city/county/province called ....

My hometown is ..., which is in Spain.

I was born and raised in the town/city of ..., in Spain.
Answer: A question like "Where are you from?" is what is called "small talk". The point of small talk is rarely about simply exchanging information. It is about carrying on a conversation between people who do not know each other well. A simple one word response, while not necessarily inappropriate, does not fulfill this implied purpose. Responses like the other answer may be perceived as less abrupt or rude, but they also do not fulfill this purpose.
To me, a more appropriate response would be:

I am from Spain, how about you?
I come from Spain, where are you from?

or if you prefer short responses:

Spain, you?

This response is equally as abrupt as yours, but would be unlikely to be perceived as rude.


Do close-voters automatically see my revisions to reconsider their votes

Question: If I fix and hopefully rectify what I think might be the source of Close Votes do the voters automatically see my edits to reconsider their votes, or do they have to take the initiative?
Comment: 'I tagged this as "feature request," although it's really just to know how things work.' So, I rettaged it 'support' because that's what it is then.
Comment: See [here](https://math.meta.stackexchange.com/questions/26696/what-can-be-used-checking-on-posts-you-downvoted-closed?cb=1) for recently related discussion.
Answer: An edit does not notify the users that have cast a vote to close, specifically.
However, if your question is closed, then the first edit to the body of the question after a closure will (usually) put the question into the reopen review-queue where it is shown in the improved form to users that can vote to reopen or vote to leave the question closed.
This may or may not include the users that voted originally.

I wrote '(usually)' as it will not happen if the question already is in the review queue for another reason (such as, a vote to reopen) or if the edit happens too long after closure (5 days). Also note the 'first.' If there already was another edit after closure before you got to fixing the question then unfortunately it will not be put into review automatically.
Comment: Interestingly this is very slightly different from https://meta.stackexchange.com/a/256071
Comment: Complete details for *usually* can be found [here](https://math.meta.stackexchange.com/questions/16820/should-i-avoid-minor-edit-of-a-question-which-was-put-on-hold/16821#16821).
Answer: Reviewers will see all the "rolled up" edits at the point in time when it is being reviewed compared to when it was closed (or "put on hold").
We see a red/green view of the differences, with an alternate tab view that shows the "revised" Question as it currently stands.
Occasionally it happens that someone edits a closed Question in an attempt to improve it, but the change is rolled-back by the OP.  In this case the red/green view reports that "there are no differences to display".


Can you retrain a feat into a feat that "must be taken at 1st level"?

Question: Can you retrain a feat into a feat that "must be taken at 1st level", such as Fiendish Heritage or Monstrous Mask?
Answer: By RAW, not unless you're still 1st level.
As per the description of the retraining character option, when selecting the new character option after retraining, you must meet all its prerequisites at that time:

When you use retraining to replace some aspect of your character, you must meet all prerequisites, requirements, and considerations for whatever you're trying to acquire.

A feat that requires you to be at 1st level when it is taken is therefore not a valid option for retraining if you have advanced beyond 1st level.
However, nothing prevents you from using retraining to get rid of a "1st level only" feat, and the rules for retraining specifically identify that they may allow you to change some character feature which is meant to be representative of a permanent part of your background/heritage, as most 1st-level only feats are:

Some of the options listed below involve retraining features of your character that are essentially permanent parts of your heritage, such as a sorcerer's bloodline. The cost of retraining these things presumably includes magical or alchemical alterations to your body. The GM might rule that these changes are unavailable in the campaign, are only available under rare circumstances, take longer, are temporary, require some sort of quest, or are more expensive than the listed cost.

If I were your GM and I was supporting the use of the retraining rules, I might allow you to retrain a 1st level only feat, but I would almost certainly include extra requirements appropriate to the feat's nature, as the text suggests.
Answer: Feats that "must be taken at 1st level" usually represent attributes of the character and are not, per se, things that he "trained" for - unlike most feats. Examples are innate abilities that the character was born with, his ancestral backstory or genetic attributes (an Infernal appearance).
This is what being able to select them only at fist level actually represents - that these are traits which you cannot actually gain by effort or training. So, while retraining one of your feats, you could not possibly start learning "how to change your heritage", so to speak.
That being said, you could always find ways to even change those - like discovering you are and adopted son of a sorcerer - but this goes beyond the actual rules and it is at your DM's discretion.
Comment: Pathfinder's retraining rules explicitly state "Some of the options listed below involve retraining features of your character that are essentially permanent parts of your heritage, such as a sorcerer's bloodline" so though I agree that it might be a stretch to narratively justify, this is a world with alchemy and magic and many characters will go on to do much weirder things than suddenly discovering they've got a demonic ancestry they were able to awaken by drinking a weird potion.
Comment: In the case of your "demonic ancestry suddenly awakening" there would be no need to "retrain" for such a feat - you would actually gain that feat for free. There would be no process of "studying for 8 hours a day" as retraining states.
Comment: This answer would be improved by some rules citations to back up its claims, if there are any.  As it stands, it looks like you're responding to a rules question with your ideas about would make narrative sense, which isn't really answering the question.


Is my outlet 20Amp or 15Amp?

Question: My outlet has the horizontal line, so should be 20Amp, no ? Still the breaker that controls it (the one written Fridge/Oven on it) is 15 Amp.
Am I missing something ? Did they install the wrong outlet ?
Comment: Note looking at the panel I only see 1ea 20 amp small appliance branch circuit (kitchen) it states GFCI, so my guess in the answer is likely and it's ok the 20 amp receptacle.  How old is the home? When was the wiring updated? I am guessing at a DIY update because only 1 kitchen circuit.
Comment: Building was built in 1929. Apartment had new owner in 2008 and 2021.
Answer: You are correct that is a 20 amp GFCI receptacle but the breaker may not be for that fridge.
Residential requires 2 20 amp small appliance branch circuits this has been code for many decades.
Prior to GFCI requirements for the kitchen counter top circuits called small appliance branch circuits it was common to power the fridge from this circuit.
It became a common thing to put a GFCI receptacle at the first receptacle to provide GFCI protection for that branch circuit.
It is possible the "fridge" 15 amp breaker is for another device.
If the 15 amp breaker actually controls that receptacle a correction needs to be made a 15 amp receptacle to match the breaker.
(You can have 2 or more 15 amp receptacles on a 20 amp breaker but not a 20 amp receptacle on a 15 amp breaker).
It may be possible the wiring is 12 awg, if 12awg wire it may be cheaper to replace the 15 amp breaker with a 20amp.
Comment: Ok. Thanks for confirming. The 15 amp breaker really controls that receptacle. I checked a few times to make sure the mistake was not mine.
I'll check the wire awg. I still have hope I can plug my oven ...
Comment: Oven igniters and clocks are really small loads a fridge and oven on a 15 amp with the fridge would not bother me compared to some. With a home this old there is a possibility of aluminum wire make sure of the type of wire for example a #12 aluminum a 15 amp breaker is the max if 10 awg aluminum the breaker can be upsized to 20 amp I figured I should mention the aluminum because I have run into aluminum several times on flips with older homes aluminum takes special splicing devices called alumiconns usually purple in color and switches/ receptacles rated for aluminum (CO/ALR) most devices are.
Comment: OK, got it. I added pictures of the breaker box inside. I can't know the gauge of the wire for sure, but the lower the amperage, the smaller the wire should be (diameter-wise). It would seem that's not the case here. On the left side from instance, you have from bottom to top : 2 big wires connected to 30A, 2 small wires connected to 20A and 3 big wires connected to 2 15A and 1 20A. It should have been: 2 big, 2 medium, 2 small and 1 medium, no ?
On the right, it looks like an even bigger mess...
Comment: Compare the larger on the 20 to the smaller on the 15's it looks like copper but I would have to see the wires to tell for sure. The thing I noticed was several whites under 1 screw that is a code violation. You usually can have 2-3 greens under 1 screw if the panel rating allows it but only 1 white . It also looks like the neutral buss is bonded the silver lug , code changed back in 99 and today or after 99 that would be a violation. Easy to fix since the grounds are separated.

Is my outlet 20Amp or 15Amp?