Do I need to mention every dimension on a to-scale drawing?

Question: I'm my engineering drawing course, do I need to mention and show every dimension in the diagram if I've drawn everything to scale and also written the scale below?
Comment: It depends on the person who will be reading your drawings.  In a class, you should ask your instructor.  In real life, you should ask the facility, which will be fabricating parts per your drawings.
Comment: I'm not qualified to give a definitive answer on this, but I've dabbled in it enough with my own personal projects to think that any critical dimensions should still be called out directly, including their tolerances, just to emphasize to the fab shop that you care about those ones specifically.  In the case of automated manufacturing that takes your drawing/model directly, it can still be useful to provide a few dimensions on a different layer (that the machine doesn't see) for spot-checking.
Comment: I'm not sure if you're asking whether anyone would simply measure out on the drawing and then apply the reverse scale to get any necessary dimension, but if you are, then in almost all cases the answer would be "no". The only time a scale drawing might be measured that I'm aware of is when it's a map or floor plan, and in the latter case that would never be done for actual construction. A contractor might measure a drawing and apply the reverse scale to estimate lengths of cable, conduit, or pipe needed for a job. That's the only real world case I've seen.
Comment: I want to clearly state that this question (and its answers) seem to be specifically related to machined parts and things of that sort. The ability to scale or proper use of scaling is very different in other areas (e.g. grading/site work or buildings/architecture).
Answer: I am not a professional engineer yet, but in my engineering design courses we were taught to show certain dimensions. For example, you choose a datum line and show certain dimensions. You don't need to label every single dimension, but you should show your dimensions in a way such that the dimensions which are NOT shown can be calculated arithmetically.
For example, if you have a single line, with 4 points starting at A and ending at D with B and C somewhere along the line, and A is your datum, then you could just show the dimensions for A-D, A-B and A-C.Simple arithmetic will then allow you to calculate the distance from B-C, for example (by taking A-C minus A-B). I believe this is done so that the person looking at your drawings doesn't* need to get a ruler out to check the dimension!
Comment: Adding to @Wasabi's comment, redundant dimensions are often labelled differently from other dimensions, for example I've seen "reference dimensions" surrounded by parentheses like so: (100). It's important to indicate which dimensions should be prioritized/must be exact during construction and which ones are there for reference, especially when you are indicating things like machining tolerances
Comment: +1, but I'd add that many engineers I've worked with (and I agree with them) prefer to put all the dimensions which might be useful, even if some of them end up being "redundant". This limits the risk of accidental arithmetic mistakes. So long as you don't take it to the extreme and the drawing becomes cluttered, the more information, the better.
Answer: My general philosophy is that you don't need to dimension everything, you just need to dimension every unique feature.
For instance, say you have a bolt pattern, with one hole in each corner. You give the dimension for every offset for the holes, but this is more information than required.
The way I do it is to show bounding dimensions for the plate, dotted lines to indicate vertical and horizontal centerlines (no dimensions there as it's understood they're half the bounding dimensions), then just show the distance from each centerline to one hole. For the hole, have a callout that gives the hole diameter and tolerance and/or threading requirements. Again, if all four holes are the same, then just use, "4x 6mm Thru All" or similar.
Machinists are some of the smartest people on the planet. My preference would be to give a clear, concise set of drawings to them and then, if I've forgotten a dimension, they can write back and ask.
So to recap, I gave 5 dimension - bounding X, bounding Y, centerlineY-Y, centerlineX-X, and hole diameter. That gives everything to produce the plate and four holes. If you have fillets on the corners (try to avoid ever making something with sharp edges unless you need to!) then that's one more dimension - 6 total - four eight features.
You can get away with this because you dimension the unique features. One hole and one fillet on a square plate - the rest are clearly symmetric. The only time I would start adding more dimensions than that is if there are so many features that it could be confusing as to which features are members of a pattern and which aren't, or if there are offsets or jigs in the base material that would make patterning more difficult.
If that is the case, then again my personal preference is to have one sheet per pattern or set of unique features. If you've got a part that has through holes, threaded holes, and some slots or something, then one sheet gives bounding dimensions for the part plus dimensions for the through holes, the next sheet gives dimensions for the threaded holes, etc.
5 minutes of a machinist's time is a couple reams of paper, so keep the drawings clean by using as many sheets as you need to in order to dimension all of the unique features.
A couple of parting notes:

Use the machinists. Explicitly ask for a critique on every part and drawing you produce. You should, if at all possible, talk to them in advance about what you want to do and how you're planning on doing it. See the earlier comment: machinists are brilliant people.
This goes along with the one pattern-per-sheet rule of thumb - don't ever, if at all possible, make a drawing for an 8.5x11 sheet of paper. Use the 11x17 or larger format. Again, the more legible you can make your work, the better for everyone involved. I think, if you ever see a set of your own drawings on 11x17, you'll never go back.
Answer: As with many questions, the real answer is "it depends." The biggest variables are what kind of engineer you are, who your audience is, and what industry you're working in. In a class setting, it is probably a good idea to consult your textbook or your teacher for their opinions in the context of the class, but here are some general factors in making the decision when you don't have someone to ask. In industry, if I know the department or company that is going to do the actual work, I do usually ask them what information they need and try to tailor the drawing to them. More formally many companies will have internal policies or follow consensus standards like ASME Y145 or the ISO ICS 01.100 series. But often, you won't have that luxury. Maybe you are drawing something to go out to competitive bid, or for a project that has no manufacturing pipeline set up yet. In this case you have to make decisions based on the context. A number of other answers here provide good guidelines for relatively conventional machined parts, but don't necessarily address other types of drawings you may need to produce.
The general hierarchy of dimensioning goes like this:

Dimension critical features: These are the items that must be right for your object to serve its purpose. For example if you are drawing a sprocket the center bore must be correct, or it will not fit on the shaft. For mechanical drawings, you should pay particular attention to the tolerances on these dimensions and make sure they are very clear. Make sure you are dimensioning what really matters to you, even if this isn't the most convenient way to dimension it for your audience. In architecture and some other disciplines, you can also add "HOLD TO" to the dimension, to indicate that other dimensions may have to be adjusted slightly to make this dimension correct.

Dimension all functional requirements: These are all things that matter to your design, but are not as essential as your critical features. You should make sure that they are dimensioned and clear, but you don't have to draw extra attention to them like you do with a critical dimension. For example on the sprocket, the thickness of the sprocket needs to be machined correctly for it to fit, but it won't be a very tight tolerance.

Dimension things your audience needs to know: In many designs there are some aspects that are arbitrary. Maybe in your situation the thickness of the sprocket hub doesn't matter at all - it's under very little load and going in the middle of a big empty shaft for example. All the same, you should dimension it so that the person making it doesn't have to make the choice for you. If you want to allow them to make some economical decisions (eg start with a material size they have in stock) you could chose to put a very wide tolerance on the dimension. If it impacts what the next person has to do, you should provide some information.
Note the this section can be a little different for different industries. Machinists for example are used to having a part fully defined on a drawing so there's no guesswork for them to do. On the other hand if you are drafting a stud wall for a carpenter to frame out in a building, you would typically show them the minimum stud spacing, any special conditions (doorways, windows, etc.) but not every other detail. For example, it typically wouldn't matter to the engineer which side they started the studs from and where they ended as long as there is no gap greater than you specified. It might be easier for them to start from the north side because that's where the lumber is, or easier to start from the south side because the adjacent wall has already been framed. They might get clever and start the pattern centered on the wall to save one stud's worth of material. As long as the drawing contains all of the dimensions that matter to you, it's OK to leave it under-defined in this situation. For this step, it is really helpful to understand the process that someone else will be using to make your part whether it's machined, welded, carved, molded, etc.

Dimension things that other audiences would like to know (optional:) Often there is useful information you could provide, even though it doesn't matter to the person you're sending the drawing to. In the sprocket example, the machinist won't care what the pitch diameter is if you've already given them the profile to cut. All the same, you might decide to add it. This information will be useful if another mechanical designer wants to use your sprocket and comes across your drawing first. Generally since these dimensions are just for information, not an instruction to the next person, they will be indicated as reference dimensions. That should be done by placing them in parenthesis or adding the abbreviation 'REF' after the word.

Once all of these dimensions are listed, and the appropriate tolerances, materials, processes, etc are specified, your drawing should be complete. Now it's possible that if your object is complicated, the drawing will be cluttered with lots of dimensions that may seem redundant. There are a few options to reduce the total number of dimensions but retain the important information. This list is certainly not exhaustive, but it should get you started in most applications. Note that some of these make more work for your audience, so they may not always be received warmly.

Patterns: If your features follow a grid pattern, it is sufficient to dimension one object in each row/column rather than each item. Similarly if your objects are all distributed rotationally around a point, you could dimension the circle they fall on and the spacing between them. Then as long as one starting position is given, the next person can construct the rest of the pattern.

When the pattern is not obvious, it's a good idea to provide dotted lines that clarify which features are in the pattern and which aren't.

Typical: If your drawing includes many features that match (entirely or in some aspect) you may dimension one and add "TYPICAL" or just "TYP" after to indicate that everything that looks like that, is the same as that.

Similarly if a feature appears more than one place, you can describe the number - give the details on one location and then specify "8 PLACES" for example.

Symmetry: If your object is symmetrical, you need only dimension one half of it, and then show a center line.

Profile-controlled Geometry: When a feature or part is truly too complex to dimension clearly, even after you have considered detail and auxiliary views, your best bet may be a profile tolerance. With this option, you will provide a (digital) model of the curve or surface to your audience, and your drawing will show the shape without any actual dimensions. A profile tolerance block should be used, which indicates that the dimensions are controlled by the profile and gives your audience information on what the tolerance is. Using a profile dimension on an object that you could dimension reasonably easily would come across as lazy and unprofessional, so save this for truly complex shapes! More information on profile tolerances is available here and here. Note that even when you aren't using  profile controlled geometry, you may still give a copy of your digital file to the shop you are working with as a courtesy to speed up their process. In general if you provide a properly dimensioned drawing, it will be considered to supersede the computer geometry unless you specifically agree otherwise.

Lastly, there are a number of good textbooks on drafting that will go into much more detail with better examples and style guidance. One that I would recommend is Technical Drawing with Engineering Graphics (Giesecke et al.)
Answer: Yes, with the caveat as supplied by masiewpao's answer that dims which can be calculated directly from supplied dims can be left off.
The reason you must write in the dims is that "to scale" is purely qualitative. Nobody ever puts a scale on drawing to guesstimate the dimensions.  The reasons why not should be obvious :-)
Comment: Just to spell out some of the reasons if they are not "obvious": There are many ways to reproduce drawings on paper (or computer displays) that don't maintain 1:1 scale, and many consumer-quality photocopiers and printers don't have exactly the same scaling in the X and Y directions. Even if you avoid those problems, "ordinary paper" isn't dimensionally stable, and it changes size by different amounts along and across the "grain" of the paper as the humidity changes.
Answer: It very much depends on the context. Drawings are there for a purpose ie to communicate information and you need to keep that specific purpose in mind when producing the drawing.
For example if you are producing a drawing for the manufacture of a part then you need to think about what information is needed for the manufacturing process.
I know from experience that it is possible to have a drawing which isn't actually missing any information as such but the dimensions have been assigned in such a way as to be very unhelpful.
It is difficult to generalise but you need to think carefully about the specific information that the person using the drawing needs as far as is practical this should be presented clearly on the drawing.
As mentioned in another answer it is often best to present dimensions relative to a few well defined datum lines or points rather than stacking them on top of each other but again the context and especially the manufacturing process involved makes a difference.
Having to scale by measuring from a drawing is usually bad practice as it tends to introduce extra errors, especially if a drawing is reproduced or handled a lot. any dimensions not shown should be easy to deduce by simple addition or subtraction.
Answer: One should never ever measure things from a drawing. There are several reasons for this:

The printer was misconfigured, and the output is no longer in scale. This happens a lot. Even if not the printer has a limited resolution so very small details may be off anyway.
The measurement may be inaccurate maybe the dimension in question is 10.1mm but the machinist measured from the drawing and interpreted it as 10mm. Bad! Also for longer spans the measurement may be a bit skewed etc.
The drawing is an acceptance document, what you're documenting is the acceptance criteria. You should thus have all the dimensions that matter to you marked out. Otherwise you may need to pay for all manufacturing defects.
You should not mark out all dimensions just so much that the dimension  loop is complete. So to not introduce conflicting information in the drawing. If you just add those dimensions put them in parentheses. This may be useful for the machinist if the acceptance criteria is not really useful for machining for some reason (this can be bad for very accurate parts though).
If you totally leave out a dimension loop then you are leaving things to the machinists judgement. While this may not be bad as such, you're letting somebody else do the thinking in a way that produces something spectacularly different from your needs. Most shops would not accept such jobs but your local machinist might.

But no you should try to add as few dimensions as possible that captures what your needs are. And suplement with as much data as the manufacturer needs to get things done.


Is every symplectic manifold a Hamiltonian reduction of a cotangent bundle?

Question: Today I heard the claim that in practice, all symplectic manifolds that people care about arise as the Hamiltonian reduction of a cotangent bundle $T^{\ast}(M)$ under the action of a Lie group $G$ ($M$ and $G$ may both be infinite-dimensional in general, I think). For example many moduli spaces of interest arise in this way. Is it literally true that every symplectic manifold arises in this way? Can we moreover arrange for $G$ and $M$ to be finite-dimensional?
Comment: If you require finite dimensions, this is a rather hyperbolic claim--- consider an arbitrary projective variety.
Comment: @user: yes, and?
Comment: I was just pointing out that I see no reason e.g. the quintic three-fold in CP^4 (which is one of the most studied symplectic manifolds with it's standard Kahler form) is a quotient as above. Of course proving that seems difficult enough, but that seems irrelevant to what you are asking. Certainly it's not naturally presented that way and although the theory of symplectic quotients plays a role in that literature, it's not in this direct fashion.
Comment: Between Kahler manifolds and symplectic quotients (there is obviously some overlap here), you get a lot of the symplectic manifolds people care about.
Answer: Actually if you allow infinite dimension, every symplectic manifold is a coadjoint orbit of its group of symplectomorphisms. That is even more... how to say? Symplectic :-) If you want a reference there is a diffeological version of this theorem here It is also in the Memoir here §10
Answer: That reminds me of a paper that I believe should answer your question: $\mathbf R^{2n}$ is a universal symplectic manifold for reduction (available here):

The authors show that if a manifold $Q$ is of finite type, that is, $H^k(Q,\mathbf Z)$ is finite-dimensional, then the noncanonical cotangent bundle $(T^∗Q,dθ_Q+τ^∗_QΩ)$ can be obtained by a Marsden-Weinstein reduction of $T^∗\mathbf R^n=\mathbf R^{2n}$ relative to a torus action. Here $Ω$ is a 2-form on $Q$, $τ_Q:T^∗Q→Q$ is the bundle map and $θ_Q$ is the canonical 1-form. Since any symplectic manifold $(Q,Ω)$ is a reduction of $(T^∗Q,dθ_Q+τ^∗_QΩ)$ relative to the zero section, it follows that any symplectic manifold can be obtained by a reduction of $\mathbf R^{2n}$ with the standard symplectic structure. (etc.)
Comment: Thanks! The word "reduction" in the last sentence seems to be referring to a construction more general than Hamiltonian reduction though, if I'm not mistaken.
Comment: @Qiaochu You're right, this is "Cartan" reduction -- the quotient of a submanifold $N$ by the characteristic foliation of $\omega_{|N}$ (assumed constant rank) on it. I wonder (but haven't really thought through) whether there might be a moment map interpretation when $N$ happens to be a level set of some functions?


Why was Danzo after Shisui eyes?

Question: This has been bugging me for a while. I'm very interested in Shisui's story of his life, but the real question is why was Donzo after his eye? Was it because of his sharingan? and "how is Donzo supposed to use this"?
Answer: Shisui was one of the few members in the clan's history that was able to awaken the Mangekyō Sharingan. It granted him access to a very powerful genjutsu, a unique technique noted to be of the highest caliber, Kotomatsukami. This technique allowed him to enter a person's mind and manipulate him or her by creating false experiences and illusions making it seem as though they were doing things of their own free will. The victim wouldn't be able to notice that they were being manipulated.This Mangekyō Sharingan  are noted to be the "heavenly eyes that see the truth of creation without obstruction". Hence Danzo was after Shisou's eyes.Source
Comment: But how did he get the mangekyo sharingan what friend would he have killed ? or did he do it Sasukes way?
Comment: If you're asking as to how Shisui attained the Mangekyō Sharingan, Shisui has a darker side he was ashamed of. Out of envy to a friend who he had believed had surpassed him in ability, Shishui withheld his aid at a very critical moment resulting in the other shinobi's death. The guilt caused by the same led Shisui to consider himself to be a murderer causing him to awaken the Mangekyō Sharingan.
Comment: So mainly that would be how Sasuke would accomplish it from his envy to Naruto? He was jealous of Naruto and he had seemed dark on revenge as he went on Orochimarus side?!

Why was Danzo after Shisui eyes?


How can I securely authenticate the client application sending me data?

Question: We have a web service logging/recording user data sent over https by our client application. Is there a way to securely ensure that the data is getting sent by the client application and not by a fake tool impersonating our app? Ideally, I wouldn't like to have to resort to things like hiding an obfuscated key in the client or other "security through secrecy" techniques…
Comment: What type of data is being sent from the application ( as in is it XML or anything like that )? Does it have a consistent structure?
Comment: It's zipped JSON, signed with a public key the app contains. But anyone could find the key and then forge a fake message…
Answer: You can't.  A server fundamentally can't trust a client (there are some exceptions - if the client machine is hardened (hardware verifies firmware, firmware verifies OS, OS verifies every application running), it might be possible to do that (but not really - someone with a soldering iron could always modify the hardware verification), but if you don't 100% control the client, you're kinda out of luck.
You need to ask yourself: What are the risks of the client uploading bogus data?  What are the consequences of not authenticating that it's your application uploading the data?  One hard question you should ask: Does the client have an incentive to upload bogus data?
If the user doesn't have an incentive to upload bogus data, they probably won't bother.
One thing that you can do: You can authenticate the user running the application (via any one of a number of authentication mechanisms) and then save the uploaded data along with the authenticated user ID (and IP address).  That way if the user does upload bogus data, you can track back who made the change.  Of course you've now made the data PII which may have privacy issues for your service.
Answer: You do need to authenticate the client, and that requires there to be some sort of secret.  If a human user is controlling the client, you may just be able to register and authenticate the user, using some secret they know or have access to.
If the client is automated and you don't control the hardware and software environment that the client relies on, you're out of luck in the face of a determined attacker who has control of the client.  But you can make it hard.
Your problem seems related to the general problem of licensing client applications, and a good overview of one approach to that (for android apps, in Java) is here:
http://android-developers.blogspot.com/2010/09/securing-android-lvl-applications.html
You can adapt that to your environment or look for other open source libraries suited to your situation.
By the way, "security via secrecy" is fine - secrets like private keys are part of most good schemes.  It is "Security thru obscurity" that people try to avoid, i.e. just making things complicated, or pretending that attackers won't understand your algorithms.
Comment: +1 for "security via secrecy" vs. "security through obscurity"
Answer: If you take a look at the 10 immutable laws of security, law #3 explains the problem at a fundamental level:
Law #3: If a bad guy has unrestricted physical access to your computer, it's not your computer anymore
Answer: You could use kerberos to perform mutual authentication between client and server. You would preferably have some out-of-band method for initially identifying the client, e.g. issuing the user with an identifier. of course, you now rely on that identifier not being compromised...
Comment: Kerberos is no better than anything else when the client is rogue.
Answer: As the other guys said, you cannot trust a client, until the client authenticates with a cert YOU created.  At this moment the whole problem boils down to a key/cert distribution problem:

How does the client know that it's getting a good cert from a real server?
How does the server know that it's not giving away good certs to malicious clients?

Until these questions are answered (correctly!) all other events following the authentication are moot.
Comment: Even using a certificate does not ensure that it is the correct application using the cert, and not a user that extracted the cert and is using it directly himself.
Comment: @AviD Yes, that's precisely the problem.
Comment: No it doesn't have to be a cert you created - it can be a cert signed by a trusted third party, or you can restrict access based on the hash of the public key of any cert if you get the client to send you the cert by secure means (but that presupposes that the client can ensure the security of the private cert)
Comment: @symcbean: "that presupposes that the client can ensure the security of the private cert" Yes, and again, that's the problem. I don't trust the human client; ideally, I would like to have a way to trust my app, and be sure that scenarios like "the guy extracted my trusted cert from my app and used it" cannot happen. Looks like it's fundamentally impossible, though. Sigh…


Ports in the TimeCapsule

Question:
In a few days I'm going to buy my first Mac (an iMac) as well as a Time Capsule. Looking at the specs of that product, I've seen that it has a WAN port and 3 Ethernet Ports.
I suppose that the WAN port is to connect the TimeCapsule with the Internet. At home, I get Internet trough a Ethernet wire (it's not an ADSL connection).
My question is: will I be able to connect the Ethernet wire into the WAN port in order to share my Internet connection wirelessly over the house?

Thank you so much!!
Answer: Yes, that is the port you'll use. If you use one of the other ports, Internet access will sometimes work but the device will think it won't.
Use the WAN port for your apartment's inbound Internet (whether an Ethernet cable or from an ADSL or cable modem), and the other three ports for outbound to your local machines that aren't on wireless.
Comment: As you say, the Ethernet wire plugged in the WAN Port will work ok. I hope that! Thank you so much!

Ports in the TimeCapsule


About the meaning of the title Priv-Doz

Question: In Germany there exists the title Priv-Doz before the name of some professors. What does it mean? Do these professors allow to hire postdoctoral applicants?
Comment: A comment 'cause it's not what you are _really_ interested in. PD, a _Privatdozent_ title gives you a fancy diploma, an obligation to teach for, like two hours a week, and hopefully an incentive to be hired as a professor. All other standing is related to the _actual position_ that person holds, but not this title.
Comment: @OlegLobachev: Is the diploma really so fancy? If yes, why?
Comment: Udank: At least my diploma is. Not sure what's the reason, but the habilitation diploma is much less fancy that PD one, at least at my university.
Answer: Formally it is a title given to a university teacher, translation: private lecturer. It means you are able to teach, but not yet a professor.
In practice it is the required step-up from the PhD degree, to get a permanent position.
Source: https://en.wikipedia.org/wiki/Privatdozent
Comment: Yes - I know of at least two examples. The would most likely need external funding to do something like that.
Comment: Can they hire postdocs?
Comment: "In practice it is the required step-up from the PhD degree, to get a permanent position." At least for some fields, this information is outdated. There are alternative routes to permanent positions, including junior professorships (see the specified Wikipedia page).
Answer: A Privatdozent (PD) is a university scholar who has a Habilitation and is thefore allowed to supervise PhD students, but is not (yet) a professor. They may hire postdocs if they can obtain funding. Unlike professors, their position usually doesn't come with funding for PhD students or postdocs. In fact, the title PD ist just that - a title. It doesn't indicate anything about the position that the PD may or may not have, except that they don't have the position of a professor.
In other words, in Germany and Austria a PhD thesis makes you a doctor, and a subsequent Habilitation makes you a PD. Traditionally, you need a Habilitation to be hired as professor.
Comment: Yep, that's the traditional way to a professorship. Still, there is "junior professorship" in some places (basically assistant professor in Anglo-Saxon world, with or without tenure-track), the "habilitation-equivalent accomplishments", leadership of elite research groups, such es Emmy-Noether programme, etc.

About the meaning of the title Priv-Doz


Does the advent of the SSD have any implication for database optimization?

Question: Today I was browsing through a book on SQL Server optimization and it seemed that a certain amount of the ideas were based on a linear model of storage. As SSDs have a completely different storage model, do they in any way change the game in regards to how one thinks about database tuning or optimization?
Comment: With SSD's it seems you need to optimize more to minimize wear than increase raw performance...
Comment: interesting thought, and some cool answers, +1
Answer: Yes, they do change the game. Optimizations based on the characteristics of spinning magnetic disks (like seek time and rotational delay) may not be relevant on SSD drives. A recent paper* published in FITME 2010 presents one new query optimization algorithm based on the characteristics of SSDs.
However, these changes will probably be low-level changes (to storage and retrieval algorithms, for instance) that can be implemented effectively by database developers. They probably won't affect database users that much.
* IEEE Xplore - A column-oriented storage query optimization for flash-based database
Comment: Yes - but most database optimisations already went away when we just put everything into ram. Once 64Gb of RaM got cheaper than a SQL expert things already changed, not sure how much SSD adds to that
Comment: @Martin agreed. On the other hand, there's been a decided turn towards horizontal (cloud, etc) rather than vertical (monstrous $500k DB boxes) scaling recently. Distributed systems can get global non-linear performance improvements from this sort of local linear optimization. This can often be a better cost model as well.
Answer: Performance
SSDs are performant: they do not have to seek, and throughput is blazing. Most software dealing with disks, to the extent they are optimized, are optimized to reduce the number of synchronous seeks. In so doing, they introduce hosts of complexities. With the advent of fast, seekless writes to persistent storage, new data storage systems will no longer require such complexities.
Durability
SSDs currently have high failure rates. Your SSD will fail. Your SSDs will fail at a much higher rate than magnetic disks. You must work around this with replication, backups, etc. This introduces its own set of complexities.
Comment: Um, what? SSDs have high failure rates? The annual failure rates for SSDs are *significantly* less than HDDs. So far few people have managed to exhaust available writes on SSDs, especially with more advanced controllers (LSI's SandForce for example).
Answer: The overall reduction in price of storage has much more profound effects.
Before we had SQL, we had super-optimized hierarchical and network databases where DBA's had to carefully plan out track and cylinder placement of data.
SQL databases are much less efficient.  But now that disks are cheap, huge and fast, we barely care.
NoSQL ("Document") databases can be somewhat less efficient than SQL because there isn't the same capability of logical-to-physical mapping between the SQL logical schema and the underlying physical schema of files or tablespaces or whatever.  And we barely care.
The SSD performance improvements are likely to be lost in the changes caused by use of NoSQL databases to the way we architect systems overall.
Answer: From what I gather from the ServerFault blog, database servers have to have burly hardware.  The database server of the stack exchange sites is running SSD's (see http://blog.serverfault.com/post/our-storage-decision/) and I would imagine that query optimization is still very much needed.  CPU and memory are impacted by database queries as well as IO.
However, database performance does depend on IO a great deal, so SSD's would sure help.
Answer: The main issue with optimizing anything for SSDs has to do with how they write data. A traditional hard drive typically stores data in small sectors of around 512 bytes and can actually manipulate sectors directly at or even below that level.
SSDs have some drawbacks with regard to writes:

A minimum block write size of around 4-8KB.
Writes can only be performed on a full page basis of typically 256KB.
Only empty blocks can be written to.

A typical nightmare scenario, referred to as Write amplification, is when you want to write a single byte to a location on disk that has some blocks already in use. In order to write there, you need to first copy the entire 256KB page into memory, erase the entire block, change the single byte in the page, then write back the entire modified 256KB page. So in order to write a single byte, there's been about half a megabyte of "traffic"!
There are lots of optimizations for this problem implemented at the SSD, controller and even operating system level, but undoubtedly DBMSs can benefit by tailoring these optimizations to their specific workings.
This is however not something database users (as in, using a database in their application) need to think about, since it will be highly dependent on design/implementation decisions at the DBMS level.
Answer: Yes, for the reasons everyone has stated.
I was listening to a podcast saying that large chunks of RDBMSs like Oracle, SQL Server etc will start being "optioned out" if they can work out the seperation properly. Detect if its an SSD drive and optimise accordingly.
There is a lot of extra code built into the caching and writing of data that simply isn't required anymore.
Even more interestingly is the RAMSAN and its variants. Basically an hard disk drive made out of RAM chips with a built in X hour UPS and the ability to background write to longer term HDD storage.


What is the best way to research openings and endgames in a browser?

Question: Basically, I just want to know if there's any easy way to use websites to practice endgames and openings by just opening my browser. I keep finding downloads to Windows programs, which is a problem when I play chess on mobile devices. Then there are the options that require to pay, which isn't really something I could do.
Answer: Three options I can think of immediately:
https://chess-endgame-trainer.firebaseapp.com/home is a fantastic chess endgame trainer.
Chessable also lets you create your own courses (for free) which you can then do spaced repetition on.
Listudy is another option.
Answer: I would strongly suggest looking into chess.com as they have an extensive "Learning" module on end game and end game tactics. You are limited to the amount of modules you can complete  per day unless you are willing to pay for a subscription. This isn't necessarily a bad thing as learning to much can result in concepts not necessarily taking hold.
Alternatively lichess.com has study section which is comparable but in my opinion not to the same standard. That being said it is free so might be a solid option. Those would be the two I would strongly suggest for web based.
There is another option which is to look into programs like ChessBase or SCID and look at creating positions of end games and trying to play them out with computer analysis. That is a fairly advanced method of doing this though and I would suggest that you do that once you feel well established.
One of the best EndGame trainers I have seen was in ChessMaster GrandMaster Edition with a learning course by Josh Waitzkin which is narrated and well presented.


How do I ask a question that may require recommending a product?

Question: I have a problem that I need solved, and it may require the recommendation of a product.  How do I ask these type of questions so that they aren't closed?
Return to FAQ index
Comment: Related (but not duplicate) question about list-generating questions. http://meta.stackexchange.com/questions/161563/how-or-where-should-good-list-questions-be-asked-many-are-marked-not-constru/161564#161564
Answer: There are two ways to generally ask questions of this nature.  The Good and the Bad.
How NOT TO ASK questions that may require a product recommendation:

"What the best x-category product?"
"List of products that does x-action"
or this question's sister: "Is there something that does x-action"
"What is an alternative to x-product?"

These questions are discouraged because they lead to spam, "link rot".  They also do not provide good solutions (the main focus of any site) as it is hard to filter the good from the bad when there are 10+ answers all at the same rough vote count.
How TO ASK questions that may require a product recommendation:
First of all: Do your research. Have you thoroughly searched for an answer before? Do you even have a real problem you need to solve? And if so, have you attempted to solve the problem yourself? Instead of assuming a solution, ask about your problem instead.
If you did your research and you can describe what the problem is, then here's how to ask:

"I have problem-x that I don't know how to solve. I've already tried X, Y, Z. How do I do this?"
"I have product-x that doesn't work anymore.  How do I troubleshoot or fix this"
"I am deciding between product-x and product-y and don't understand the difference between them. Is product-x always more A and less B?"

With these types of questions, make sure that you're as detailed as you can be about the issues.  If you just say "My product doesn't work!" and that's it, it will be closed.  Also, be open to other products that may solve you solution (hence why it's here)
These questions are problem based, and lead to useful answers.
Comment: Aye to this. There are times when one is faced with a problem that may require a product of a sort. To that end, when one asks how to solve that problem, that product will *naturally* be provided as an answer if it is indeed a working solution. So one shouldn't dwell on the fact that a product might be needed - just focus on the problem. Recommendations will come in as they are needed.
Comment: Given that meta.SO is for all SE sites *I've already tried X, Y, Z* doesn't really work in many cases. Consider the re-worked question in [Q&A is Hard, Let's Go Shopping!](http://blog.stackoverflow.com/2010/11/qa-is-hard-lets-go-shopping/#howtoask) *How do I tell which point-and-shoot cameras take good low light photos?* You would expect people to have tried multiple cameras? Also I think the best answer for the SO specific case is covered nicely by Shog9's answer [What exactly is a recommendation question?](http://meta.stackexchange.com/a/139404/148672) in the section Ask How not What
Comment: You really shouldn't be using the tag markup to emphasize statements that aren't actually tags,  bold, italics, or nothing, would be better.
Comment: @Servy as this is CW feel free to edit as you see fit.


Some tag change suggestions

Question:
gospels and gospel: these two tags get confused quite a lot. I think it would be a bit clearer if gospel was changed to the-gospel.
ethics and morality: should these tags be merged? There's a lot of overlap between them.
saint: this tag gets a lot of different things in it. What about if we split it up, into hagiography for questions about past saints, and sainthood for questions about what it means to be a saint according to various denominations?
sexuality: this tag really covers too many different things. I'd suggest splitting into sexual-orientation, sex-acts, gender. Anything else in there?
Comment: @NigelJ there is a [tag:relationships] which is probably an ambiguous one.  One thing with tagging is that the tag not only has to be descriptive, it also has to be something we'd expect a visitor to think to write.
Comment: 2-3, I agree. 4 - I would rather see a comprehensive tag of 'human relationships' myself. As for 1 - I assume there are two real categories referring, firstly, to the four 'gospels' - as they are called - and, secondly, referring to 'the gospel' as the entire doctrine of Christ.
Comment: I've started working on these. It will take quite some time to retag everything!
Answer: I recommend preserving both ethics and morality, since although in some popular usage the terms are interchangeable, in a site like C.SE it's important enough to distinguish so we can classify questions better.  I edited the ethics so the difference is more obvious.
Reflecting academic literature in theology & philosophy, ethics is the creation of the standard while morality is the application of a particular situation to that standard.  In Christianity the standard is called Moral Theology or Christian Ethics.
To apply the meaning to the questions:

Questions which focus on application (where the standard is relatively clear, due to denominational scoping, for example) should be tagged morality.  If the question involves conscience or the parameters of the moral act, it is an indication of application.  Some recent ones are tagged appropriately already.
Questions which focus on standard such as changes in history, ambiguous Bible interpretation which causes different rules, comparison among denominations, influence of philosophy to moral theology, relation to virtues, comparison among thinkers, etc. should be tagged ethics.
What can be confusing is popular usage of right/wrong behavior in non-religious situations such as business ethics, medical ethics, etc.  In Christian theology parlance, the application actually IS morality proper, while deriving secular laws out of Christian doctrines can be called ethics (as in university course names "Business Ethics" and "Medical Ethics").

See Britannica article for further discussion on popular usage.
Comment: @curiousdannii Just by quick scan (without opening the question) around 90% that have "morality" should remain.  Around 80% that have "ethics" should remain.  A handful that have both need to have "ethics" dropped.  When it's borderline (needing both standard and situation), having both tags are ok.
Comment: How much do you think the current tags are following this distinction?
Comment: I think both tags excerpts should say both what they are, and also when to use the other tag instead. Do you want to try writing them?
Comment: @curiousdannii done.
Answer: I think questions like this:
Do Roman Catholics believe Saints are omnipresent?
asking about what saints do in heaven need the tag communion-of-saints
Comment: Why not [tag:sainthood] as well, as it's about what it means to be a "saint" in Catholicism?
Comment: I thought your definition for the sainthood tag was on the requirements of a person being recognized as a saint, not the duties of the office.
Comment: I was thinking any and all of that. Though questions about requirements would probably be better tagged as [tag:canonization].
Comment: oh, then yeah, I'm OK with [tag:sainthood] as a direct replacement for [tag:saint] and adding tags for what the question is actually about.  Do you think most Christians would have an understand of what [tag:communion-of-saints] is (even if they don't agree on what it means)?  I thought so since it was in the Nicene Creed that they would.
Comment: Yeah I think communion-of-saints is fine.
Answer: For gospel I think it would be a good idea to make the main tag good-news and have gospel, gospel-message as a synonym for it.   This'd disambiguate gospel-music which is a bummer nobody asks about.   I looked at the tags we use that start with "the-" and I think they're all likely to get replaced by tags that don't start with "the-"  (i.e. the-glory-by, the-lord-of-the-rings, the-beloved-disciple).  There are tags that probably should start with "the" like "pearl-of-great-price, but when used as a tag, probably ought to not have "the"
I would have thought someone would have addressed this by now; if tags should start with the word the, but I haven't found any advice on the metas. My assumption that this would be in the encyclopedia under "pearl-of-great-price, the".  I don't think we're want to change papacy to "the Papacy" or "Virgin Mary" to "The Virgin Mary" or as she is in the Catholic Encyclopedia "Mary, Blessed Virgin, The"
I dunno, blame St. Isidore of Seville, or pray for his intercession.
Comment: I just tested making a "the-gospel" tag, and the software didn't stop me. I do like "gospel-message" as another option for the main tag, more than "good-news" (though that could be a synonym).

Some tag change suggestions


What are the limits and asymptotes of $f(x)=x+\frac{1}{x}$?

Question: Given the function, $f:\mathbb{R} \setminus {\{0}\}\to\mathbb{R}$, $f(x)=x+\frac{1}{x}$.
Find the limits of $f$ at infinity(and negative infinity) and all asymptotes of $f$.
I don't know where I have to start. Really, I have no idea.
Comment: Please add your question to the post rather than only to the title.
Comment: I don't why downvote?
Answer: We can see where is the horizontal asymptote by doing $\lim\limits_{x\to \infty}x+\frac{1}{x}$ and $\lim\limits_{x\to -\infty}x+\frac{1}{x}$
The vertical asymptote is where $\frac{1}{x}=0$ and to the limits with that number. In this case, $\infty \text{ and }-\infty$.
And the oblique asymptotes are given by $f(x)=mx+n+\frac{1}{x}$. So the oblique asymptote in this case is $\\$ $y=x$.

So, the graph is
Comment: @Garmen1778 I'm not sure if you were implying that there was a horizontal asymptote or not, but in case there's any ambiguity, there are no horizontal asymptotes.
Answer: Try seeing the limit of the difference of this function and $f(x)=x$. Since $\dfrac{1}{x}\rightarrow 0$ when $x\rightarrow\pm\infty$, what can you tell since the limit of the difference is zero?


Silverlight projects on one IIS web site

Question: I have silverlight project and this project are deploying in IIS. But in solution I created two another SL projects with .Web projects. The problem that I cannot deploy these projects in web site (IIS). How I can do this? How I can do this xaps and dlls are visible for project?
In these two projects i have wcf services too.
Answer: if you have multiple web pages and each has their own silverlight xap, you can just set in IIS the default web page to be viewed then put a navigation of some sort in the webpage (links or redirects) so you view the other web pages.


What is difference between feed forward neural network and LSTM?

Question: What is the difference between feed-forward neural network and LSTM? How do they differ in their architecture?
Answer: A feed-forward neural network looks like this:
input -> hidden layer 1 -> hidden layer 2 -> ... -> hidden layer k -> output.
Each layer may have a different number of neurons, but that's the architecture.
An LSTM (long-short term memory cell) is a special kind of node within a neural network. It can be put into a feedforward neural network, and it usually is. When that happens, the feedforward neural network is referred to as an LSTM (confusingly!).
So how does an LSTM work? Have a look at my answer here: Forget Layer in a Recurrent Neural Network (RNN) -
tl;dr: an LSTM cell has three gates, each of which is used to modulate its input in some way: an input gate, a forget gate, and an output gate. It has a "memory" and an output that get modified by the gates. That is, within a single LSTM cell:
(input & previous cell state) ->  (input & forget gates) -> (update cell state)
(input & previous cell state & updated cell state) -> (output gate)
You can stack these cells in many different configurations. So there is no single "LSTM network" - rather a set of many possible architectures that can be built from these basic nodes.
Hope that gets you started!
Comment: Thanks a lot for your answer but can you add some images to improve my understanding of the architecture
Comment: Hello @codezcar, there are images of the LSTM in my answer that I linked. For a feedforward neural network, an image is here: https://medium.com/random-techpark/simple-feed-forward-neural-network-code-for-digital-handwritten-digit-recognition-a234955103d4

Yes, you can use backpropagation to find the optimal weights in any type of neural network (feed forward, LSTM, GRU, ...anything at all!).
Comment: What about back propogation in feed forward network does it occur in feed forward network
Answer: As mentioned by Philipp, networks with feedback loops helps in modeling time in the data.
You would want to look this for an overview of various NN architectures:
https://i.stack.imgur.com/LgmYv.png
Answer: Feed forward networks are networks where every node is connected with only nodes from the following layer. They don't have "circle" connections. Data can only travel from input to output without loops. Examples would be Simple Layer Perceptron or Multilayer Perceptrion. Convolutional Neural Networks also are purely feed forward networks
In opposition to that are recurrent neural networks. LSTM is one of those. These RNN can also be connected "sideways". Meaning that your data can travel not only forward into the next layer but also to other nodes in the same layer or backwards. From an architecture standpoint that means that although you have a network with maybe only one hidden layer, you get "deepness" by adding loops to nodes in that layer. Usually these represent "time" in the data.
This image shows what I mean by "deepness" through feedback loops: https://en.wikipedia.org/wiki/Recurrent_neural_network#/media/File:Recurrent_neural_network_unfold.svg
Although its technically one node in your layer architecture, it get's deeper and deeper the more loops you add
Answer: I want to discuss some high-level intuition behind LSTM networks. Here are some questions to help explore the why aspects:

Why/when would we use an LSTM over a feed forward neural network (FFNN)?
What are the pros and cons of LSTMs and how do they compare to FFNN?
How are they different from traditional recurrent neural networks (RNNs)?

Feed Forward Neural Networks (FFNN)
Let us first consider a standard FFNN with architecture:

As you probably know, this FFNN takes three inputs, processes them using the hidden layer, and produces two outputs. We can expand this architecture to incorporate more hidden layers, but the basic concept still holds: inputs come in, they are processed in one direction, and they are outputted at the end.
This concept is very well explained by other articles, so I will not go into much more detail. The key takeaway is:
The primary condition that separates FFNN from recurrent architectures is that the inputs to a neuron must come from the layer before that neuron.
FFNN Wikipedia
Recurrent Neural Networks (RNN)
Recurrent neural networks are mathematically quite similar to FFNN models. Their main difference is that the restriction placed on FFNN is no longer applied:
Inputs to a neuron can come from any other layer.

You will often see this architecture is often "rolled" into a recurrent unit such as the following:

The "rolled" units you might see in architecture diagrams can therefore be deceptively small. When you unroll them, the network will often be quite deep!
RNN Wikipedia
Long-Short Term Memory (LSTM)
LSTMs are a special type of RNN that are designed to tackle the vanishing/exploding gradient problem.
When you train a traditional RNN, the network often suffers from vanishing/exploding gradients: unrolling a recurrent unit results in a very deep network! If you go through the backpropagation algorithm using traditional RNN architectures, the earlier layers will become less and less significant as we propagate through the network. This makes traditional RNNs prone to forgetting information, particularly data that appears many timesteps prior to the current time.
An example LSTM cell is illustrated as such:

This structure is similar to the traditional RNN unrolled unit, but the key difference with the LSTM are the gates: input gate, output gate, and forget gate. The function of these gates are well described by their names:

input gate controls the data that enters the cell
forget gate controls the extent to which data stays within the cell
output gate controls the output of the cell via the activation function

This github IO post is a great introduction to the basics of LSTMs. It also does an amazing job of explaining the intuition behind the math of an LSTM.
LSTM Wikipedia
Properties and an Example Use Case of RNN
The feedback loops lend recurrent neural networks better to temporal challenges. Time is factored into their architecture!
Let us explore an example:
Perhaps you are using a network to predict the next word in a sentence. Say you are given the inputs:
Starving, Alice drives to the nearest store to buy [prediction]
A recurrent neural network might forget the first word "starving" whereas an LSTM would ideally propagate it. An LSTM would therefore use the context it heard previously in the sentence to guess "food" whereas an RNN might guess anything that is bought in a store, particularly given a long sentence or multiple sentences.
The gating mechanisms that allow this type of memory is explained well by @StatsSorceress here: Forget Layer in a Recurrent Neural Network (RNN) -
RNNs are designed to handle sequences. This can be used to analyze video (sequences of images), writing/speech (sequences of words), etc.
LSTMs are designed to let important information persist over time. RNNs will often "forget" over time.
FFNNs are memoryless systems; after processing some input, they forget everything about that input. Say, for example, we train an FFNN that takes 5 words as inputs and predicts the next output. This model would then receive the input from the above example:
the nearest store to buy [prediction].
This is clearly losing context, and we would get a poor result.
Now, you might ask, what if we made a FFNN that took many inputs so that it included the word "starving" in its inputs? In other words, could we not increase the number of inputs to an FFNN to sufficiently represent prior data?
The answer is yes, but this method is both inefficient and often impractical. Say, for example, we need to remember context an entire paragraph back. We would need a very large FFNN! Moreover, how do we know how many words back we want as context? Would 20 be sufficient? 30? 100? The LSTM architecture eliminates these problems entirely by letting the network manage a transient memory. This problem is exacerbated by video processing challenges because each frame will require significantly more inputs than NLP tasks.
Note, however, that LSTM units are inherently more computationally complex than units of a FFNN, so training them is often more difficult and takes more time. Despite these disadvantages, their success in temporal data challenges clearly warrants their use over FFNN.


Why can't the RSA algorithm be used for symmetric key infrastructures?

Question: If RSA is an encryption algorithm used to create an asymmetric key pair and digital signature, why can't it also be used to create a symmetric key?
Even if RSA is used to create public keys, why can't it be used to create symmetric keys?
Answer: As a matter of fact, you can create symmetric keys with RSA. The math behind RSA allows for it. But if this ever happens, it is a horrible mistake, and it's completely pointless to try doing this on purpose because nobody in his right mind would want to use RSA for symmetric encryption. It's way less efficient and nobody uses RSA to encrypt large amounts of data - usually you just use it to encrypt a random symmetric key or a hash (for signatures).
Basically textbook RSA works like this: generate two primes p and q, then determine an integer e < (p-1)(q-1) so that e has no common divisors with (p-1)(q-1).
Now determine the modular inverse d of e, meaning that (e*d) mod ((p-1)(q-1)) = 1
If you're very unlucky, you end up picking e, p and q so that e is it's own modular inverse. So you end up with e = d. If that happens, you have created a symmetric key.
This always happens sooner or later when you have people try and understand how RSA works by creating toy keys with very small numbers p and q (which means that you can do the math in your head, but also that RSA becomes trivially breakable). Consider for example p=5, q=7, e=11.
I'd think the chances of accidentally creating symmetric keys with full-size primes (e.g. at least 1024 bits long, and better twice that) are minuscule, and it would take an incredible amount of effort to produce one on purpose using a brute-force approach, which is another reason why nobody does it (Although there might be a way to choose p and q in a way that makes it easy to find a number that is it's own inverse - someone with a background in number theory might know how to do this if it's possible)
Answer: Leaving aside the very good points made by @Pascal, it should be pointed out that - when used properly - you generally can't create a single "key" that is symmetric in RSA (or any other asymmetric algorithm) because the whole point of such algorithms is that the key used for encryption cannot be used for decryption, and vice versa.
As a practical matter, you could generate key-pairs (with both public and private components) and treat that whole blob as a single "secret" (symmetric) key. The encrypt / verify operations would use one part of the blob, and the decrypt / sign operations would use the other part, but you could kind of pretend it would be a single key. This is a really, really silly idea, though. It completely misses the point of asymmetric crypto, and would have massive performance problems (asymmetric crypto is excruciatingly slow, both for using and generating the keys, if using secure key sizes).

It's also not even that secure. See, for example, the comparison of RSA (public) key modulus size and effective bits of security (which in any decent symmetric algorithm is just "the key size"; i.e. AES-128 uses 128-bit keys and would require 2^128 guesses to fully brute-force the key space) in this question.
One potential huge problem for RSA is if quantum computing ever gets going, because that will basically halve the effective bits entropy of most ciphers. For AES, that's no big deal; we can switch from AES-128 to AES-256 and still have 128 bits of effective security, which will still be completely implausible to brute-force for over a hundred years, even if Moore's Law continues apace. However, an RSA-2048 key (probably the most common size in use today) would drop to a piddling 56 bits of effective security - brute-forcible in a day as a private citizen, as of a few years ago - RSA-4096 (the longest RSA keys I've ever seen in the wild) would still be in trouble, and if we wanted the same effective security as AES-256 we'd need to go to RSA-15360. Leaving aside that this would make just the public key nearly 2KB long, it'd take an enormous amount of time to generate or use such keys.
Comment: I don't claim to understand the math behind it, but I believe Shor's algorithm does much more than halve the effective security of RSA.


Construct regular expression for language

Question: How to construct regular expression for language L which contain all words in which there is a letter 'a' and the letter 'b'?
Of course, I understand that it's easy problem but I just start to learn this science? Please, any advices and hints.
Comment: For such problems first you need to define the set of input alphabet or in simpler terms the set of symbols which can appear in your regular expression.
Comment: @ShubhamSinghrawat, for simplicity, let alphabet will be {a, b}.
Answer: Assuming that the input alphabet is $\Sigma = \{a,b\}$, the term $(a|b)^*a(a|b)^*b(a|b)^*$ describes all words where there is an $a$ followed by a $b$, and the term $(a|b)^*b(a|b)^*a(a|b)^*$ describes all words where there is a $b$ followed by an $a$. If we combine both, we get
$$
((a|b)^*a(a|b)^*b(a|b)^*)|((a|b)^*b(a|b)^*a(a|b)^*)
$$
which describes the set of all words in which at least one $a$ and one $b$ occurs.
Edit: An even shorter solution would be
$$
(a|b)^*(ab|ba)(a|b)^*.
$$
However, this solution requires the alphabet to contain exactly $a$ and $b$ whereas the first solution can easily be extended to arbitrary alphabets.
Comment: yes, I had similar idea. But now, I need to prove that this regular expression actually describe out language.
Could you write little plan how to prove this statement in both directions?
Answer: For $ \Sigma =   \big\{ a,b \big\} $, all words containing letter $a$ and letter $b$ may be, in my view, expressed as follows:
$$ R = (a + b)^*a(a + b)^*b(a + b)^* + (a + b)^*b(a + b)^*a(a + b)^* $$
can be reduced to:
$$ R = (a + b)^*\big[ a(a + b)^*b + b(a + b)^*a \big](a + b)^* $$
Graphically:

Now: $$\Sigma ^* = \big\{ ab, ba, aab, aaab, babaa, bab, ... \big\}$$

This means any number of letters $a$ and/or $b$ before and after $a$ letter, followed by letter $b$ followed by any number of letters $a$ and/or $b$ or($a$,  $b$) in the reverse order, ie. any number of letters $a$ and/or $b$ before and after the letter $b$, followed by a letter $a$ followed by any number of letters $a$ and/or $b$.
Answer: If you want to construct regular expression not only for this language that you mentioned also for every other regular language you can simply build NFA, usually building NFA is simple after that you can convert NFA to DFA by power set construction algorithm, in this algorithm you create DFA that all of its states are subset of states in NFA for exmple if statest of NFA are
$x_1,\cdots,x_k$
then you have $2^k$ state in DFA
and design new transition function such that state $\{q_1,\cdots ,q_n\}$ goes to state $\{p_1, \cdots ,p_m\} $ with $a \in \Sigma$ if from $q_1 , \cdots , q_n$ you can go to $p_1, \cdots, p_n$ with character $a$. after that, you can use an algorithm to convert DFA to RE which is discussed in Micheal Sipser's book.
Comment: You can also convert NFAs to regular expressions directly.


Can I travel to the USA with an ESTA while my OPT application is pending?

Question: I from Austria and studied in the USA for a while. After graduating I applied for post-completion Optional Practical Training authorization (OPT). However, this is where my problem starts. I had to leave the country right afterwards. I know that this was not a good idea but I had to have surgery in my home country. Besides I had no place to stay in the USA and no money and obviously I was not allowed to work. My OPT application is now being processed. I wonder if can I reenter the USA with an ESTA before I get my EAD card for the OPT?
Answer: If you enter the USA on any status other that your F-1 student visa (such as your ESTA), there is a high chance that your SEVIS record and F-1 student status will be terminated. This will prevent you from being able to work on your OPT once it is approved.
The most simple next step is to wait until your OPT is approved and have your university or a trusted friend mail your new EAD to you in Austria. If you are unable to wait in Austria, you should contact the international student center of your school/university to get their advice on entering the US after your program completion date while you are still waiting to receive your EAD.
Comment: @Iris: There is no law prohibiting you from asking a friend to mail the EAD to you in Austria. If you EAD is being mailed to your university, your university may have a policy against releasing your EAD to any person other than yourself. I have just had my own EAD mailed to me outside the US by my US university. In any case, talk to your university about your situation – they sponsored your original F-1 visa and it is their responsibility to help you to maintain compliance with the regulations while you are under their sponsorship.
Comment: thank you so much for your answer! I was also thinking to have a friend mail me the documents to me but I was told that sending documents isnt allowed. I'd have to look into that.
Comment: may I ask where it was send to you? Unfortunately my university is not the one receiving my EAD card. I'm just worried that if a friend sends it they will open the letter up at customs here in Austria. But I'll contact my university again asking if they can mail it to me...


Does the Quran contain the word peace?

Question: What is the arabic word or words that translate to peace? Are they present in the Quran? How many times do they appear in the Quran?
Comment: Salam is the word of peace. It does contain it. But I would also like to add that it wouldn't be accurate to count how many times the word peace is used but rather one should look for words or sentences meaning peace. It doesn't have to be in that word itself.  For instance see the verse about;  "Repel [evil] by that [deed] which is better; and thereupon the one whom between you and him is enmity [will become] as though he was a devoted friend." in 41:34 or other like
Answer: The word for peace in Arabic is سلام = salam (as in the common greeting "asalamu alaykum" = "peace be upon you").
Actually, as-Salam is one of the 99 names of Allah (although it doesn't translate well into English):

هُوَ اللَّهُ الَّذِي لَا إِلَٰهَ إِلَّا هُوَ الْمَلِكُ الْقُدُّوسُ السَّلَامُ الْمُؤْمِنُ الْمُهَيْمِنُ الْعَزِيزُ الْجَبَّارُ الْمُتَكَبِّرُ سُبْحَانَ اللَّهِ عَمَّا يُشْرِكُونَ
He is Allah, other than whom there is no deity, the Sovereign, the Pure, the Perfection, the Bestower of Faith, the Overseer, the Exalted in Might, the Compeller, the Superior. Exalted is Allah above whatever they associate with Him. -- Qur'an 59:23 and other translations

Salam occurs multiple times in different forms in the Qur'an; some random examples are:

وَبَيْنَهُمَا حِجَابٌ وَعَلَى الْأَعْرَافِ رِجَالٌ يَعْرِفُونَ كُلًّا بِسِيمَاهُمْ وَنَادَوْا أَصْحَابَ الْجَنَّةِ أَن  سَلَامٌ عَلَيْكُمْ لَمْ يَدْخُلُوهَا وَهُمْ يَطْمَعُونَ
And between them will be a partition, and on [its] elevations are men who recognize all by their mark. And they call out to the companions of Paradise, "Peace be upon you." They have not [yet] entered it, but they long intensely. -- Qur'an 7:46
وَلَقَدْ جَاءَتْ رُسُلُنَا إِبْرَاهِيمَ بِالْبُشْرَىٰ قَالُوا سَلَامًا قَالَ سَلَامٌ فَمَا لَبِثَ أَن جَاءَ بِعِجْلٍ حَنِيذٍ
And certainly did Our messengers come to Abraham with good tidings; they said, "Peace." He said, "Peace," and did not delay in bringing [them] a roasted calf. -- Qur'an 11:69
قَالَ سَلَامٌ عَلَيْكَ سَأَسْتَغْفِرُ لَكَ رَبِّي إِنَّهُ كَانَ بِي حَفِيًّا
[Abraham] said, "Peace will be upon you. I will ask forgiveness for you of my Lord. Indeed, He is ever gracious to me. -- Qur'an 19:47
إِلَّا قِيلًا سَلَامًا سَلَامًا
Only a saying: "Peace, peace." -- Qur'an 56:26

Other examples are 37:79, 37:120, 43:82, 50:34, 51:25.
Enumeration is difficult as both English and Arabic are nuanced.  Understand Islam discusses the enumeration:

Salaam comes from the root seen-laam-meem, which points to three main meanings. The first main meaning is to be peaceful, content, and tranquil. The second is to be free from imperfections, and the third main meaning is to be safe, secure, and well.
This root appears 140 times in the Quran in 16 derived forms. Examples of these forms are aslama ("submits"), salaamun ("peace"), saleemin ("sound"), al-islaami ("Islam") and al-muslimeen ("the Muslims").

However, there's no consistent way of defining when a word is best translated as "peace" or another word.  For example "make peace" vs. "make settlement" in Qur'an 49:9.  (Another example is Qur'an 13:28.)

Does the Quran contain the word peace?


Steps for back propagation of convolutional layer in CNN

Question: Imagine I have the following layers in a CNN:
Conv-layer 1 (without reLU) [3 filters @ 1x3x3] =>
ReLU-layer 1 =>
Maxpooling-layer 1 [2x2]
Conv-layer 2 (without reLU) [10 filters @ 3x4x4] =>
ReLU-layer 2 =>
Maxpooling-layer 2 [2x2]
What I know is that, when "deriving" the Maxpooling-layer, the maximum value of that pooling has the value of 1 (because that value is the only one that is affecting the result of the CNN), and the other values take the value of 0.
After this step, I have the reLU-layer, where the derivative of the reLU-layer is 0 when x <= 0, and 1 when x > 0.
And in the last step, I have the Conv-layer, but I don't know how to calculate the derivative. How do I calculate the whole delta for that specific weight?
If there is a way to calculate the gradients of those weights using matrix notation, please let me know.
Notation
The matrix notation that I use is the following: [number of filters - depth - rows - columns]. For example, when I say [3 filters - 1 x 3 x 3] I mean that I have 3 filters with depth 1, 3 rows and 3 columns (depth is "equivalent" to "channels").
Steps in Conv layer, using my notation
Imagine I have an input X with shape [depth:1, rows: 28, columns: 28]
Then, I have the conv-layer, where I have 3 filters (you can call the filter as W) with shape [depth:1, rows:3, columns:3]
So, what I do is, using 1 filter a time, convolve input X , so the resulting matrix has the following shape => [depth:1, rows: 26, columns: 26] (this is the result of convolving 1 filter). So, when I do the convolution using the 3 filters, the resulting matrix is shaped [depth:3, rows: 26, columns: 26].
After this, I apply ReLU to each value of the resulting matrix (the 3x26x26 matrix), and then apply non-overlapping maxpooling with a window of 2 rows x 2 columns.
Answer: Extra Note: The matrix notation that I use is the following: [number of filters - depth - rows - columns]. For example, when I say [3 filters - 1 x 3 x 3] I mean that I have 3 filters with depth 1, 3 rows and 3 columns (depth is "equivalent" to "channels").
Steps in Conv layer:
Imagine I have an input X with shape [depth:1, rows: 28, columns: 28]
Then, I have the conv-layer, where I have 3 filters (you can call the filter as W) with shape [depth:1, rows:3, columns:3]
So, what I do is, using 1 filter a time, convolve input X , so the resulting matrix has the following shape => [depth:1, rows: 26, columns: 26] (this is the result of convolving 1 filter). So, when I do the convolution using the 3 filters, the resulting matrix is shaped [depth:3, rows: 26, columns: 26].
After this, I apply ReLU to each value of the resulting matrix (the 3x26x26 matrix), and then apply non-overlapping maxpooling with a window o 2 rows x 2 columns.
If there is any doubt of what I explained, please comment me.
Note: I'm editing my own answer beacuse I don't have 50 reputation for doing comments.
Comment: I know, the problem occured when I wrote the question and asked it as a guest, and not when logged in :( I was trying to edit the question but I can't
Comment: Now I have transferred this into the question, the site can delete your "answer" here. When I ask for this to happen, there might be an automated comment explaining the rule that is being applied.


Can Bitcoin and Bitcoin Cash potentially have the same address?

Question: Because Bitcoin Cash is forked from Bitcoin, what happens if two separate users create a wallet, could their address potentially be the same? Let's call that address xyz. Then if someone sends money to xyz which blockchain would it go to?
Answer: Sure.
Addresses are not really a thing as far as blockchains go - they mostly just care about the keys involved (or in the case of Bitcoin and Bitcoin based networks, the locking script which locks an output to be spendable only by a certain [set of] key[s]).
Since the key generation process relies on entropy, and does not rely on the network you are creating the key for, it is possible, and highly improbable, that two people are able to generate an identical key.
It is so improbable that no wallet I'm aware of actually checks for key reuse on the target chain. It's simply something that is not likely to occur, provided you have a good enough source of entropy.
Note that even if you do end up generating (or manually copying) a key across networks, the actual "address" may still be different, since Bitcoin uses base58/bech32 addresses, while BCH uses base58/cashaddr addresses. This is merely an encoding, however, and does not change the underlying key required to spend the outputs.
Comment: You wouldn't want to check for key reuse, as that's how you'd restore a wallet. Also, post-fork, it's how you'd get your coin from the new chain.


Who was Brahma before the Brahma we have now? Who will be the next Brahma(Hanuman ji?)

Question: Brahma is a post and not a person. So who was the Braham earlier and will Hanuman ji be the next Brahma?
After how long would he be the next Brahma?
Answer:
Brahma is a post and not a person.

Well, If Lord Brahma is not a deity and just a post then you can find many such statements about Vishnu, Rudra, etc also scriptures. To name some example.:
Sri Shiva Purana 18.104.22.168.:

Satī is the beloved of Śiva by meditating upon whose lotus-like feet for ever and by worshipping which Viṣṇu attained his Viṣṇu-hood.

Satī is the beloved of Śiva, by meditating upon whose lotus-like feet for ever and by worshipping which, Brahmā attained his Brahmā-hood.

Śiva is the lord, by meditating upon whose lotuslike feet for ever and by worshipping which the guardians of quarters—Indra and others attained their respective positions.

Sri Shiva Purana 220.127.116.11.:

kings, Siddhas, Yakṣas and Gandharvas, Rākṣasas, Bhūtas and Pisacas, besides other acheived their respective positions by adoring Śiva. All the gods achieved god-hoods, with the same process. Brahma achieved Brahmattva, Visņu achieved the position of Vişņu, Rudra got Rudratva, and Indra got the position of Indra. Gaṇeśa was bestowed Gaṇeśahood with the same process. Bathing Siva-linga with the white sandal paste it should be adored with the white lotus flowers. The salutation should be offered thereafter.

Mahābhārat — Anūśāsan Parva- Chapter —18 , Verse-64.:

Vasudeva said., "...If Rudra be gratified with a person, he can confer upon him the states of eIther Brahma or of Kesava or of Sakra with all the deities under him, or the sovereignty of the three worlds.

Sri Bhavisya Purana 2.1.10.:

51-56. Planting only two Dhataki trees from thousands of mango trees is said to be the best, similarly one Patal tree is said to be the best from thousands of Pataki. One Raktabat from hundreds of Patals, five trees of Nagkeshar from two thousand Badhi, Shrivriksha and Jamun trees are said to be better than that, and three Tendu, five Jamun, Kadamba Arjun and three coconut trees are said to be the best. They must be planted, what kind of strength that pious soul gets by planting such trees, (I am telling). By planting these many types of trees, he gets the enjoyment of heaven for a thousand crores of kalpas, and a hundred crores of kalpas. The sins of the three births are destroyed and heaven is attained soon, so by planting hundred trees, one has been told to attain Brahmahood and thousand to attain Vishnuhood respectively.

Atharvashika Upanishad 2:1.:

"The pranava (the sound of Om) makes all the souls to bow before it. It is the one and only one which has to be meditated upon as the four Vedas and the birth place of all devas. One who meditates like that goes away from all sorrows and fears and gets the power to protect all others who approach him. It is because of this meditation only that Lord Vishnu who is spread every where, wins over all others. It is because Lord Brahma controlled all his organs and meditated upon it, he attained the position of the creator. Even Lord Vishnu , parks his mind in the sound (Om) of the place of Paramathma (ultimate soul) and meditates upon Îsâna. , who is most proper to be worshipped. All this is only proper in case of Îsâna. ".

So, By this logic, every Saguna deity is a Post.

So who was the Braham earlier.

Sri Skanda Purana 18.104.22.168.:

Lord Shiva Said -

When the sixth one well-known (by the name) Hemagarbha became Brahmā, the Lord was glorified as Bhairavanātha.

The present Brahmā is remembered as Śatānanda and the name of the Lord now is Somanātha.

Hereafter when the future Brahmā will be known as Caturvaktra, the name of the Lord shall be Prāṇanātha.

Sri Skanda Purana mentions the name of the 6 previous Brahmas, the present and the future one also. The names are as follows.: Viriñci, Padmabhū, Svayaṃbhū, Parameṣṭhin, Hemagarbha (Hiranyagarbha), Śatānanda and the future one will be Caturvaktra.

will Hanuman ji be the next Brahma? After how long would he be the next Brahma?

As mentioned in this answer.
Uttara Kāṇḍa, chapter 36.:

Mahaṛṣi Agastya said to Śrī Rāma:
Hanumāna rivals the preceptor of devas (i.e., Brihaspati) himself, in all branches of learning and austerities. He is well versed in 'the Nine-Grammars' (i.e., Nava-Vyākaraṇa-Vettā'), and by your grace he will become the next Brahmā.

So, Lord Hanuman will become Next Lord Brahma and life time of a Brahma is 1 Maha Kalpa.

But, some Contradictions.:

Skanda Purana already mentions, the Next Brahma will be Chaturvaktra then How Hanuman can be next Brahma.?

-> Well, some can say that, Chatur Vaktra means the 4 faced one. So, Hanuman will have 3 more faces. As, he already gave 5 face in his Pancha Mukhi form.

But, Mahabharata clearly mentions that all the 6 previous Brahmas are actually the same Brahma reborning again and again then the 8th Beahma should also be the same Brahma then how.?

The Mahabharata, Book 12.: Santi Parva.: Section CCCXLVIII.:

As regards myself (Brahma), I have sprung through thy (Narayana's) Grace. From thee have I derived my birth. My first birth from thee, which is regarded sacred by all regenerate persons, was due to a fiat of thy Mind. My second birth in days of yore was from thy eyes. Through thy Grace, my third birth was from thy speech. My fourth birth. O puissant Lord, was from thy ears. My fifth birth, excellent in all respects, was from thy nose. O Lord, My sixth birth was, through thee, from an egg. This is my seventh birth. It has occurred, O Lord, within this Lotus, and it is meant to stimulate the intellect and desires of all the beings. At each Creation I take birth from thee as thy son, O thou that art divested of the three attributes. Indeed, O lotus-eyed one, I take birth as thy eldest son, made up of Sattwa the foremost of three attributes.

So, from the above verse it's totally clear that it's the same Lord Brahma only who reappears again and again.
Then, What about Lord Hanuman.?
Sri Shiva Gita Chapter 11.:

21-26.: Subsequently based on the Karma of the Jiva, female, male or eunuch bodies are obtained. Now I would explain the path of reaching higher abodes (gati) for the Jiva. Listen! One who possesses peaceful nature etc. good qualities , remains inclined towards the scriptures and righteousness, he is taken away till Brahma loka in celestial plane. With divine splendor, he becomes Devapurusha, and stays during Suklapaksham, Uttarayanam. First attains to the abodes of Sun and moon, then atains to Vidyullokam, after that a celestial deity comes descends from Brahma loka to Vidyulloka (IndraLoka) and takes the Jiva to Brahma loka.In the abode of Brahma with the celestial body the Jiva enjoys all his desires for a long time. After staying there for a long period he gets moksha along with Brahma (viz gets absorbed into Sadā Siva by getting Kaivalyam Moksham).
27-29.:Only that Brahmajnani remains one with Brahman as like as salt melts in water. As like as one can recall the dreams after waking up, a Brahmajnani also can recall everything similarly. For a Jiva who is devoid of Vidya (wisdom) and Karma third place is given which is Hell. Such a Jiva experiences extreme torture in Hells named raurava and similar ones and with the leftover Karma he gains birth as a heinous creature like flies, mosquitoes etc. on earth. this is about the Jiva Gati topic.

Conclusion.: So, basically what happens is that due to their Karma they goes to different different lokas having the same form of that deity (Swarupa Moksha same as Mahabali will be next Indra) and atlast goes to Brahma Loka and stays there till 1 Maha Kalpa and then gets Moksha. While the original Lord Brahma restarts his next cycle as 8th, 9th, etc Brahma.
I hope this clarifies all your queries. Prd..
Comment: I fixed the Reference. Actually, it's from Shiva Purana 188.8.131.52.
Comment: I am unable to trace the Matsyapurara quote. Would you mind sharing a link for the said verse?
Comment: *have..........


Smallest planet that can maintain plate tectonics?

Question: I was wondering what is the smallest a terrestrial planet can be and maintain plate tectonics and generate a magnetic field, atleast to Earth's current age?
Comment: But Io is a moon not a planet, If Io was a planet I doubt it would have any volcanoes or tectonics at Earth's age. The volcanoes of Io are caused by tidal heating from Jupiter.
Comment: Io (https://en.wikipedia.org/wiki/Io_(moon)#Mountains) may be tectonically active. It is about the size of Luna.
Comment: I am not qualified to answer, but I would suggest reading Peter Ward's [Rare Earth](https://www.amazon.com/Rare-Earth-Complex-Uncommon-Universe/dp/0387952896) as a starting point. There's a whole chapter on "The Surprising Importance of Plate Tectonics" that I believe you'd find very informative.
Comment: A tidally locked planet orbiting close to a red dwarf or other small star could maintain internal heat through tidal heating, maintaining a molten core and magnetic field for a fairly small planet. (Think Luna, Io, or smaller.)
Comment: Red dwarf stars range from the smallest stars to 0.5 Solar masses, for a planet that is Mars sized maybe give me an example I mean like distance from the star if we use a 0.3 mass red dwarf as the host star. Red dwarf stars also violently flare up which can erode an atmosphere, the magnetic field should be atleast as strong as the Earth's.
Answer: I have been browsing a few references on the subject and the parameters that are involved seem more numerous than just the size or mass of the planetary body.
Examples in the Solar System are already contradictory with the mass parameter: while Mercury has a magnetic field (around 1% of Earth's, i.e 300 nT on the surface at equator, vs. 30 µT on Earth surface - those values are order of magnitude and vary from place to place), Venus has so to speak no inner magnetic field, all of its measured magnetic field likely coming from its ionosphere.
Basically, the required conditions for a planet to have a magnetic field are a conductive liquid core layer, along with rotation and convective motions of that liquid layer. These convective motions are due to a cooling solid inner core. I did not find quantitative values regarding the minimum mass for such effects to appear, but Mars likely was around the limit, as its core likely cooled to the point where no convection exists anymore, either because its liquid core froze or its solid core is not hot enough to maintain the convectional motions.
Studies tend to show that cataclysmic events such as planetary impacts may be benefactory for plate tectonics to begin, as they would weaker the uper layers of the planet. However, I also found studies that suggest impacts may cripple the dynamo effect, i.e. the magnetic field... As well as studies hinting the contrary, which really tends to show that no conclusion can really be drawn at the moment without further data.
Sadly, due to the very few known exoplanets that have a lower mass than Earth, research regarding magnetic fields mainly address heavier planetary bodies. Factors that are usually taken into account are the temperature distribution along the planetary layers, the mass properties, the materials properties, the heat sources, incuding radioactive decay, and the presence of water, which is supposed to weaken the upper layers.
This being said, this research for example has made computation for planetary objects being 0.1 and 0.5 Earth mass. They tend to indicate that 0.1 Earth mass planets would be very unlikely to present with plates tectonics at all; 0.5 Earth mass would strongly depend on material properties, 1 Earth mass would be most likely to present with plates tectonics, while the probability decreases again as mass increases.
In conclusion, it seems that Earth is optimal regarding these factors, or maybe we lack other points of data and even a better understanding of what really is happening deep below our own feet. Objects smaller than Earth may have plates tectonics and a magnetic field, but not objects much smaller.
Answer: Plates move around because of convection in the mantle underneath them. That basically means they are floating on currents in the mantle. The mantle is liquid, though very very viscous, so as it flows hither and yon as it is heated by the core it rises then flows along the under surface of the crust then cools and sinks. There is friction between the bottom of the plate and the surface of the mantle (the asthenosphere). This is called basal drag. There are alternate theories that it is mantle plumes that are doing the moving (still transferred to the plates through basal drag) not convection current.
So theoretically, you need a hot core with a liquid mantle differentiated from the core to have plate tectonics. Well that includes just all the large objects in the solar system. Venus, Mars, Mercury, Ganymede, Titan, Callisto, Io, Luna, and Europa should all be large enough to have differentiated silicate mantle above a metallic core. Obviously, since we know very little about the mantle and core that we are standing on, we know even less about the interiors of these distant objects.
On the other hand, we haven't OBSERVED plate tectonics at work for sure on any of the other planets.

Venus shows tectonic activity but not plate tectonics. Possible reasons include lack of water or higher viscosity of the Venusian mantle.
Mars had plate tectonics early in its history that stopped, possibly due to cooling of the planet. Some recent evidence suggests it may have partial plates today, especially around on Tharsis Rise.
Mercury and Luna's plate tectonics ceased 3.7 and 3 billion years ago, respectively.
Io has lots of volcanoes and is heated from tidal stretching from Jupiter, but does not have plate tectonics.
Europa has a structure fundamentally different from earth, since it has an ocean deeper than our crust. The ice sheets on the surface thus act like our crust, sliding over a liquid ocean instead of a mantle. Given that water is much less viscous than molten rock, it is no surprise that Europa is suspected to have plate tectonics.
Ganymede is kind of in the same boat as the Europa, and some think that has the same ice plates over ocean thing going on...or that it used to in the past.
Callisto always gets ignored, and I can't find anything about it. I'm the third biggest moon, why do you ignore me. Just because I don't have volcanoes, oceans, or atmosphere. Sad Face :(
Titan may have a huge ocean like Europa and Ganymede, but I can't find anyone who thinks that this causes plate tectonics.

On to magnetic fields. This one is easier to summarize:

Venus's magnetic field is induced by interaction between atmosphere and solar wind, not due to its core, and is thus weak. Venus's slow rotation may prevent its core from making a field.
Mars may have had an internal dynamo in the past, but no longer.
Mercury does have a magnetic field due to its hot core.
Ganymede does have a self-generated field, in addition to the induced field from Jupiter due to its subsurface ocean. The self-generated field is probably generated the same way as Earth's, which makes you wonder what Ganymede is doing that Mars and Venus aren't.
Titan and Europa have induced magnetic fields from their salty oceans. Ganymede does too, in addition to its self-generated field. Callisto is so ignored that we'll dump it in this category too.
Luna has a very weak magnetic field, and what is there might be caused by magnetization of moon rocks during large impact events.

Conclusions:

Earth has both for sure
Objects as small as the Moon may have had plate tectonics in the past
Objects as small as Ganymede have magnetic fields to this day, for mysterious reasons.
A different sort of ice tectonics/induced magnetic field is possible on cold moons/planets with huge salty oceans, down to the size of Europa.
Lithospheric plate tectonics might have something to do with viscosity of the mantle, in which case a hotter mantle is better.
The way to preserve tectonics in a smaller body is to have tidal heating of a moon to keep the mantle nice and hot. Of course, that isn't working for Io, so I guess no one knows.

So there you go, the answer is that there is no answer :)
Answer: According to NASA, the smallest planet they have discovered that functions like a planet, Tectonic plates, volcanoes etc is roughly the size of our moon.
That's not to say there can't be smaller planets out there as such, though in this instance, the smallest recorded so far is Kepler 37-b
As quoted from an article:

A team of Danish astrophysicists has now made what may well be a sensational discovery. They have found the smallest planet that has ever been observed in orbit around a star other than our Sun.
With a radius of only 0.3 times that of the Earth, the planet orbits its host star once every 13 days.

Sadly however, it also states that due to the planet being so small, it cannot create enough gravity to maintain a sustainable atmosphere, meaning it wouldn't be able to harbour human life without machines, or terraformers etc.
Sources -  Here and Here Give a better understanding of the planets, so doing some background research yourself to gain a full understanding would be best if you wish to delve deeper.
The planet isn't known to have a magnetic field, though it is assumed so.
it could be considered terrestrial, though it's a far stretch. In terms of fiction, you could make the planet however small you wanted it.
Comment: I don't think you can make any assumptions about magnetic fields or plate tectonics about a the smallest planet discovered around a distant star. We just don't know that much about it.
Comment: What article is this quote from?
Comment: It's the best we can aim for, considering that the closest we have that has tectonics is mars, which was only discovered recently, the best we can do is 'guess' unless mars was an answer that was wanted.
Comment: [This one](http://sciencenordic.com/nasa-spots-smallest-planet-ever).

There are also other articles such as [this](http://www.nasa.gov/mission_pages/kepler/news/kepler-37b.html) which give more detail.
Comment: @ObviouslyJake please edit these links directly into your answer :)


What should inside of a brick chimney look like?

Question: I want to clean my own chimney and I have never owned a house with one. Now I do and winter is coming. I want to know that it is done right and will be safe. I took a short video using my phone. I can see daylight about 20-25 feet I am guessing. The inside appears to be round and without obstructions. I just want some opinions on this subject. I called a chimney sweep and he is booking out to Oct. 2017. I don't want to wait that long to pay who knows how much if I can do it myself. Any ideas home improvers???
Comment: In the USA, NFPA 211 is a popular safety standard related to chimneys, including the requirement that a masonry chimney have a "liner" if it is to be used for exhausting smoke from a solid-fuel fire. The liner may be stainless steel or terra cotta, among other things.
Answer: The chimney should be uniform no chunks missing. Cleaning with a brush is not difficult but if it has not been inspected by someone that knows what to look for you can be taking risks.  My current home passed inspection when I purchased it and the chimney was not lined with fire brick just flat field rock cemented together. Needless to say it was a huge fire risk and I have removed it. If you need to use it prior to a proper inspection get a chimney brush and extension poles open the damper and close off the opening with a tight fitting card board or something to prevent the falling debris to cover the inside of your home. scrub the soot and cresode use a high quality flashlight and look for missing chunks. Now the fun part cleaning the debris off the top of the damper. We used industrial vacuums with hepa filters to suck up the soot and cresode if you just have a shop vac you might try to find some better filters for it or have it outside the home because the fine soot will make a huge mess with a standard filter. Once the soot and chunks of cresode are cleaned up make sure the damper will close and open with several cycles (occasionally chunks will get stuck and prevent the damper from operating correctly). Same process for a wood burning stove inserts but there should be a pipe (much easier to clean and inspect) make sure to get the correct size brush for a stove and the job can be done in a few minutes once the cap is pulled.
Answer: Spend the money to hire a licensed chimney sweep/inspector. If it costs extra for the inspection, pay it.
Once you have someone who knows what they are doing look it over and make sure it's not going to burn your house down, then you can futz around with cleaning it yourself. But even a couple hundred bucks to get it inspected is nothing compared to even a small chimney fire.


EV Car's battery voltage and charging with solar panel

Question: How much is the voltage of electric car's batteries?
I was thinking about a DIY electric van (Mercedes Sprinter) with 3x200 watts solar panels on the roof. I'm not sure but let's say the EV batteries are 460 volts and solar panels are are there any inverters or battery charges that can charge 460 volts battery with 18-20 volts?
Answer: What really matters is the energy capacity of the batteries measured in kWh. The base Nissan Leaf has a 30 kWh battery.
With 3 x 200 W solar panels in optimum orientation and illumination would generate 0.6 kW. With 100% output and 100% inverter efficiency (both of which are impossible) you would charge the battery in 30 / 0.6 = 50 hours of continuous sunlight. Of course, since the Earth rotates this will take at least 100 hours.
Comment: I recently spoke with a power engineer for PGE (local power company) who has owned two Nissan Leaf cars in succession. He keeps detailed records, of course. He told me he gets an average of 4.1 miles/kWh in his most recent Leaf. (Almost exactly the average I'm getting with the 2018 Toyota Prius Plug-In Hybrid I own.) Assuming the equivalent of 600 watts at the equator at noon and 100% efficiency charging could both be sustained continuously, this translates into moving less than 2.5 miles per hour. (Earth's rotation on daily insolation expectation may differ from the equator, of course.)