Why is it a good idea to study a ring by studying its modules?

Question: This is related to another question of mine.  Suppose you met someone who was well-acquainted with the basic properties of rings, but who had never heard of a module.  You tell him that modules generalize ideals and quotients, but he remains unimpressed.  How do you convince him that studying modules of a ring is a good way to understand that ring?  (In other words, why does one have to work "external" to the ring?)  Your answer should also explain why it is a good idea to study a group by studying its representations.
Comment: To explain the usefulness of modules, claiming it helps to understand the ring does not strike me as the right *initial* rationale. For example, is the main use of real vector spaces to give you insights into the real numbers? Nope. Similarly, I think a better motivation for caring about modules is to point out that they're the setting for linear algebra over a ring. Then illustrate *why* the module-over-a-ring viewpoint is useful in examples tailored to the other person's background (e.g., canonical forms for linear operators via modules over F[x], analogous to f.g. abelian groups).
Comment: How do you tell if a person is good or bad? Well, one way is to look at how that person interacts with friends!
Comment: Not always: some people are lovely to their friends but absolutely terrible people in general!
Answer: In short, I'd tell your friend:  "If you believe a ring can be understood geometrically as functions its spectrum, then modules help you by providing more functions with which to measure and characterize its spectrum."
Elements of a module over a ring $R$ are like generalized functions on $Spec(R)$.  We can talk about the support of a module element, or its vanishing set.  More concretely, think of how global sections of a line bundle can act as functions you can use to define map into projective space.
When you glue together a module on open sets of a spectrum or a scheme, you get to glue using maps which are module isomorphisms, which are more flexible than the ring isomorphisms required to glue together a scheme.  Borrowing intuition from smooth manifold land, the twist in the Moebius band (as a line bundle on the circle) is formed by gluing a copy of the reals to itself via multiplication by $-1$, a module map, not a ring map.  This allows us to think of functions like $\cos(\theta/2)$ as being globally defined: as a map to the Moebius band.
In the same vein, when you have a representation $V$ of a group $G$, each element $v\in V$ gives you a nice evaluation map from $G$ into $V$, so lurking everywhere we've got these morphisms from our object of interest into a known object, which are nicely related to each other via the group laws.  A fortiori, this certainly doesn't capture the full utility of group representations, but a priori I think it's a decent justification.
Answer: I want to answer your question twice: first with a "top-down" approach and second with a "bottom-up" approach.  Let me limit myself to the first answer here and see how I do.
I claim the following analogy:
abstract groups : group actions on sets :: abstract rings : linear actions of rings on
abelian groups (= modules)
I will take it as mostly self-evident that it is desirable to study groups acting on sets.  If you are not doing this -- but thinking of groups only as sets with a certain law of composition -- then you are thinking about groups "in the wrong way".  You are missing out not only on powerful tools for studying abstract groups (e.g. the Monster was constructed as the automorphism group of a certain algebra), but also, even more importantly, on why groups are important and interesting to mathematics: they come up as automorphisms of things, not (or rather, rarely) abstractly.
The way to think about a group action is that you have a set S, and it has an automorphism group, Sym(S), the group of all bijections from S to itself.  Then an action of G on S is simply a homomorphism of groups G -> Sym(S).  More generally, if x is any object in a category C, then it has an automorphism group Aut(x), and one can think of a homomorphism from an abstract group G to Aut(x) as a group action on x.
Now in place of a set, we take an abelian group M.  This has more structure -- apart from a group Aut(M) of Z-linear automorphsims, it also has an endomorphism ring End(M): the ring of Z-linear maps from M to itself.  Note that End(M) is in general noncommutative, so this construction is more general than any "ring of functions" construction in (commutative!) algebraic geometry.
So given a ring R, the analogy is completed by considering ring homomorphisms R -> End(M).  As for rings, this provides a bridge between the abstract notion of a ring and the "real world" notion of endomorphisms of an abelian group.  Moreover, just as the notion of a symmetry group of a set generalizes to that of an automorphism group of an object in a category, similarly, any object x in an abelian category C has an endomorphism ring, and hence one can consider "ring actions" of an abstract ring R on x, via homomorphisms R -> End(x).
In the first part of the analogy, a distinguished role is played by the category of [left, or right] G-sets for a particular group G.  In particular, this provides a way for every group G to be the precise automorphism group of some object in a category: it is the automorphism group of itself.  It is of course not true that any abstract group is equal
to the full symmetry group Sym(S) of a set S, so this is an important construction.
In the second part of the analogy, a distinguished role is played by the abelian category of [left, or right] R-modules.  In particular, End_{R-Mod}(R) = R, so every ring is the precise endomorphism ring of some object in an abelian category.  (I am pretty sure that not every ring is isomorphic to the full endomorphism ring of an abelian group, although this is less obvious than the other case.  It might make a good question in its own right...)
This is I think the right "general" answer to the question "Why is studying modules of a ring a good way to understand that ring?"  A different kind of answer would give instances in commutative algebra when theorems about rings are proved using modules.  I'll try that at some future point.
Comment: So in some sense abelian groups are only groups "by accident."  I feel that the situation with commutative rings is entirely analogous: an object in the category of rings is naturally thought of as a ring of operators, whereas an object in the category of *commutative* rings is naturally thought of as a ring of coordinate functions.
Comment: The introduction to section 12.A in Isaacs Algebra: A Graduate Course talks a little about this view.
Comment: +1. Beautifully written.
Comment: But in some sense, commutative rings are a totally different animal from arbitrary rings, and shouldn't be viewed as a special case.  Above, you point out that thinking of groups without considering their actions is the "wrong way of thinking," and I agree -- but notice that this applies primarily to nonabelian groups.  Abelian groups tend to arise as groups of formal linear combinations of things, and in this context they don't tend to come with interesting group actions.
Comment: Thanks Pete! Could you recommend a book about ring/modules/group-theory with this view as its driving force? I think I am lacking this kind of insight.
Comment: I think this is a good way of thinking about things for $R$ a general ring, but there's one thing I think is off-point.  You observe that an arbitrary ring can be realized as a subring of End(A) for some abelian group, just as an arbitrary group can be realized as a subgroup of Sym(S) for some set S, and then say "Note that End(M) is in general noncommutative, so this construction is more general than any "ring of functions" construction in (commutative!) algebraic geometry."
Comment: (Not that I think I'm saying anything original or new to you here; it's just something that I think would be helpful to someone first learning about rings and modules.)
Answer: I think the main reason is the flexibility of working in the category of $R$-modules rather than just with the ring $R$. For instance suppose we stick to rings - we have some ways of building new rings like localization and taking factor rings and limited ways of "building new things" - basically linear combinations of elements and maybe taking limits if $R$ is complete with respect to some topology.
At the level of module categories we still get all of this, torsion theories deal with localization (and make it clear that this is really an "internal" concept), instead of a quotient map we get useful adjoints, and we can still add and compose endomorphisms of $R$. But we also have lots of other structure to work with. We have all limits and colimits, possibly a tensor product, injective modules (which can have a lovely structure theory), duality, etc... So not only can we build a lot more objects but one can prove that just the existence of certain objects gives us a lot of information about the ring.
In a sense (which one can make precise) the category of $R$-modules is the same as $R$ (which is the same as $D^{\mathrm{perf}}(R)$ with its tensor product for $R$ commutative with unit) so the distinction between a ring and its modules shouldn't really exist!
I thought I would add the following quote which sprang to mind when I read the question:
"Grothendieck would later describe each sheaf on a space T as a "meter stick" measuring T."
taken from McClarty's article The Rising Sea: Grothendieck on simplicity and generality I (which can be found  here).
In the commutative with unit case this can be interpreted literally, however, I still think it is relevant (suitably adjusted) in the case of noncommutative rings.
Answer: Cuz otherwise it'd be like getting to know a bicycle without riding it.
Answer: This is a bit late, but here is one example I like:
Theorem. A localization of a regular local ring at a prime ideal is still regular.
One way to prove this is to deduce it from
Theorem. Let $R$ be a local ring. Then the following are equivalent:

$R$ is regular
Every $R$-module has a finite length projective resolution
The residue field has a finite length projective resolution.

(To use it, let $P$ be the prime ideal. Since $R$ is regular, $R/P$ has a finite length projective resolution. Now localize--this is exact, so we get a finite length $R_P$-projective resolution of $(R/P)_P$, which is the residue field of $R_P$)
This stuff is in Chapter 19 of Eisenbud's Commutative Algebra.
It's not clear to me how one would try to prove the first theorem from the definitions of regular.
Edit: fixed some mistakes
Answer: One way to convince the guy would be to make him list interesting questions he can make about rings, and show him which can be solved by looking only at the category of modules.
Somewhere in the middle of that conversation, one should make the point that it may very well happen that two different rings have equivalent categories of modules, so in answering any such question we can change the ring.
Answer: In homage to Serge Lang, I might suggest that your friend pick up any book on Morita theory and solve all the exercises.   Less facetiously, I might point out that many interesting ring-theoretic properties can be characterized, sometimes unexpectedly, by properties of the (right) module category over the ring.   For instance, consider what it means for all right $R$-modules to be injective, or what it means for all right $R$-modules to be projective, or what it means for all right $R$-modules to be flat, or what it means for all direct sums of injective right $R$-modules to be injective, or what it means for all direct products of projective right $R$-modules to be projective, or what it means for all flat right $R$-modules to be projective, or ...
Comment: @Greg: +1.  Indeed my own commutative algebra notes (as well as the class currently being taught out of them) take this perspective a lot.  For instance, just today I proved that for a commutative ring $R$, all modules are projective iff $R$ is a finite direct product of fields.  To my taste, a lot of the standard texts don't emphasize these sort of "inverse problems" as much as they should (e.g. where is this fact in Atiyah-Macdonald or Matsumura?  perhaps some exercise, but I don't know where).
Comment: This is what is usually called 'the homological study' of ring theory
Answer: This is closely related to Pete Clark's answer, but stated in a slightly different way that I personally find helpful.  I think it's not too hard to convince people that when studying an abstract object, it helps a great deal to be able to "write it down concretely," i.e., to consider a representation of the object.  It's not an accident that the word "representation" is used for a homomorphism of a group into the group of matrices over a field; matrices over a familiar field like $\mathbb{C}$ are, intuitively, "more concrete" than an arbitrary abstract group and hence can be thought of as providing a concrete representation of the group.  When you write something down concretely, often some structure will emerge that is not immediately evident from the original abstract definition.  For example, the character table is an important invariant of a finite group.  I don't know how you would come up with this invariant without considering representations of the group.
Similarly, modules are representations of rings.  I think the Artin-Wedderburn theorem is a good illustration of the usefulness of considering representations of rings.  Even if your interest is only in rings themselves, it's clearly an important result that you can classify all (Artinian) semisimple rings as products of matrix rings over division rings.  If you possess the concept that a ring can be represented as a matrix ring, then it is not too shocking (and may even seem natural) that something like the Artin-Wedderburn theorem should be true, and moreover you can even see that to prove it you should somehow construct the matrix rings by having the original ring act on something.  Without the concept of a representation (or equivalently a module), I don't know how you would proceed; it seems like a difficult and clumsy task at best.
Answer: I always thought one should regard issues like
ring theory/module theory or theory of (abstract) groups/ representation theory of groups
in an analogous manner to theory of abstract manifolds/embeddings of manifolds. So you can disentangle "mixed" notions and work out the concepts more clearly. It's not like embeddings of manifolds were "more interesting" than the theory of manifolds - on the contrary, the gist is distinguishing both.
Answer: The "categorical" approach: Understand an object not via intrinsic properties (rather ignore them, they are not part of the categorical data) but via the morphisms.
By choosing a category to work in, we choose the class of properties that are interesting.
If we choose to work in the category of groups and group homomorphisms, then two groups with different underlying sets but having a group isomorphism between will not be distinguished.
A group representation is a group morphism G -> End(M) and this way we get properties about the group itself.
A module M over a ring R ist nothing else than a morphism R -> End(M) and so we get information about R from this morphism (or, better: from the collection of all these morphisms).
Then, you could continue asking "why should we do this and not study the ring/group intrinsically"?
My answer is: what is a group, to you? For me it is a set satisfying the group axioms - and two groups are the same if there is a group isomorphism between them.
The "intrinsic" study makes sense only if you want to distinguish different groups/rings that are isomorphic. But then you could also choose a different category, with less isomorphisms :-)
Comment: @Konrad: I dont' think you have addressed Qiaochu's question. I guess what he's looking for, is why the study of all such endomorphisms from R -> End (M) (in the modules case, let's say) should give information about R, i.e. study of these endomorphisms as a whole. Your answer seems to be focusing on each such endomorphisms, thus not quite to the point.
Comment: Sure, but my point is why distinguish sources of the form End(M)?
Comment: In other words, your answer does not tell me why representations of groups are more interesting than group actions.
Comment: Yes, group actions are interesting in their own right. Representations are just the linear ones, thus easier to understand. The same holds for End(M) above. You could say to the unimpressed mathematician "you don't think linear algebra is useful?".
Comment: Oh wait, maybe you're asking "how to convince somebody to use linear algebra". Then my answer would be: Don't try to. If they're happy with difficult math, let them do it.
Answer: This relates to an earlier question you asked:
What representative examples of modules should I keep in mind?
My answer is the same: look at the frontispieces of Miles Ried's book undergrad commutative algebra, which visualize this central fact: Modules to rings are what bundles are to varieties.
Comment: Would now be a good time to admit that I also have no intuition for why bundles are useful?
Comment: A better time was when the original question asked, but now is a good time too. One important feature with bundles/sheaves (depending on the category) you can cook a lot of numerical invariants. E.g. if you want to prove that a scheme is general type, one standard technique is to represnt the canonical sheaf as effective plus ample; many times this reduces to a lot of computations in the Chow ring, which is much simpler then finding many sections of the pluri-canonical family.
Answer: If your friend knows well rings and ideals, he has certainly encountered quotient like $I/J$, hasn't he? What are they for him? sets? abelian groups? This point of view is wanting.
You can formulate basic and very useful results, such as (for $A$ local, noetherian): if $I/mI$ has a set of $n$ generators, so has the ideal $I$ (Nakayama), only if you can see $I/J$ as a module...
Comment: Mariano: a quotient of two ideals is not a ring, just as an ideal in a ring (other than the whole ring) is not a subring. At least not in commutative algebra.
Comment: Well, $I/J$ is a ring, so that argument is not going to convince the extremists :-)
Answer: If the ring $R$ is ${\mathbb R}$, then the modules are vector spaces. Vector spaces are more interesting and more useful. Modules over an arbitrary ring, then are analogous to vector spaces. Moreover, the places where the analogies break down form the interesting parts of the theory.
For groups and representations, I think the question is different. A group can be thought of as a set of symmetries --- the original meaning. Symmetries of what? Well, for example a particular vector space, or rather, for a family of vector spaces. The relations among those spaces tells you about the group.
Answer: First, category of commutative ring is opposite category of commutative affine schemes(whether in classical algebraic geometric sense or presheaf view point sense)
Second, considering an affine scheme (Spec(R),O),where R is a commutative ring. Qcoh(SpecR,O) is R-mod (category of R-modules). You should know, we can reconstruct the affine scheme (SpecR,O) from this R-module up to isomorphism. So study the ring and module category over it is the same. (Actually this is from Grothendieck view point: to do geometry, we just need category of sheaves on "would be space", this view point is supported by Gabriel-Rosenberg reconstruction theorem).
But, the module theory is just the theory of linear algebra. It is much easier to deal with than theory of ring. In fact, if we study quasi compact and quasi separated scheme. According to Barr-Beck's theorem(in particular,Grothendieck flat descent),all the algebraic geometry turns into linear algebra.(for affine scheme, we deal with module over monad, for non affine schemes, we deal with comodule over comonad, for all semiseparated scheme(all algebraic varieties), we even have simpler form for comonad). But I have to remind you. I assume you are talking about unital ring.
For non-unital ring, we can still consider R-module as category of associative action to some linear vector space. This is just the quasi coherent sheaves on quasi affine scheme(which is called cone). In fact, this is also not very difficult to deal with. A good reference for general framework is "Des categories Abéliennes" or more recent, O.Gabber's work on almost ring theory.
For your question about studying representation theory of G. The reason is the same. We can use Tannaka formalism to reconstruct locally compact group from its representations. Moreover, if G is an algebraic group. Then all algebraic geometry on group scheme can be turned into study on Rep(G) which is a symmetric monoidal category with linear algebra.
Answer: I guess they are dozens of points of view. Here are the one that I found most useful (for group representations) :

Studying the linear representations of a group is a way to linearize the problem. You thus get all the powerful tools of linear algebra (diagonalization, trigonalization...). The simplest (yet striking) example I know of that principle : you can show that every finite commutative group is a direct product of cyclic groups (essentially by decomposing its regular representation).
Studying the complex representations of a group $G$ is equivalent to studying modules over $\mathbb{C}[G]$ (you can adapt the algebra depending on the setting). So you may view it as analysis on $G$. A well known example : roughly, the theory of Fourier Series gives you a decomposition of $L^2(\mathbb{R}/\mathbb{Z})$ as a sum of irreducible representations of $\mathbb{R}/\mathbb{Z}$.
Answer: A simple example: If you have a representation of a group presented by generators and relations, you have an explicit algorithm to solve the word problem for this group. Another example: the proof of Burnside's theorem.
A representation of an algebraic structure gives, generally speaking, additional tools for understanding the structure. See for instance the topological proof of the Nielsen-Schreier theorem.
Comment: I'm afraid I don't fully understand what you are driving at in your first sentence, since we know by Cayley's theorem that every group acts canonically on the underlying set of itself.


Eigenfunction of local fractional derivative

Question: Let $E_{\alpha}(x^{\alpha})$ be a Mittag-Leffler function, $\alpha \in (0,1)$. It is an eigenfunction for nonlocal fractional derivative, defined as a convolution with
$$
   \Phi_{\lambda}(x) = \frac{x_{+}^{\lambda-1}}{\Gamma(\lambda)}
$$
when $\lambda = -\alpha$ (Gelfand, Shilov, "Generalized functions"). We can define a local fractional derivative of order $\alpha$ by
$$
    \tilde{D}^{\alpha}f(x) = \lim\limits_{\delta \to +0} \frac{\Gamma(\alpha+1)(f(x+\delta)-f(x))}{\delta^{\alpha}}
$$
Then for any $x>0$ we will have $\tilde{D}^{\alpha}E_{\alpha}(x^{\alpha}) = 0$ and $E_{\alpha}(x^{\alpha})$ is not invariant under action of local fractional derivative. I would like to know which function is an eigenfunction of local fractional derivative. If this function is well-known, is there a representation of such function that depends on $x$ through $x^{\alpha}$ like the Mittag-Leffler function? I think that the main advantage of such function is that $f(x+a)$ will still be an eigenfunction for any $a$ because of locality of operator. This property doesn't hold for nonlocal fractional derivative defined above, so $E_{\alpha}((x+a)^{\alpha})$ is not an eigenfunction for nonlocal fractional derivative if $a > 0$.
Comment: A consequence of your definition is that your local fractional derivative vanishes for all Lipschitz continuous functions, and even on Hölder continuous functions with exponent $>\alpha$. Huge kernel !
Comment: Yes, it may be some fractal function (Holder-continuous of order $\alpha$) that depends on $x$ via $x^{\alpha}$.
Comment: From my point of view, your definition is strange, or at least it has a contra-intuitive feature:
because $x$ and $\delta$ should have the same unit (e.g. some length unit), $\delta^\alpha$ will have the unit e.g. length$^\alpha$. Then $\tilde D^a f(a)$ will have the unit "meter$^{1-\alpha}$". But maybe this is OK? Please correct me if I'm wrong.
Answer: Nothing interesting is going to happen. Suppose $f$ is an eigenfunction, then it certainly must be continuous. Consider a closed interval on which $f$ is bounded away from $0$, then the fractional derivative of $f$, which is just a constant multiple of $f$, will also be bounded away from $0$. Say it is positive. Then $f - k x$ will also have positive fractional derivative for each constant $k$, since $kx$ has zero fractional derivative. A function of positive fractional derivative must be increasing, so $f-kx$ is an increasing function for all $k$. This is clearly impossible.
Answer: I think that this type of fractional differentiation, say of order $\alpha$, maps a Holder $\mathcal{H}^\beta$ function $f(x)$ into $\mathcal{H}^{\beta - \alpha}$ function. Therefore, if the derivative does not diverge or does not vanish identically it will map a $\mathcal{H}^{\alpha}$ function into a $\mathcal{H}^{0}$ function, which is discontinuous.
If you apply it to a $\mathcal{H}^{0}$ function you will get $\mathcal{H}^{-\alpha}$ function which will alternate between infinity and zero.
Therefore, only zero remains, i.e. $f(x) \equiv 0$
$\tilde{D}^{\alpha}0= k \; 0$.


Install Red Hat Enterprise Linux 5.5 on Proliant ML150 G2 server

Question: I am investigating if I can install Red Hat Enterprise 5.5 on Proliant ML150 G2 server but I don't know if this configuration is possible.
Is this configuration possible?
Answer: It isn't certified. See http://h18004.www1.hp.com/products/servers/linux/hplinuxcert.html under the "archive" tab. RHEL3 and RHEL4 are. Also see https://hardware.redhat.com/list.cgi?product=Red+Hat+Hardware+Certification&quicksearch=proliant+ml150
On the other hand, I'd try it and see; most likely it will work.
Answer: Yes you can and it is possible to install this. To verify it you can download an eval copy and try it.
Answer: Yeah, the configuration is possible. However, it sometimes depends upon the particular storage controller installed in the system.
Take a look at the Quickspecs for the ProLiant ML150 G2.
It's an 800MHz FSB Pentium Xeon model, so it is an EM64T 64-bit capable processor. RHEL 5 32-bit or 64-bit will install fine on it, regardless of whether it is a SCSI or SATA model.
The standard questions apply, though. This is an old server model. Do you intend to use RAID? Also, why are you specifically looking at the 5.5 release of RHEL? Version 5.8 is available as of this date.


Why does Anti-A antibodies make type-A blood type clump?

Question: A-type blood has B-antibodies; it also clumps anti-A antibodies are inserted. Why is that? The blood has no antibodies against the A-antibodies to make clump in this way.
Answer: When an antibody meets its antigen it will bind it. So if you add anti-A antibodies to A blood, these antibodies will bind the red blood cells. Because of its Y-shaped form, each antibody can bind two epitopes. These can be located on the same red blood cell, or on two different. If they are located on two different, this leads to cross-linking of two blood cells. Since this happens many times, the blood cells will clump. The whole process is called hemagglutination.
See the image (from here) for illustration:
Answer: The so-called ABO blood grouping is based on the antigen-antibody reaction, where anti-A antibodies circulating in the plasma will bind to cells possessing antigen-A and cause clumping, or agglutination. A deadly situation since the red blood cells will be unable to circulate.
A person's blood group is designated according to the antigens found on the surface of their red blood cells. Type A blood means type A antigens are on the surface of the red blood cells. Type B - the same. Type AB - the same. Type O blood means there are no type-A or type-B antigens on the red blood cell's cell membrane/surface, theoretically making them the universal donor of red blood cells, but not their plasma if it contains anti-A, or anti-B, or both anti-A and anti-B antibodies, that can bind to their pair antigen type.
Persons of type-A blood mean that their red blood cells exhibit the antigen-A on their red blood cell membranes/surfaces, hence these persons can safely have anti-B antibodies circulating in their plasma to avoid agglutination. Type-B blood therefore means that the plasma may have anti-A antibodies safely.
Blood matching is further complicated by various blood antigen systems that have been found to be clinically significant, for example the Landsteiner blood antigens.


Custom Workflow Activity vs Web Services in SharePoint 2013 Workflow

Question: I am working on a SharePoint 2013 workflow project which needs some business logic. In SharePoint 2013, workflows are declarative. So to write a custom code, its advised to create a web service and consume it in the workflow. However, i have also tried using a custom activity to write custom code and its working correctly. My query- which is the preferred method ? Is it a best practice to use custom activity to write business logic?
Comment: @SlavenSemper Thanks for the response. Could you please post this as an answer so that i can mark it as correct. :)
Answer: I have done both and from my experience things are a lot easier when you use web services. You don't have to kill vssphost5.exe process all the time if you're using web services. From architecture side of things if custom activity is something that will be reused in workflows then I would definitely use custom activities. For all other scenarios I prefer web services.


How can i remove my rusted and stripped deck screws from my deck boards?

Question: I am planning on replacing my wood deck boards with azek..some of my deck screw are rusted and stripped.can i use a reciprocating saw with a metal blade to cut between my deck boards and joists to cut the screws and joist level?will this affect the screws going into the joist when i lay my azek and screw to joist using screw going into the sides of the azek?
Answer: You can do that, but some screws are very hard and you'll have a slow, noisy time of it. You'd want a high quality metal-cutting blade. Getting a gap between the decking and joists makes it much easier, too.
If you aren't trying to salvage the decking, just pry the boards off the joists and then bend the screws that remain back and forth a few times. They'll snap off fairly easily, and you can pound any sharp stubs flat. You could make some circular saw cuts through the decking between joists to help you pry things loose.
Comment: +1 on your answer, but please let me add this. I find when pulling up the old boards, it is easier to, after there is a few pulled up the way you suggest of cutting them smaller or sometimes I use a prybar in the gap to "roll" it out in a longer piece. After 2 or 3 are out, I use one of the old decking boards that is in better shape that is about 5-6 ft long to place over the joists diagonally and get the end under the next board to pop and start levering out the rest. Larger pieces, for me means easier cleanup.
Answer: Get a 3/8 metal drill bit and drill the heads off the screws. Then simply pry the boards up


noticeable improvment with 70-200 f4 (non is) vs kit lens (18-135 is) and 70-300 (is, non L)?

Question: I currently own a 600d + a 18-135 kit lens.. but one thing i fell missing is reach.. I can't afford an expensive lens like the 2.8 is or the 100-400 so i thought about two lenses:
canon ef 70-200L f4
canon ef 70-300 f4-5.6 is
I just want to know if there is any noticeable improvment from my kit lens to these two and the differences between those two because if the overall performance are close i prefer a longer lens.
thx.
Comment: this question has been discussed countless time here and elsewhere :-) So it's a duplicate of a duplicate of a duplicate. But in short: yes, there is a huge difference between the L lens and the kit lens.
Comment: possible duplicate of [Which is better: Canon EF 70-300mm f/4-5.6 IS USM or Canon EF 70-200mm f/4.0 L USM (without IS)?](http://photo.stackexchange.com/questions/11504/which-is-better-canon-ef-70-300mm-f-4-5-6-is-usm-or-canon-ef-70-200mm-f-4-0-l-u)
Answer: You asked about a few things:

Image Quality
Reach
Price

Firstly the IQ improvement is huge between L and non-L. However what does image quality mean to you? To some, it means getting paid or NOT getting paid. For hobbyist, it usually does one thing :

give you some satisfaction when you zoom in at 100% on a computer screen.

Reach
200mm is not a much longer than 135mm. If you can, go try it yourself, you will STILL think 200mm is not long enough. As you take more photos, you start to realize you can create good photos at all focal lengths, unless when shooting specific subjects (like tiny birds).
Price
Again, for people who needs to protect their reputation as professional photography whose living depends on image quality (and many other things), getting an L lens is a no brainer, you don't want to go out of business just to save $2,000.
For own-use, however, the image quality is not so important. We are talking about THOUSANDS of dollars for better PIXELS, not better PHOTOS.
For a balance between the three, I recommend the 55-250mm lens, it is cheap, light, has 250mm(400mm equiv.)
You can have a photo that is sharp and crap, and have another one that is taken with a kit lens that touches your own or other people's hearts.
Comment: I would not say that the IQ difference between every non L and L lenses is huge. Some yes, but certainly not all.
Answer: If you are talking about the 70-300 NON "L", then no, no improvement. If you are talking about the L version, then yes a HUGE improvement. The 70-200L will also be a slight improvement.
You don't mention which 18-135 you have(two current models), but any "L" lens will certainly be an improvement over either. I would take a look at the lenses in question on this website and I believe it will answer many of these questions for you:

The-digital-picture.com
Answer: You have to consider that all "L" lenses are built for full-frame cameras, not for APS-C cameras like the 600D. The 70-200mm have to be multiplied by the crop factor which is 1.6 (equals a range from about 110mm to 320mm).
Comment: I think your answer is confusing. The L lenses are not designed for aull frame, they are designed for both full frame and APS-C. Also the fact that you have to multiply the focal length with 1.6 is irrelevant. This multiplier of 1.6 is not reserved for the lenses designed for full frame sensor coverage. It applies to the ones designed for APS-C too. In other words a 70-200 lens designed for full frame cameras will correspond to the same focal length range as a 70-200 APD-C exclusive lens.


What the ... are all of you studying/working for asking such questions?

Question: Sry, I'm new here. But I am just astonished by all those sick questions and answers you ask/provide... Are most of you studying mathematics or are your finance programs that good, that you can ask/answer such mathematical questions?
Or did you learn those things after many years at work?
I'm about to finish my master's program and I'm really afraid not to find a job because of people like you...
Answer: I'm inclined to downvote this question for not being relevant in particular to quantitative finance nor programming but I will give you the benefit of the doubt. I too am new to this community yet I can tell you that we are all deeply interested and passionate about the topic. Some of us are undergrad, some postgrads, some make their career out of this and others just do this for leisure. It's all about your attitude to your work and consulting help where necessary.
Answer: Yes I think most of us, at some point of time, studied a lot of math. Quant finance is pretty much very mathematical. Even the physicists or computer scientists I met at work are all pretty good with math. So yes if you are still in a master's program and if you find these quant finance questions intimidating then maybe it's helpful to do a couple more courses in Mathematics, at least Stochastic calculus. Just my 2 cents. More math will definitely help you down the pipe.
Comment: Unfortunately CFA and FRM doesn't help much. Most of CFA's curriculum is non-mathematical (a lot of accounting actually because CFA chart holders needs to be good at reading accounting statements to do financial analysis work to pick companies and stocks). FRM has some math but won't provide the hardcore ones you need for quant finance. I personally don't know many quants that actually had CFAs or FRMs.
Comment: Thanks, that's the answer I expected. I would say 70% of our master's program was maths as well. But definitely not on the level of those questions here. That's why I was wondering if all of you did so much more maths during your finance master or if you still learned a that much afterwards at work.
Comment: It might be difficult to just join some math courses of another program. Would a certificate, like CFA or FRM, help to improve those kind of maths skills?
Comment: Thanks, nice to get to see the perspective of a practitioner. So a mathematics program is inevitable? I really regret not starting mathematics earlier. But now it feels like it's too late for me. I wouldn't want to attach 5 more years of Uni. Feels like I need to do 3 years of very theoretical stuff and the applied part comes at the master's level. Learning those maths things at work is unrealistic, right?
Comment: You are welcome. Leaning math at work is difficult. Finance is broad field however. Quant finance is only a small subset of it so spending many years to just do quant finance may not be ideal. If you come from a good finance program then there are jobs available that outside of quant finance that pays equally well.


What to avoid when writing a villain that is insane?

Question: If let's say one wants to portray a villain in a novel that suffers from insanity/psychosis as he has literally lost his grip on reality and is kind of living in his own world, what are the things a writer should avoid when he writes such a character?
Comment: I would skip the whole idea, since people with mental illness are already demonized. Isn't the psychotic villain overdone?
Comment: This website has some excellent points to keep in mind when writing insane characters. The biggest point is to do your research into the particular mental illness your character suffers from in order to make them believable and compelling and avoid making them caricatured or offensive. http://www.springhole.net/writing/writing-mentally-ill-and-insane-characters.htm
Comment: Why not do a character reference, something like this for your villain character? Mental illnesses can still be involved, but doing an extensive ref shows you more of their reasoning. If you can figure out the core weakness of the character, then you can figure out how he got into his downward spiral. You can fins how he can be redeemed or defeated by the protagonist.  https://www.writerswrite.com/journal/jun98/how-to-create-a-character-profile-6986
Answer: I would avoid the following:

Stereotypes: it is very easy to describe cliches (screaming, sadistic violence, rage outbursts, contradictory or erratic behaviour, etc.) but they lead to a flat and not interesting character.
Irrationality: don't let your character do random stuff just because it "sounds crazy". A mentally insane person always follows its own rationality, even though it differs from the more common one.
Comment: Irrationality is a huge one. The most important part of someone who is "insane" is that they typically have a rationality to what they do, even if it is non-standard. Think of what makes Cersei Lannister interesting, she doesn't go around murdering on a whim, she has logic behind her actions, even if the logic is not very sound.
Comment: @EvSunWoodard thank you! My favourite example here is The Joker in The Dark Knight. A crazy psycopath with a specific agenda, whose reasons are so beyond common sense that people fail to understand them, even if he spends the whole time by stating his message clear in their very faces.
Comment: I appreciate your reply to my question.
Comment: Also, consider the Unabomber, and why it took people so long to find him.  He was highly intelligent, but used that intelligence to extend his flawed starting points.
Answer: The main thing I see, in such a novel, is avoiding having this insanity be the equivalent of a deus ex machina that ultimately defeats him. I think the hero must defeat him in a way that would work even if he were not insane.
It would be an unsatisfying ending if after a long campaign in which Dr. Nutjob came close to defeating the hero several times, but finally gets distracted by something shiny so the hero can put a bullet in his head.
If your villain is insane but a daunting adversary throughout the story, he must be insane and a daunting adversary to the very end: His insanity can make him terrifying and unpredictable and thoroughly hated, but it cannot be the source of his defeat.
Comment: The "distracted by something shiny" (or any particular quirk related to being insane) can work if it's a Chekhov's gun. That is, if it's been established that the villain's particular brand of madness involves getting distracted by shiny things, setting things up such that the hero whips out a shiny thing to distract the villain in the climax can work (assuming it's not otherwise overly trite/telegraphed/etc.). -- But overall I agree with you. A deus ex "I'm insane, so I did something random that arbitrarily lead to my downfall" is unsatisfying.
Comment: I agree with R.M. in one thing: The hero defeating the much stronger villain by exploiting his insanity can be a very satisfying climax. But only when the hero does it in a clever and unexpected way. So in a different way I agree with Amadeus: It's not a satisfying ending when the hero doesn't actually need to make some effort.
Comment: While this isn't bad advice (especially to an inexperienced writer, I expect), consider Gollum as a famous counterexample. Tolkien, however, had explicitly set out to paint a portrait of a world where evil is both ultimately self defeating and a higher power (God by another name) ordains all things. Gollum's mechanism of self defeat was *thematically appropriate*.
Comment: @jpmc26 I don't see Gollum as a counter-example, he was never a **daunting** adversary, or even the main villain.
Comment: @Amadeus I disagree. While he was no Sauron or Sarumon, he did pose a very real danger to the Hobbits. His sheer age allows him to possess enough knowledge of the world to influence events for good or ill. Remember that the Hobbits are largely hapless travelers, unaware of the world at large. And he ultimately poses a threat to all Middle Earth, even if just by behaving so selfishly that he allows the Ring to fall into Sauron's hands. This was built up slowly over the course of the entire story, and if handled wrongly, it could've easily been an unsatisfying end to his character arc.
Answer: Do your research before you begin, look for disorders and conditions that match the symptoms you want your character to portray and then add some of the other symptoms commonly associated with that disorder. This will help you to build a profile of your character as well as knowing what triggers their symptoms to manifest. Presumably you already have their motives so use this profile to determine possible actions that would make sense from their point of view. For example, if they suffer from schizophrenia they may have auditory hallucinations. Use that. Delusions of grandeur? They may struggle with people in positions of authority such as the police ordering them to put the gun down. You mention psychosis which is a very broad term and will give you a lot of options but may make it difficult to create your profile.
Since you want your villain to be in their own world you need a diagnosis that makes sense (insanity is no longer a recognized condition). Psychosis fits well but again, schizophrenia (a subset of psychosis) is a good match here. It can be brought on by extreme mental stress so it can be the result of trauma which gives you an opportunity to build their back story. Make the audience sympathise, after all they are victims, they are suffering and need help.
Once you can explain their motivations, your character must still be able to execute their actions. Are they constantly tormented by voices? Then how do they sleep? They're going to be exhausted. How do they eat? Perhaps they have to steal to eat in which case they will likely be gaunt and weak. This is someone to pity, not hate.
Perhaps you are thinking more along the lines of someone who is high functioning, they can't tell the difference between their reality and ours but they have learned to walk the line between them. This is going to make them less sympathetic to the audience (think The Joker from Batman), but what happens when they lose that tenuous grip? How do they regain their control? Confrontation from your hero could trigger their more extreme symptoms and leave them vulnerable so they may need a way to avoid this outcome. Perhaps trapping your hero helps them to remain in control.
OK, this was long and a bit rambling but here's a summary:

Avoid picking random symptoms, do your research and find the conditions that best match your vision
Actions should match motives
Develop a backstory for the audience to better understand your character, you can just provides hints if you don't want a full story
Ensure your character is able to execute their plans, if they struggle to get through the day they probably won't be able to function without help
Know your triggers, don't put your character in a situation that is likely to trigger their symptoms or if you do, ensure the outcome is realistic

Hope this helps
Answer: Leave room for sympathy
I really enjoyed the DC Comics film Joker (2019) with Joaquin Phoenix. In this story, the Joker is portrayed sympathetically to the audience and we get to understand what he is going through. He is dealing with mental illness itself as well as poverty. He wants to get better treatment, find medications that work, etc., but he experiences systematic social barriers that slowly turn him against society and the establishment.
The Joker in this film is not just an insane clown. He is an insane clown, but that's not who he really is underneath. He's an aging, has-been children's entertainer looking to make a big break in stand-up comedy but not able to. He knows he has a mental illness and wants treatment but can't get it. He's attacked by muggers on the train. He seeks love but can't find it. He's so frustrated with life and afraid of being victimized again that we can understand why he starts carrying a gun, and when he starts using this gun we can understand how lost he feels. This doesn't fully excuse his behavior but it puts it into a context we can understand.
If you want to look further into Batman lore, you will find it replete with "insane" villains with stories. The Riddler of the 2022 "The Batman" film is a broken social justice activist who truly thinks he is Batman's kindred spirit. Various incarnations of Harley Quinn portray her as experiencing some combination of a sex addiction, Stockholm syndrome, and PTSD brought on or exacerbated by her experience as a therapist trying to treat insane villains and eventually being seduced and physically and sexually abused by one. The one exception is Penguin. He is very, very sane. Combined with being intelligent and calculating, he's a risk of a completely different nature to Batman. He knows he is a gangster, this is what he wants to be, and he is in full control.
The television show Law & Order: Special Victims Unit is also quite good occasionally at presenting sympathetic offenders with problems. There's the young man who has been taught by an incompetent therapist that he has no hope of ever being anything in his life except a rapist, so guess what he goes and does? There's the football player with a concussion-induced dementia who has to explain to his wife that he picked up an underage prostitute. There's the seemingly innocent middle-aged businessmen being inexplicably targeted by a serial predator until it comes to light that the men had gang-raped her half a lifetime ago at youth summer camp. Which of them (the woman or the men) qualify as the true villains of the episode? It's messy, just like real life. There are a few characters who snap and torture the person that they think sexually abused their child, only to find out that their victim was innocent and they are now the defendant on trial for the rest of the episode. Some people do the right thing for the wrong reason. Some people do the wrong thing for the right reason. Good people snap and hurt others. Sometimes those others deserve it, sometimes they don't. It's life, not a morality play.
So, give your readers reason to see your antagonist as a person with a story who is an insane villain, not just a stock "I need an insane villain" character.
In a nutshell, it isn't so much what to avoid but what to avoid not including. Tell us about your insane villain. Where are they from? What have they accomplished in life other than insane villain stuff? Any hopes and dreams? Have they been insane all of their life? If they experienced insanity later on in life how old were they when it started? Mid-teens? Early 20's? Old age? Was their insanity exacerbated by abuse, war, or other trauma? What has insanity done to their life? Did they lose a career? Were they expelled from an elite university a month before graduation? Did they lose family? Were they put in a hospital or prison? Did they ever seek treatment? Is the insanity treatable? If there is a working treatment, why aren't they taking it? Does it have unbearable side effects? Can they not afford it? Do they not know about it?
Good insane villain:

My villain was a somewhat plain-looking but highly intelligent young woman studying at an elite East Coast university on a classical music scholarship. She began to experience the symptoms of schizophrenia in the fall of her senior year. Her symptoms were exacerbated by stress brought on by preparations for final exams, drug abuse exacerbated by stress, and finally being dumped by her boyfriend two weeks before Christmas. She experienced a psychotic break over the winter holiday and believed that her final exam was to kill the dean. She was placed in a psychiatric hospital downtown where she experienced sexual abuse from a therapist which resulted in her refusing treatment and trying to find her way alone. She was expelled from college and now works part-time at a diner during periods when her mental illness is at its lowest. It is suspected that when her illness flares up, she attacks people who look like the therapist who abused her with a knife to the gut. Lately, she's developed a delusion that the mayor is actually a supervillain and that she will receive a Nobel Peace Prize if she kills her....

Bad insane villain:

My villain is some crazy, violent chick in her mid-20's. Everyone she's ever dated has left her because she's butt-ugly and has schizophrenia. She like, has some sort of music thing? And she loves knives. Lots and lots of knives. She's so insane she wants to kill the mayor.
Answer: Start by defining the insanity. Mental illness is a very very broad field: you need to narrow down what you mean by "insanity/psychosis"; give your character a defined condition, and write him with the correct characteristics and actions for that condition. You don't have to name the condition, or refer to it at all outside of your personal notes; just understand that insanity is not a case of just behaving randomly; there is always an underlying reason for any symptoms.
Pick any insane or troubled character you can think of from literature -- Don Quixote, Hamlet, Moriarty, Scrooge, Eeyore, or many many others -- for all of the good ones, it is possible to read the stories and come to a definitive diagnosis of the character's mental illness.
You need to write your character like that. If you don't, people simply won't connect with the character and will find them unbelievable.
Comment: Is Moriarty really troubled (as in insane)? The Moriarty from BBC's "Sherlock" definitely is, but I'm not sure about the original one.
Answer: Make the insanity questionable. Think of Macbeth, he falls into madness as the play goes on but he might not be diagnosable. "Insanity" can be brought upon by something other than a mental illness.
The villain can be tormented by his past and hell-bent on some other goal which he's just using to try and deal with the old trauma.
The villain can become a nihilist and expressing how nothing matters good or bad everything is relative and it doesn't matter if he kills a woman or loves her. (Ex. Hamlet: "Nothing is good or bad but thinking makes it so.")
The villain could be a fanatic of some sort of ideology or ideals, even if the ideology is well intentioned, the villain followed it to its natural conclusion and brought great suffering. (Ex. Government/Socialism/Communism)
Try to make the villain's insanity somewhat logical so the audience can understand them and see the villain in themselves.


Why does StackOverflow have live updates for new answers and not for reputation change?

Question: I understand that notifying the user that there are new answers for the current question is really important, but why doesn't the site provide "live" information also for new messages in inbox (comments, answers etc..) and for reputation change?
Answer: The notification bar would become too cluttered, and frequently ignored, if it popped up for every reputation change.  The little envelope icon next to your username at the top of the page lights up for such changes, and useful changes on all sites highlights the "StackExchange" drop down link in the upper left, so those alerts are alreay provided, just not as obviously as notification bars.
Comment: But is it updated live? I didn't notice it, but it seems to me that it is updated only on page refresh. Why isn't it updated in real-time?
Comment: @Andrea - No, it is not, and the notification bar is only live updated when editing, so it's reasonably limited.  Having live updates on every page would put an extraordinarily large burden on the server.
Comment: I can imagine it :) But are there any measures of this burden? Any experiments in this direction? Quora does it, but I don't know if they have more computational horsepower behind their site.
Answer: I would guess it is lower in the order of importance and possibly more expensive to keep a live update of.
Answer: Getting answers to your questions is the primary use case for Stack Overflow, so getting notified of new answers is given the highest precedence.  Comments and reputation are nice features of the site, but they're really only secondary to getting answers.
Comment: Hey @Ólafur.  Good to see you back around.  :)
Comment: I win, Hi Bill :)
Comment: Bored in class. Perhaps I should pay attention.... perhaps.
Answer: If you are interested in getting notification about your rep change have a look to Stack Apps notification tag; there are plenty of fancy app[s] developed for this specific purpose.
The cool thing of these apps[s] is that you can get rep change notification even without browsing Stack Overflow.


samsung pc studio not install on ubuntu

Question: i want to install samsung pc studio for make a internet connection via GPRS on ubuntu 9.10 but without this software it is not possible so give me suggestion
Answer: Samsung PC Studio seems to be Win-Only software...your best bet would be WINE, but the AppDB rates the software as garbage. Maybe you can use the phone as a direct GPRS-Modem (knowing what phone you have would help here).
Answer: Sorry for the late reply. By now, you may have shifted to 10.10! However, I think you can plug on your phone, and the network manager would recognise it instantly. Just click on the NM, go through the create network connection option to fill up the wizard, and you are connected!

samsung pc studio not install on ubuntu


freenas windows acls folder permissions

Question: We have FreeNAS-126.96.36.199-RELEASE-x64 providing a samba share to IIS (hosted by 2012 R2, if that's relevant)
ssasan01# smbd --version
Version 4.1.6

The freenas server is joined to an AD provided by windows servers. Domain is "AD".
IIS sites run as an active directory user unique to that site.
Both the application pool (each site has it's own one) identity and the "physical path credentials" for the site in IIS are configured to be the same active directory user.
For the most part everything is working except folder creates.
In a folder, that the IIS user has access to (write/modify/read/execute) (App_Data, actually) application code attempts to create a folder using DirectoryInfo.Create
The resulting folder is created successfully on disk, and appear to inherit the ACL permissions from the parent, however the create call returns an error.
Access to the path --snip--\App_Data\packages\created\__testFolder__ is denied.

Description: An unhandled exception occurred during the execution of the current web request.     Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path --snip--\App_Data\packages\created\__testFolder__ is denied.

The following error appears in the log samba log (level is currently 1 as this is a production server)
Sep  8 17:28:05 ssasan01 smbd[54843]: [2014/09/08 17:28:05.026127,  0] ../source3/smbd/open.c:543(change_dir_owner_to_parent)
Sep  8 17:28:05 ssasan01 smbd[54843]:   change_dir_owner_to_parent: failed to change current working directory to --snip--/App_Data/packages/created/__testFolder__. Error was Permission denied

(--snip-- replacing the base path)
Files seem to work correctly.
If I view the created folder via SSH, I see this:
d-w-rwx---+ 2 AD\applicationpoolidentity  group   2 Sep  8 17:28 __testFolder__
(AD\applicationpoolidentity is the user for the site, group is the same as the other folders)
The same error/problem occurs if I try to create a folder using windows explorer while logged in as a user that has access to the share (and write access to the folder in question).
The folder, at least, according to windows, is set to inherit permissions.
In this case, the newly created folder doesn't get any ACLs assigned to it (explorer has no permission to the created folder) but I suspect this is most likely due to an order-of-operations type issue as when IIS/.net creates the folder in the other scenario, things happen in a different order than when you create a folder via explorer.
I have reviewed the smb.conf file by hand to eliminate potential GUI issues, here are any that I think might be relevant from searching google for this issue.
I added 'force create mode' and 'force directory mode' while testing.
unix extensions = no
acl check permissions = true
acl map full control = true
create mask = 0666
directory mask = 0777
force create mode = 0666
force directory mode = 0777
inherit owner = yes
inherit permissions = yes
inherit acls = yes
writeable = yes
browseable = yes

Note: all folders and files are created via samba client (not from the linux shell directly) either via IIS code executing as a user that has rights to that folder, or via a windows explorer window while logged into the server as a user that has rights to create files and folders.
Files seem to work correctly.
We are using freenas here due to ZFS snapshotting plus redundancy, it is also providing NFS services to other machines and iSCSI to other machines, so replacing this server with a windows based file server (or for that matter, another SAN/NAS server), while, not out of the question, would not be an easy job.
One possible oddity is that the owner of all folders and files for the whole tree is an administrative level user (not administrator!), to allow us to be able to access and change permissions as administrators.
Update 1: Working from the error in the log, it looks like the folder is created successfully but then the samba process does not have permission to change into that folder in order to set the permissions.
The parent folder (in this case, 'created') was configured with the following mask:
d---rwx---+.
If I chmod 777 created (the folder I am trying to create new folders within) then the IIS process (and windows explorer) both can create and delete the folders successfully within that subdirectory.
We are testing with two different processes:
When testing with windows explorer, I'm logged onto windows as a domain user which is the "owner" and "group" of the parent folder. That same user also has full control granted via ACL.
Group has rwx via mask.
When testing via .net/IIS, the pool is running as a user which has write/modify/read (everything except full control) granted via ACL. This user is not owner or group and there are no mask permissions for everyone.
The error goes away and everything works right if I chmod 777 the folder that is the immediate parent to the one I'm trying to create. I don't think this solves the problem as it's not secure to 777 everything, especially given we're using full ACL.
Update 2 007 works, 000 fails - seems the public mask bit is being used here, regardless of the ACL and regardless as the user that is being used for share access.
Is this because the user who is accessing the share is not the owner or the group?
We don't want to add all site users to a group and give the group write via unix masks, since that would allow a path traversal security vulnerability (one site user would then have access to all other site folders as they're a member of the group), wouldn't it?
We could selectively apply "owner" '700' and chown the site roots and their children to the site user, but that seems pretty unmaintainable and bypasses the use of ACLs and inheritance?
Or is 007/777 safe in this case because of the use of ACLs as another layer?
Update 3 Checked the samba source for open.c to see what change_dir_owner_to_parent was actually doing. First it gets the folder using getwd (cached according to getwd_cache) and then it performs a cwd into that folder to "lock" it so that the owner change is not in a race condition.
This is where my tests seem to fail.
In previous testing/updates, I have found that if I grant xx7 to anything then it works and continues to work even after I take the everyone mask away again. I assume this is caching of the permission checks, so the problem will reoccur once the cache expires/invalidates. I am not sure which cache variable applies to this.
I found a folder which was not working (had 070) and confirmed I could not create new folders correctly.
I then used chmod to grant 074 to the folder and confirmed that this resolved the problem.
So that's better than 777 but still unsure why this is even required?
Do I need to chmod -R 074 * the entire share?
Update 4 Found another folder that was broken (had 070) - confirmed broken by using the CMS user interface and created a folder, confirming that the process that creates the folder did not work.
Then applied chmod 000 to the parent via SSH.
Now the process creates the folder successfully. What is going on?!
I haven't touched the windows ACLs for any of these tests.
Update 5 Running out of broken folders to test with... took a folder that was 070 and not working (verified in CMS) and then chmod 070 it (same permissions as it currently had) and now I can create items inside the folder via the CMS (using windows ACLs which provide the permissions)
So if I chmod the broken folder -to anything- then it starts working?
Answer: This is because this
d-w-rwx---+ 2 AD\applicationpoolidentity  group   2 Sep  8 17:28 __testFolder__

represents ONLY the owner. You see the "+" at the end of the bitmask? This means, that there is a (windows) acl controlling the access. So if you have access to a file because you are in the acl with r/w, the bitmask of the owner is not applicable to you (unless you ARE the owner). If you're not explicitely in the acl, the 007 works because that means "anyone except the owner user and except the owner group has access to the file".
In earlier versions of FreeNAS one could explore the ACL with "ls -v". Sadly this does not work any more. I haven't found out how one can explore this now from unix side.
HTH
Comment: ./getfacl will list out the the acl for the current folder,
Comment: So if I understand your comment correctly, in the unix permission set above, owner has W, but group has RWX. There's an ACL which applies, unless I'm accessing the folder as owner.
Comment: I found that my issue with creating folders can be solved by granting the ACL permission for "change permissions", aka full control, rather than just modify. It seems this is required for some scenarios when the user accessing the share has ACL permissions but the owner of the parent folder is not the same as the user. What seems to happen is that the folder gets created as the accessor user, then an ownership change takes place to change it to the parent folder's owner. This is what was failing and it seems setting the unix permissions was a bit of a red herring

freenas windows acls folder permissions


How is 'Iratus' Pronounced?

Question: In Stargate Atlantis, they creatures called Iratus bugs (what the Wraith evolved or mutated from), how do you pronounce 'Iratus', is it like I-RAT-US, E-RAT-US or E-RATE-US ? Because I've heard it pronounced all three.
Answer: I'm not able to dig through actual SGA episodes at the moment to find how it's pronounced in the show, however:

This propworx video selling an Iratus bug prop pronounces it eye-RAY-tus
Wiktionary's page on "iratus"1 pronounces it ee-RAH-toos; that said, Latin is a dead language, so defining "proper pronunciation" for Latin words is difficult

"Iratus" is an actual Latin word, the perfect passive participle of īrascor ("be angry, be in a rage").
Comment: @ChrisB.Behrens: actually, there are many more pronunciations for Latin. There are traditional pronunciations specific to German, English, and actually most European languages. Using the traditional English pronunciation is not incorrect when speaking in English, and is often standard, depending on the word and field of use: (legal Latin in particular, like *stare decisis*, tends to be pronounced  according to the English tradition, and so does medical Latin.)
Comment: Latin generally has two pronunciations, ecclesiastical, the pronunciation of the Catholic Church, and classical, how the Romans actually spoke it. Ecclesiastical is well understood, but classical is more conjecture. ee-RAH-toos would be the pronunciation in either one...there is no controversial sound in that particular word. ee-RAH-toos SOOM - "I'm pissed off".
Comment: I remember it on the show (and have always pronounced it myself) the same as the propworx video
Comment: Did you just "well, actually" me? :)
Answer: In the SG universes, it can often be difficult to arrive at a single pronunciation for alien terminologies. The iratus bug is just one example. If you follow the series closely, you will notice that the following important terms are all pronounced differently by different characters quite frequently:

Goa'uld > GEWLD, goo-UH-EWLD, GOH-uh-EWLD, GO-uh-old
Jaffa > JUH-fah, JAWF-uh, JAFF-uh
Tok'ra > TOKE-RAH, TOKE-ruh

This could be explained by the different dialects and accents of the characters speaking the names. Additionally, it could be a matter of seeing the word before hearing it (such as reading a mission report.) When this happens, you tend to pronounce the word as you guessed it would be pronounced when you saw it.
So, as it seems to be for the SG characters (or the actors), the pronunciation would be the one the speaker is most comfortable with.
Answer: In episode 8 of season 2 (Conversion) Doctor Beckett refers to it as an "air-ay-tuss". In the same episode, Weir calls it an "air-at-tuss" and and McCay refers to it as an "ir-rat-uss".
The pronunciation on the show seems relatively flexible but as other posters have noted, the word iratus itself is a real world Latin word that means 'angry' and would be correctly pronounced (in the original Latin) as "ere-aah-tuss".
A pronunication file can be found here
Answer: It's always problematic for native speakers of English to even approach the "original" phonetics of Latin or Greek words. Not that it is easy for speakers of other languages but most of them at least come somewhat near to the "original". That's why one can often count on a laugh among f.e. Poles, Italians, Germans etc when they hear one of those anglifications of latin and greek words.
Comment: @Scoach, this is really more of a comment than an answer. When you get more [reputation](http://scifi.stackexchange.com/help/whats-reputation) you'll be able to comment on other people's questions. Don't lose heart! We've all been through this. Can you [edit](http://scifi.stackexchange.com/posts/64599/edit) your answer so that it addresses the question? Then you may get upvotes, and enough reputation that you **can** leave comments in the appropriate place.
Comment: This doesn't answer the question in any meaningful way.

How is 'Iratus' Pronounced?


Question about Fermat's principle

Question: Why when deriving the law of reflection from Fermat's principle of least time do I set $dL/dx = 0$? I am a 12 grade student with a little notions of maxima and mimima in one variable calculus.
Comment: You'll find  a  similar problem to derive the Snell's Law of Refraction  without differential calculus (due to Feynman) in my answer therein : [Why one should follow Snell's law for shortest time?](https://physics.stackexchange.com/questions/257140/why-one-should-follow-snells-law-for-shortest-time/257331#257331).
Answer: Let look at this problem(1) in the more general case of a particle moving with constant speed $\:\upsilon$ ($c\:$ in case of light) : to find the path with the least travel time from point $\:\rm{A}\:$ to point $\:\rm{B}\:$ through one touch (point $\:\rm{C}$) on a plane surface (mirror in case of light) as shown in Figure 01.

Now, choose at random a point $\:\rm{C}\:$ on the mirror and let the path $\:\rm{ACB}\:$. For the total time through the point $\:\rm{C}\:$ we have
\begin{equation}
t=t_{\alpha}+t_{\beta}=\dfrac{L_{\alpha}+L_{\beta}}{\upsilon}=\dfrac{L}{\upsilon}
\tag{01}
\end{equation}
So, the path of least time is the path of least length.
Let see how this total time, that is the total length, is changed if we displace the point $\:\rm{C}\:$ to the right by $\:\Delta x\:$ at point $\:\rm{D}$, see Figure 01. For infinitesimally small displacement $\:\mathrm{CD}=\Delta x\:$ you can do the following approximations :
\begin{equation}
\mathrm{AF}\approx \mathrm{AC}=L_{\alpha}\,,\quad  \alpha'\approx \alpha \,,\quad\mathrm{BE}\approx \mathrm{BD}=L_{\beta}\,,\quad \beta'\approx \beta
\tag{02}
\end{equation}
The new total time and length are
\begin{equation}
t'=t'_{\alpha}+t'_{\beta}=\dfrac{L'_{\alpha}+L'_{\beta}}{\upsilon}=\dfrac{L'}{\upsilon}
\tag{03}
\end{equation}
so
\begin{equation}
\Delta t=t'-t=\left(t'_{\alpha}+t'_{\beta}\vphantom{\frac12}\right)-\left(t_{\alpha}+t_{\beta}\vphantom{\frac12}\right)=\dfrac{\left(L'_{\alpha}+L'_{\beta}\vphantom{\dfrac12}\right)-\left(L_{\alpha}+L_{\beta}\vphantom{\dfrac12}\right)}{\upsilon}=\dfrac{\Delta L}{\upsilon}
\tag{04}
\end{equation}
From the detail shown in Figure 02
\begin{equation}
\Delta L=\Delta L_{\alpha}-\Delta L_{\beta}=\Delta x\left(\sin\alpha-\sin\beta\right)
\tag{05}
\end{equation}
that is
\begin{equation}
\boxed{\color{blue}{\:\Delta L=\Delta x\left(\sin\alpha-\sin\beta\right)\:\vphantom{\frac12}}}
\tag{06}
\end{equation}
From equation (06) we conclude that :

If $\:\color{blue}{\Delta L>0}\:$ then the displacement of point $\:\rm{C}\:$  by $\:\Delta x >0\:$ (that is to the right) gives greater lengths or times, so we must look for smaller lengths by displacements $\:\Delta x <0\:$ (that is to the left).
If $\:\color{blue}{\Delta L<0}\:$ then the displacement of point $\:\rm{C}\:$  by $\:\Delta x >0\:$ (that is to the right) gives smaller lengths or times, so we must continue displacements to the right in order to minimize the total length.

So we conclude that to minimize the total length, that is the total time, we must reach a condition such that, either moving to the right or to the left, the rate of change of length $\:\Delta L\:$ per displace- ment unit $\:\Delta x\:$ to be infinitesimally zero
\begin{equation}
\bbox [0.5mm, border: 0.8mm solid  blue;]{
\bbox [2mm, border: 0.5mm solid red;]{\:\dfrac{\Delta L}{\Delta x}=\sin\alpha-\sin\beta=0\:\vphantom{\tfrac12^{\tfrac12}_{\tfrac12}}}}
\tag{07}
\end{equation}
deriving the law of reflection : $\:\sin\alpha=\sin\beta\:$.
Equation (07) expressed with differentials is
\begin{equation}
\boxed{\color{blue}{\:\dfrac{\mathrm{d} L}{\mathrm{d} x}=0\:\vphantom{\dfrac12^{\tfrac12}_{\tfrac12}}}}
\tag{08}
\end{equation}

Differential Calculus

Geometry

(1)
You'll find a similar problem to derive the Snell's Law of Refraction without differential calculus (due to Feynman) in my answer therein :Why one should follow Snell's law for shortest time?.
Comment: @ Tajimura : All Figures are produced by the free GeoGebra software.
Comment: May I know what did u use to make your figures? (esp. Fig.01 and Fig.02)
Answer: dL/dx means the rate at which the length (L) is changing as the position of the point of reflection (x) changes. To apply Fermat's principle you want to minimise L (Since the speed of light is constant, to minimise time you must minimise distance.)
Now imagine drawing a graph. Put x on the horizontal axis and L on the vertical axis. For any value of x you can work out, and plot a value of L. The graph looks roughly like a letter "U", since at a value of x in the middle, the value of L is minimised. The gradient at the minimum point is zero.
For small values of x, increasing x causes L to become smaller, so for small values of x dL/dx is negative. For larger values of x, increasing x causes L to increase, dL/dx is positive.  At the minimum point dL/dx changes from positive to negative, so at the minimum point dL/dx is equal to zero.
You can therefore find the value of x by calculating an expression for dL/dx and then solving dL/dx = 0.

Question about Fermat's principle


Connecting time minimum Newark International

Question: I'm flying in March on United coming in from Milan, Italy. I arrive at 2:15 pm and have to connect to a flight to St. Louis leaving at 4:00 pm, operated by Express Jet. We are US citizens. What are the chances this will end well? I really do not want to spend the night in Newark and incur the extra stress and cost. However, the next flight to STL is at 8:00 pm which makes for a miserably long day.
Any insight very much appreciated!
Comment: Is this is one booking? If it is, the airline will pay everything for you in case of a missed connection
Answer: My prediction is that you won't have a problem. Newark has three terminals, all connected by a monorail system that runs pretty reliably. In early afternoon, immigration and customs lines won't be at their peak. My estimate is that it will take you no more than half an hour to get through the immigration checkpoint and collect your bags.
Once you've got your bags, you'll be at the domestic terminal in 10 minutes. That gives you an hour to check your bags again and get through security.
If this is a weekday, I'd say you're guaranteed to make your flight. If you're flying on a Friday or Sunday things might be tighter, but that still seems like an adequate layover.
Comment: I'm fairly sure EWR has a place to re-check bags after clearing customs without carrying them to the domestic terminal. This also means you can go straight to security for the domestic terminal.


Output SDL to TFT screen from console

Question: I'm trying to make a SDL program (fastdosbox) output to an adafruit TFT screen. The screen is fb1. In the console I tried typing SDL_FBDEV=/dev/fb1 but it still outputs to the HDMI screen. If I startx and then load fastdosbox, it will work, but it's not useable with all the other stuff on the screen and I'd like to run it directly from the console. Any idea how to make this work?
Answer: You can try to use a tool called fbcopy that will duplicate on the TFT what's being sent to HDMI.
Here is a working tutorial on How to mirror/copy the HDMI output to the display.

Output SDL to TFT screen from console


Receiving a bad grade from close professor?

Question: Hello I am doing my masters and I got relatively bad grade from a professor. I am going to do another project with him in this semester. I think I deserve a better grade but the problem is that only way to re-evaluate my report is to make a complaint to study committee or to dean. My professor is a very nice person and he is one of the best in the area may be the best,and our communication is good he even wrote "look forward to seeing you". He was very satisfied with my lab. work but I messed up writing report, because he said that I should not write lots of theory but now one of the evaluation report says I should have write more theory(He is not the only evaluator, there are 2 more sensors who I dont know). It's so sad that I got a bad result, but I also don't want to lose healthy connection with the professor. I am doing my masters one of the best universities in Europe and I want to do Phd after my masters so grade is important for me and also recommendation is important for me. I dont know what to do, do you have any suggestions?
Comment: Why are you questioning the grade?
Comment: @existenceisfutile Why do you feel that you deserve a higher grade? Put another way, what did the professor get wrong then they marked your assignment?
Comment: "I am doing my masters one of the best universities in Europe" - I always wonder  what metric people use to determine that.
Comment: Resistance is not.
Comment: @user2768 It is important for me to apply to Phd programs, I've done 2 times more work than I should for the project, I feel really sad about it. My work is good but the only evaluation criteria is the report.
Comment: @problemofficer One of Oxford, Cambridge, or Imperial, source: https://www.timeshighereducation.com/world-university-rankings/2018/world-ranking
Comment: My suggestion would be to do a great job on the project with him this semester, including the write up.
Answer: It is true that a good grade is worthy (every student wants a nice grade). However, it is not uncommon to score somehow "poorly" while you expect the best result. So, if your results are contrary to your expectations and if you have reason to believe that what you earned is not what you deserve (in the sense of your achievements in exams, presentations, written reports, etc), you may need to take some course of action as per your university's rules and regulations.
I think, a useful first step would be to ask your professor to show you how you have been graded and what you did right and what you did wrong. That would also be a good opportunity to learn from your mistakes (if any). You may also have the opportunity to discover if there were any mistakes on the side of your professor in evaluating (correcting) your report. After talking to your professor, if you are convinced that the grade you got is what you deserve, then you have to accept that and learn from  the things you didn't do well. If, with your discussion with the professor, you find out things necessitating revision of your marks (re-grading), that would be accomplished as per your university's rule. If you still cannot resolve the issue after discussing with your professor, you may follow your university's formal appealing procedures. But when you do so, have a convincing reason for why you are questioning your  grade. How much time you have devoted on the work or the fact that you need a good grade to pursue a PhD, I think, are not reasons strong enough to justify appealing. What is it that you correctly did but for which did not earn the deserved mark? Such things should be at hand. (I feel many things vary from university to university, but this is what I think you could consider).
Comment: +1. I would stress a bit more asking if it is possible to make corrections and resubmit for regrading. Some professors permit this as a matter of course. For others it would be unusual, even impossible. But it is worth asking after taking the other steps suggested in this answer.
Answer: Look for others ways to improve your reporting and at the end show that you have improved this skill from then on. Of course, your professor will also mention this in the recommendation letter, so even if your grade was lower from that course, it will be compensated, I guess.
However, you should be more careful about reporting, really. If you do extremely good work but poor at reporting it well, no one will comprehend the significance of your work and your reputation will not be even half worth of your actual value.
Good planning -> good conduct -> good report.


Functional Programming in PHP

Question: Modern PHP is mostly written Object Oriented. Other than the fact that there is inertia towards the Object Oriented in the PHP community, is there anything about the language itself that would make it a poor idea to use functional programming?
Comment: You can do functional programming *in a limited way* in any language that has functions.  But to get the full benefits of functional programming, the language has to support functional programming as a first-class programming paradigm.
Comment: @RobertHarvey can you explain or point me to a question/answer that addresses that?
Comment: http://www.phptherightway.com/pages/Functional-Programming.html
Comment: @RobertHarvey "PHP supports first-class functions", does this mean that PHP gives the full benefits of functional programming?
Comment: First-class functions are one of the features that functional programming languages have, but there are others.  See https://en.wikipedia.org/wiki/Functional_programming#Concepts
Answer: There's nothing missing from the language itself that would prevent you from doing functional programming.  The only thing missing from the runtime is tail call optimization, and you can actually do quite a bit of FP before hitting that limitation.
What's really going to hurt you if you try to do FP in PHP is lack of library support for it.  You need a fundamentally different collections library, and functional programmers use more semantically precise library functions in many cases where imperative programmers use built-in loops and other language features.  Without that library support, you can technically do FP, but you're going to be reinventing the wheel a lot, and likely not doing what other programmers would recognize as idiomatic FP.
Comment: `...but you're going to be reinventing the wheel a lot, and likely not doing what other programmers would recognize as idiomatic FP.` Reinventing the wheel is right, but I'd imagine an FP programmer would recognize it. In my opinion the real issue is that PHP programmers won't recognize it as idiomatic PHP.

Functional Programming in PHP


Supernatual Stamina + Commander

Question: I've been wondering a seemingly stupid question, can Supernatural Stamina work more than once on a commander card? Instant grants ability to creature, commander is the same creature while changing zones. Could it be a loophole or am I missing something?
Answer: You can not use Supernatural Stamina to return your Commander to the battlefield multiple times.
Whenever a creature leaves the battlefield and returns it is treated as different object. This is covered in the gatherer rulings for Supernatural Stamina:

Supernatural Stamina's effect works only once. If the targeted creature dies and is then returned to the battlefield, it's considered to be a new creature. If that new creature dies, it won't come back a second time.

Additionally, while your Commander is still considered your Commander while changing zones it is still treated as a new object every time it changes zones as covered in the comprehensive rules:

903.3.: Each deck has a legendary creature card designated as its commander. This designation is not a characteristic of the object represented by the card; rather, it is an attribute of the card itself. The card retains this designation even when it changes zones.

and:

400.7.: An object that moves from one zone to another becomes a new object with no memory of, or relation to, its previous existence. There are nine exceptions to this rule:*

*(None of the exceptions apply)
Comment: @ThunderToes The rules say that "Doing so costs that player an additional {2} for each previous time he or she cast that commander from the command zone that game." So since you haven't cast it from the command zone an additional time, the cost doesn't go up. Note that it doesn't count how many times the commander has been in the command zone, but how many times it's been cast from there. Thus, theoretically, if you can find some way to get it into play from the command zone without actually casting it, the cost doesn't go up.
Comment: Note: It's not just the triggered ability the "returned Commander" won't have; it won't have the +2/+0 for the same reason.
Comment: Nit: Technically, one of the exceptions of 400.7 does apply here, at least in the first zone change. 400.7h allows the ability to find the object in the graveyard.
Comment: Additionally I would like to know if this then applies the 2 manna penalty to cast him again? The commander didn't technically hit the command zone again does that mean his cost will be unchanged?
Comment: @Arthur relevant to that would be Derevi or Command Beacon.
Comment: @ikegami RE:Nit, that is true, but I didn't want to complicate things.
Answer: Supernatural Stanima will only protect a creature once; there is nothing different or special about a Commander here.
If you want to use Supernatural Stamina on your commander, then when it is killed; you must choose not to send it to the command zone instead of to the graveyard. If you choose to send it to the command zone, then it will never die, so Supernatural Stanima would do nothing. If you choose not to send it to the command zone, then it will return like any other creature would; but no longer be protected.
From the glossary in the rules:

Dies

A creature "dies" if it is put into a graveyard from the battlefield.

So a commander that goes to your command zone won't have died.

Supernatual Stamina + Commander


How do they put several bitcoins into a block?

Question: I recently read that there is an auction to sell almost 24,000 bitcoins, and that they have put them in blocks, each containing 2000 coins. What does that mean to put 2000 BTCs in a block? Can somebody clarify please?
Comment: potentially helpful: [What is a block?](http://bitcoin.stackexchange.com/q/35699/5406)
Answer: By block they are not referring to the blockchain. They just mean that the 24,518 BTC will be divided into 12 different lots (or blocks) with each auction containing about 2,000 BTC.
https://news.bitcoin.com/ernst-young-auction-24-thousand-btc/
"Ernst & Young will be selling the confiscated cryptocurrency in auction form, allowing bidders to compete for 24 thousand coins in 11 lots of 2,000 BTC. One lot will amount to 2,518 Bitcoins,"
Comment: What don't you get? A "lot" or "block" is just a collection of things that are treated as a unit. If I had thirty cars, I could sell three lots of ten cars. That just means that a buyer is bidding on ten cars at once.
Comment: what do you mean by lots (or blocks) ? i do not get it. they could theoretically send 2000 BTCs to a bitcoin address which they control and then give the private key to the buyer,
Comment: so basically "2000 coins in a block" means probably 2000 coins deposited in at least 1 BTC address, which they have its corresponding private key, and the new owner will get access to these coins. right?


Mixing dry yeast for NEIPA

Question: I have a question did anyone tried to mix Nottingham Ale yeast and Windsor ?
What are the results if you have such an experience?I want to use one pack of each in my NEIPA.I don't have any other yeast around.
Answer: I have not mixed those 2 particular yeasts but I have blended yeasts for previous brews. You basically get 50% of one's charchter and 50% of the others.
If one has a low abv tolerance/attenuation and the other higher then you should use the higher value to calculate the final ABV, and the body you would expect to be left.
Example, 50/50 S-04/US-05:

You get less ester falvour that you would get from 100% S-04.
You get the same thinner crisper body you would expect from US05.
You get the final ABV expected from US05.
Comment: Thank you , I will try to go 50/50 this time.Hope to get body from Windsor and ABV from Notti.
Answer: Just finished my third NEIPA brew with a 50/50 Nottingham / Windsor blend. Not a ton of fruity esters at 68 degrees, but produces a nice flavor for the style. The FG is always a bit lower than Brewsmith predictions for the yeasts. Go for it!
Comment: Thanx man, great to know!

Mixing dry yeast for NEIPA


Computer Won't Turn On When CPU Has Power

Question: The computer worked fine yesterday but today when i tried to start it nothing happened. I tired removing the 4 pin connector that goes to the cpu and the computer starts but i get no picture or post or anything obviously. But it "starts". but Is it a bad power supply or is the motherboard bad?
Comment: Try another PSU.
Answer: This could be a problem with the power supply, the processor, or the motherboard.  The only way to be really sure is to swap components with known working ones.  (It's pretty unlikely to be anything else, for whatever that's worth.)  If you can provide more detail about what exactly the components in the machine are, I could probably speculate as to which component is most likely, at least.
(I assume you reconnected the 4-pin afterwards, just to rule out the possibility that it was loose or something.)


How to Build transaction XDR before sign it

Question: I want to build a transaction and convert that as XDR before sign that transaction. As i found we need to build adn sign the transaction before convert that as XDR specially in java and GO SDK. Is there any way yo build it and convert that as XDR without a single signature.
Answer: I'm just going to guess here, since I don't do golang, but if you look at what Sign does, can't you just copy that implementation yourself, and skip the signing part?
I.e.,
func (b *TransactionBuilder) Sign(signers ...string)
(TransactionEnvelopeBuilder, error) {
    var result TransactionEnvelopeBuilder
    err := result.Mutate(b)
    if err != nil {
        return result, err

    ...
    skip the signing
    ...

    return result, nil
}

So, create a TransactionEnvelopeBuilder, and call it with the TransactionBuilder.
Comment: Maybe the way you mentioned will work when we are building transaction from XDR.
Comment: I tried that earlier but i got this error "tx.Base64 undefined (type *build.TransactionBuilder has no field or method Base64)". that's why i posted the question. I tried TransactionMutator as well but i got the same error message.
Comment: But the TransactionEnvelopeBuilder *has* it, and that's what you're going to call.
Comment: In all the places that i checked, they build the base64 XDR after sign the transaction only. I am still confused how to build a XDR before sign it?
Answer: I have some examples for that in my kotlin library that wraps the java sdk.
data class PreparedTransaction(val transactionHash: String, val transactionEnvelopeXdr: String)

fun preparePaymentTransaction(
    sender: KeyPair,
    receiver: KeyPair,
    amount: TokenAmount,
    asset: Asset = amount.asset ?: nativeXlmAsset,
    memo: String? = null
): PreparedTransaction {
    val txBuilder = Transaction.Builder(server.accounts().account(sender))
        .addOperation(PaymentOperation.Builder(receiver, asset, amount.toString()).build())
    if (StringUtils.isNotBlank(memo)) {
        if (memo!!.toByteArray(StandardCharsets.UTF_8).size > 28) {
            throw IllegalStateException("Memo exceeds limit of 28 bytes")
        }
        txBuilder.addMemo(Memo.text(memo))
    }
    val tx = txBuilder.build()
    val transactionEnvelope = TransactionEnvelope()
    transactionEnvelope.tx = tx.toXdr()
    transactionEnvelope.signatures = arrayOf()
    return PreparedTransaction(tx.hash().toString(StandardCharsets.UTF_8), xdrEncode(transactionEnvelope))
}

This returns a pair of the transaction hash and the base64 xdr for the transaction envelope.
To sign you can decode the xdr, add a signature, and re-export the xdr the same way.
val envelope = Transaction.fromEnvelopeXdr(xdrDecodeString(xdr, TransactionEnvelope::class))
envelope.sign(hash.toByteArray(StandardCharsets.UTF_8))
envelope.sign(alice)

The xdr decode (and a corresponding encode function as well) come from my library as well:
inline fun <reified T : Any> xdrDecodeString(encoded: String, clazz: KClass<T>): T {
    val bytes = Base64.getDecoder().decode(encoded)
    val xdr = XdrDataInputStream(ByteArrayInputStream(bytes))

    val callable = clazz.members.find { it.name == "decode" }
    if (callable != null) {
        val result = callable.call(xdr)
        return clazz.cast(result)
    } else {
        throw IllegalStateException("cannot call decode(XdrDataInputStream)")
    }
}

See full code here


How fast can Ripple transfer money from bank to bank?

Question: I had a debate last night on how fast Ripple is.
If I am moving money from bank account a to bank account b, how long would it take?
I was told by one person that adding a block takes 8 secs. Another person said money can be moved cross border from any bank account to any bank account in 6 secs.
Comment: Does 2 seconds make a difference in your life?
Comment: I think it will vary based on how many intermediaries it passed to reach destination.
Comment: Would it? It seems like the major bottleneck is submitting a transaction to the Ripple network and having all of the gateways include it in a block.
Answer: It will depend on exactly what combination of technologies are being used. If it's ILP and the banks (or market makers) already have payment channels setup, it can be virtually instantaneous. If it's a direct on-ledger payment, it would be about 7 seconds on average. If it's an ILP outer payment that requires both an on-ledger lock up and on-ledger settlement, it can be closer to 15 seconds.
It also depends what you mean by "Ripple". For example, if you mean any bank-to-bank payment using Ripple Connect (the product Ripple sells to banks), that could include payments that uses all kinds of combinations of technologies. For example, if it's an ILP outer payment and the settlement is on the bitcoin block chain, then it can take as long as an hour, because that's how long for payments to be reasonably certain on the bitcoin blockchain.