Is there a term for words that are spelled the same in a foreign language?

Question: Is there a term for words that are spelled identically in a foreign language and have the same meaning (regardless of whether they sound the same)?
Comment: While learning swedish, I had a list of "false friends" - words that spelled and often sounded the same, but meant (slightly) different things. The words meaning the same thing usually are the "same word", often loanwords in at least one, sometimes both of the languages. Those sometimes sound different, because the speakers from the loaning language not necessarily know the language they loaned the word from (in swedish often the word develops a different spelling over time, but there are some still spelled like the original, but sounding different).
Comment: Who exactly would have need of such a word? Would it make any difference if they *sounded* the same too?
Comment: A software developer trying to solve one of the hardest problem in all of software development: *naming things*..
Comment: It does not matter if they sound the same
Comment: What about if one one the languages doesn't normally use the English alphabet? Does *Peking* count? What about *Beijing*?
Comment: Identical spelling down to a letter, so any language that doesn't use latin characters does not have such words with English. There are lots of such words between closely related languages such as Romanian and Italian and Catalan and French.
Comment: I've just realized that it's good enough for my case if the term only includes words of the same etymological origin that are spelled the same (removed that bit from the question).
Comment: Spanish and English share a lot of words in common: *bar, embargo, propaganda, chocolate, marijuana, cigar, patio, color, global, cafeteria, café, culpable, civil, honor, principal, corral, iguana, guerilla, armada, playa, plaza, poncho, mosquito, banana, puma, tilde, loco, fiesta, siesta, macho, tequila, taco, cilantro, piñata, jalapeño, piña colada*. :) Not to mention *Colorado, Florida, Nevada,* et cetera.
Comment: Meanwhile, *I* think it's a better fit for Linguistics.SE or, given his comment, Programmers
Comment: As I said in my (attempted) answer, I think a more detailed question. I also think that, while this may be of interest here, you might be better served elsewhere. You didn't tell us what you've already tried/considered ... did you see these?  //  http://stackoverflow.com/questions/553082/do-you-code-variables-in-your-language/55316  //  http://programmers.stackexchange.com/questions/1483/do-people-in-non-english-speaking-countries-code-in-english/5504  //  http://programmers.stackexchange.com/questions/169981/where-to-find-common-database-abbreviations-in-spanish/170053#170053
Answer: The closest I believe is "cognate" (from Merriam-Webster Online
):
3
a: related by descent from the same ancestral language
b: of a word or morpheme : related by derivation, borrowing, or descent
However, translators must beware of cognates, because the meaning and usage often varies in subtle ways between languages. For instance, "mist" in German" is what farmers put on the field at night, causing a steam (ie a 'mist') to appear above the field the next morning that obscures sight.
Comment: Usually, *cognate* means *words of shared etymology*, but not necessarily spelled, pronounced, or used in the same way. As Wikipedia says, a typical example is [English *starve* and Dutch *sterven* or German *sterben* ("to die")](https://en.wikipedia.org/wiki/Cognate). In OP's case I'd be inclined to just say they are ***the same word***.
Comment: Note however [the phrase "exact cognate"](http://www.sheltonpublicschools.org/subsite/sis/teacher/672/cognates-15662) which seems to narrow the meaning much closer to what the Question asks.
Comment: @FumbleFingers It is true that it refers to words of "shared etymology," but note that words of unshared etymology that sound similar or are spelled the same with different meanings are often called "false cognates." (Point being that cognate is still used)
Comment: As I noted, there is apparently no term *closer* to his intended meaning than 'cognate'.
Answer: http://en.wikipedia.org/wiki/List_of_French_words_and_phrases_used_by_English_speakers
In the above wikipedia article are a list of French words which have retained their original meaning and spelling. As far as I could tell, a single word or expression meaning unmodified foreign words (my definition) which have been adopted into the English language, does not exist.
(Emphasis mine)

This article, however, covers words and phrases that generally entered the lexicon later, [...] As such, they have not lost their character
  as Gallicisms, or words that seem unmistakably foreign and "French" to
  an English speaker. The phrases are given as used in English, and may
  seem correct modern French to English speakers, but may not be
  recognized as such by French speakers as many of them are now defunct
  or have drifted in meaning. A general rule is that, if the word or
  phrase retains French diacritics or is usually printed in italics, it
  has retained its French identity.

A similar list exists for Italian words and phrases, again these words retain their "ethnical" spelling and meaning however, their pronunciation may differ from that of Italian.
On a side note, Loanwords or its equivalent expression lexical borrowing, expresses the concept of foreign words which were adopted and manipulated in the past and today appear and sound native-like. For example the English adjective, handy, was loaned to the German language but means mobile phone consequently "Handy" is a German noun.
EDIT:
In The Cambridge Encyclopedia of Language, (Edition 2010) David Crystal. The author states on p302

When languages have been shown to have a common ancestor, they are
  said to be cognate.
The clearest cases are those where the parent language is known to
  exist. For example, on the basis of the various words for 'father' in
  the Romance languages, it is possible to see how they all derived from
  the Latin word pater.

Examples:

Italian padre; Spanish padre; French père; Portuguese pai; Catalan pare.

on p340, Crystal talks about language changes; sound, grammatical, and semantic. Under the heading of New words and old he makes the following remarks:

In most languages the vast majority of new words are in fact
  borrowings from other languages [...] Borrowing proceeds in all
  directions, Weekend and parking have been borrowed by French from
  English; chic and savoir-faire have been borrowed by English from
  French. Some languages have borrowed so extensively that native words
  are in a minority

In nowhere (could I find) does the esteemed author, David Crystal, mention a linguistic word, phrase or term which means native and foreign words having the same meaning and spelling.
Comment: I believe the only realistic term the OP could use is "borrowed foreign words" but that does not guarantee its spelling is identical to its "parent" language.
Comment: Careful, "handy" is a (slang) noun in English, too.   "Give me a handy" or "How much for a handy?" would get a very different reaction in some places ...   (Although, to go way too far with this - I bet they cover a similar price range.)
Comment: *"Some languages have borrowed so extensively that native words are in a minority"*   Interesting, although it sounds like a stretch.  Does he say which?
Comment: Not in that specific page/section/chapter, he doesn't. It's quite a hefty volume so there might be references elsewhere.
Comment: @hunter2 I've never heard of that expression handy being used that way before. (But I have a good idea what it means!)
Comment: Admittedly, I don't hear it that often; once in a while, and at least once on a fairly popular TV show. Then again, how often *would* it come up? Ahem. // If you come across a more detailed reference at some point, please post it.   I love how many there seem to be in Japanese (and how easy to spot), but it's a very far cry from making a large share of the total vocabulary.
Answer: "Homograph" (almost, sorta) means what you want - two words that are spelled the same.   As a comment points out, you should be careful of words that look the same but have different meanings - what another comment calls "false friends".   "Homograph" does not specifically denote words from different languages, although that may be a finer distinction than you're inclined to make.
Related (but not what you are seeking): "Homonym" is a more commonly used word which, I think, also indicates that the words are pronounced the same.   To round it out, "Homophone" would be 'sound-alike'.
More detail in the question would be nice, but I think (from a comment) might also end with "this is a discussion for Programmers.SE or its chat room".
Comment: OP specifically asks for: words that are spelled *identically* in a *foreign* language and have the **same meaning**. http://en.wikipedia.org/wiki/List_of_English_homographs
Comment: **homographs** plural
Each of two or more words spelled the same but not necessarily pronounced the same and having different meanings and origins (e.g., bow1 and bow2)
Comment: However, on reflection the words are useful to know and the OP might find them "handy" in the future.
Comment: Changed my downvote
Comment: @Mari-LouA Thanks.  I appreciate that you left a comment with it, and I think that my changes based on your comments improved the answer.   The system works! (sometimes ...)


For any integer n greater than 1, $4^n+n^4$ is never a prime number.

Question: For any integer n greater than 1, show that $4^n+n^4$ is never a prime number.
My approach: I tried to use mathematical induction. But somehow couldn't manage to prove it. Is it to be done by induction or can it be done by another method?
Comment: For any even $n$ the proposition is obvious
Comment: cant this be rewritten as $4^{n+\log_4{n^4}}$ and then something about that power? Does that do anything?
Comment: @JohnJPershing $4^{n+\log_4(n^4)} \ne 4^n+n^4$, right?
Comment: @anorton Yeah, thats completely wrong now that i look back. An impulse thought that led to nothing.
Comment: http://math.stackexchange.com/questions/489071/compositeness-of-n44n
Comment: @ByronSchmuland Ah, figured! Of course it had to be a duplicate.
Comment: @AndresCaicedo It's a classic!
Comment: @ByronSchmuland Now I'm curious as to where it originated...
Answer: Hint $ $ If $\,n\,$ is odd then  $\,\color{#c00}{n\!+\!1 = 2k}.\,$ Completing the square yields a difference of squares
$\ \ \ \begin{eqnarray} \overbrace{n^{\large 4}\!+ 2^{\large 2n}}^{{\rm incomplete\ \large \Box}}\!\! &\,=\,& \overbrace{(n^{\large 2}\!+2^{\large \color{#c00}n})^{\large 2}}^{{\rm completed\ \large \Box}}\!-(n2^{\large\color{#c00}k})^{\large\color{#c00} 2}\ \ \text{so, factoring this} \textit{ difference of squares}\\[.4em]
 &\,=\,& (n^{\large 2}\!+2^{\large n}\color{}{\ \,-\,\ n2^{\large k}})\:(n^{\large 2}\!+2^{\large n}\,+\ \color{}{n2^{\large k}})\\
 \end{eqnarray}$
Note $ $ Generally $\ 2ab = c^2\,\Rightarrow\, a^2\!+b^2 = (a\!+\!b)^2\!-c^2 = (a\!+\!b\!-\!c)(a\!+\!b\!+\!c)$
For further examples and generaizations see this answer.
Answer: $4^n + n^4 = (2^n)^2 + (n^2)^2 = (2^n + n^2)^2 - (2^{\frac{n+1}{2}}\cdot n)^2$. From this we use: $A^2 - B^2 = (A - B)(A + B)$ to factor the last expression and this shows it is composite when $n$ is odd. If $n$ is even it is clearly composite.
Answer: This is a nice identity. Try to complete the square: $4^n+n^4=(2^n)^2+(n^2)^2=(2^n+n^2)^2-2\cdot2^n\cdot n^2$.
Now, clearly we may assume that $n$ is odd, else the sum is even and larger than $2$. But if $n$ is odd, then $2\cdot 2^n$ is itself a square, and we can continue: Say $n=2k-1$, then $(2^n+n^2)^2-2\cdot2^n\cdot n^2=(2^n+n^2-2^kn)(2^n+n^2+2^kn)$.
Finally, one just needs to check that neither term in this product is $1$. This is clear for the second term. As for the first, note that $2^n+n^2-2^kn=2^k(2^{k-1}-2k+1)+n^2$, and $2^{k-1}-2k+1\ge0$ if $2^{k-1}+1\ge 2k$, which holds for $k\ge 4$ (as one easily verifies by induction). The remaining cases $k=2,3$ can be checked directly by hand. (Note that $k=1$ corresponds to $n=1$, and $4^1+1^4=5$ is prime.)


Is it possible to do macro photography using canon EOS M100?

Question: Can any lens be used along with an adapter to shoot macro using Canon EOS M100 ? Please guide me regarding this.
Comment: It's possible to do macro photography using any interchangeable lens camera, assuming the proper lenses and/or extension tubes, reverse adapters, etc. are available. Macro is all about the lens, not the camera.
Comment: ALso : [What macro techniques offer an alternative to expensive optics?](https://photo.stackexchange.com/q/9341/15871)
Comment: Related: [What are the biggest differences between Reversal Rings, Extension Tubes and Macro Lenses?](https://photo.stackexchange.com/q/19009/15871) and [Which suits better for hobby usage: extension tubes vs. close-up filter?](https://photo.stackexchange.com/q/511/15871) and [What's the difference between a regular lens and a macro lens?](https://photo.stackexchange.com/q/10569/15871)
Answer: Many years ago, I did macro photography with a Kodak Pony 135 -- fixed lens, scale-focus 35mm. I used close-up filter lenses, a calculated distance setting, a small aperture, and a tape measure. Got some nice images of some tiny flowers around 1973. If you want it, you can do macro with darned near any camera.
If your lenses can be changed, you can use extension tubes or reverse mounting rings to fit your filter diameter and camera body.  Whether they can or not, you can use close-up filters, and you can, if needed, stack those to get still closer to your subject.
Answer: Canon sells an EF-M 28mm f/3.5 Macro IS STM lens that would fit directly on your M100, so, yes, macro photography with that body is definitely possible. The 28mm lens would have a very close working distance, though, so if your intended subject is something that might get spooked by the front element of a lens being just a couple mm away from it, you might be better off with one of the other options (e.g. the EF 100mm f/2.8 Macro USM or EF 100mm f/2.8L Macro IS USM) with an appropriate EF/EF-S to EF-M adapter, or as mentioned in another answer, investigating extension tubes, or lens reversal methods (either the two-lens method or an appropriate lens reversal adapter).
Answer: If only used for macro the only advantage I can consider is with 24MP you can crop somewhat more or print a little piece greater...as far as I concern, the additional powerful range will not help as a gauss you are controlling the lighting.


Do I need to restart a game to access the DLC?

Question: I mean if I need to create a new character or if I can access the DLC content with a previous character (a character I had before buying Ashes of Ariandel).
Comment: 99% sure you can.
Answer: You should not have to create a whole new character to access the DLC.
Here is how you access it:

...proceed to speak to an NPC at the Cathedral of the Deep. Warp to the Cleansing Church Bonfire kneeling beside the altar between the church's large doors. Speak to him and exhaust his dialogue to trigger a cutscene and you are given a piece of the painting at which point you will be transported to the beginning of the DLC.

The Ringed City DLC is also accessible on existing characters after having completed the game's main story line or finishing Ashes of Ariandel.

The Ringed City DLC is accessed by traveling to Kiln of the First Flame, and finding a new bonfire before Soul of Cinder that transports you to the DLC location. There is also a bonfire you can find in the Painted World of Ariandel, in the chapel by Sister Friede.

(Source) (More Sources)
Comment: I accessed it with a previous character like you said, could enter and all but when i entered to the building after the bridge it was a dead end. my character was an end game one, just about to start ng+. Apparently theres a certain point when you cant do more of the dlc content.

I would ask a new question for that but i cant look on wiki for spoilers and dont want to spoil anything to others...


DirectX Tessellation Cracks

Question: I have the following simple patch function in DX11, but I keep getting rips, and when I look at the wireframe its clear that adjacent edges are not getting the same tessellation factor. The CalcTessFactor() function just does a distance from the camera to the point passed, so should always give the same value for the same edge center that I pass in.
PatchTess patchFunction_Far(InputPatch<VertexToPixel_Far, 3> patch, uint patchID : SV_PrimitiveID)
 {
  PatchTess pt;

 // Compute midpoint on edges, and patch center
  float3 e0 = 0.5f*(patch[0].WorldPosition + patch[1].WorldPosition);
  float3 e1 = 0.5f*(patch[1].WorldPosition + patch[2].WorldPosition);
  float3 e2 = 0.5f*(patch[2].WorldPosition + patch[0].WorldPosition);
  float3  c = (patch[0].WorldPosition + patch[1].WorldPosition + patch[2].WorldPosition) / 3.0f;

 pt.EdgeTess[0] = CalcTessFactor(e0);
  pt.EdgeTess[1] = CalcTessFactor(e1);
  pt.EdgeTess[2] = CalcTessFactor(e2);

 pt.InsideTess = CalcTessFactor©;

 return pt;
 }

My patches are triangles.
Is there something I'm doing trivially wrong here (like assuming that EdgeTess[0] is correctly assumed to be edge 0-1, rather than edge 2->0 for instance ? - its a wild guess..
Answer: For the record - the cracks were appearing becasue I got the index of the ptEdgeTess assignment wrong. The correct code is;
pt.EdgeTess[2] = CalcTessFactor(e0);
pt.EdgeTess[0] = CalcTessFactor(e1);
pt.EdgeTess[1] = CalcTessFactor(e2);

DirectX Tessellation Cracks


Why do some weights(dumbbells/barbarbell.. Etc) make our joints pop compared to another equipment with the same weight?

Question: I have noticed that the  dumbbells i use at home make my joints pop even though they have the same weight as the dumbbell i use at gym but different shape,the dumbbells i use at gym have the same weight none of them make my joints pop, what causes this?
Comment: Are you certain that the only variable being changed are the types of dumbbells?
Comment: @C. Lange i will try to calculate the tolerance of the dumbbells when i get home.
Answer: This is kind of vague, but my first thought would be that even if they show the same weight, they are not the same weight.
When weights are made they are made with a tolerance, usually the more expensive brands are +- 1% whereas the cheaper ones can go up to +- 10%> this may not seem like a lot but dumbbells have weights on both sides.. picture a 100 lb dumbbell. 50 lb on each side, one side could have -10% while the other has +10% making one side 45 and the other 55 and it could seem off balanced. Or each side could have a +10% making it 110 lb dumbbell in one hand and 100 in the other.
I would assume your gym, whether they are expensive or not, has dumbbells you use more often and are used to. Then  when you're home and use yours which could weigh more, or even not weigh correctly. CAP is known for having big weight tolerances. Even if your weights are a pounds heavier at home it's still more than your used to.
Some dumbbells also have wider grips. This could be the issue too.
Otherwise if it's not this, then it could be something else as this really isn't a common problem. Your joints should never pop, so either the weights too heavy or you need to go to a physical therapist to get evaluated.
Comment: Taking your word for the tolerance, which seems plausible, the kit sold for gyms is intended to stand up to much more than kit sold for domestic use.  This should  mean tighter tolerances on dimensions and therefore weights.  You may be able to test them at home using a set of scales under one side and a block (of the same height as the scales) under the other.  Positioned the same but rotated 180° the scales should read the same.  Of course comparing the weights of a pair is easier than that]
Comment: Adding on to what Chris H said, you can buy machines plates for barbells or for adjustable dumbbells which have lower tolerances. Cast iron typically has higher tolerances unless it's a premium brand like rogue fitness. Before you buy any plates or dumbbells in the store you can weigh them to make sure they are at least close enough in weight in the pair itself.
Comment: @zheer each brand promises their own tolerance.. but all weights have a tolerance . So if you bought a brand with a +-1% tolerance, that means each plate could differ and weigh 1% more or 1% less from each other even if it's the same brand. Different brands are fine to use actually but some have higher tolerance than others. It could still be the desired weight though.  Its best just to weigh them in the store. Smaller weights aren't necessary because naturally 1 or 5% of 10 pounds is incredibly insignificant
Comment: @Ace Cabbie if i but two plates from the same brand, there won't be any tolerance, am i right?
Comment: Another thought, that only really applies at the light end of the range: some cheap dumbbells aren't even metal, they're sand or cement encased in plastic.  They're still cast but subject to more variation in packing and material composition.  These are likely to have a worse tolerance


Searching childs

Question: I have class A. Class A is responsible for managing the lifetime of B objects and it contains container of B objects that is map<BGuid,B>, and each B object contains container of C objects which is map<CGuid,C>.I have one global A object for the entire application.
I have the following problem:
I have CGuid object and I want to use it to find my C object. But to that I also need to know the BGuid object which will tell me in which B object I should look my C object. But all I have is the CGuid, which means that I have to check every B object to see if it contains my C object. However I think that this is messy.
I thought that maybe I should have another class say M which will contain map of all my C objects , and I can search directly in it just with CGuid, still this means that I need to maintain extra map just for searching.
Also I except in the future my C class to contain map<Dguid,D> so I will have the same problem for the the D objects , this time even worse, I will need Bguid,Cguid, and Dguid to find my D object.
How to solve this problem ?
Comment: What on earth constitutes "finding" an object if not having a pointer to it?
Comment: Just want to say that my guids are the actual pointers to the objects, i.e BGuid is B* and so on. I can't change this.
Comment: Ok, right. I wrote wrong. I have pointer to some other object, not the object itself.
Answer: You have a classic relationship of Parent - Children.
I suggest you to improve your design by not specifying how is handled (i.e. with maps).
use a container to store the childrens, and let the childrens have a pointer to the Parent.
In this way is easy to traverse from any point up to the top.
A useful OOP Design pattern for these cases is the CompositePattern
Answer: Do you have any restrictions on memory? If not, I would maintain the reverse lookup tables (maps), so you need one for C->B, when you add D, you need a second D->C, so if you have C, to locate it correctly, you need one lookup to locate B, then from A you can traverse down with a further two lookups. A lot quicker than iterating through all Bs looking for C!
Another alternative, do you have control over the Guid, if so, you could try encondig the "path" information into the guid. Say for example the B guid is "B.1", "B.2", "B.3" etc. the post fix after '.' separator tells you which B it is. When you add C, you can simple add an extra '.', i.e. C 1's guid is (let's assume it's stored at B 1) = "B.1.1", so now to find the object, you parse the key, and voila you have your "path" to C1.
Answer: map<BGuid,B>, map<CGuid,pair>, map<DGuid,pair<C,D>>
With GUID you get the object and object's parent. With object you get GUID. Recurse from beginning.
Answer: You could assign ranges of the children's GUIDs to every parent GUID. Suppose BGuid is in the interval [0, 9], and CGuid in the interval [0, 99]. You could now map ten CGuids to every BGuid with a function like this:
mapGuids(B): CGuid => BGuid = B % 10

Now you will always know which path to take through the tree.  You will want to keep your tree balanced for better performance when there are many nodes.

Searching childs


clustered index versus index seek

Question: what are the main differences between a clustered index and an index seek?
Answer: A clustered index physically places the indexes on disk in the sorted order so go through them faster. It is best when used to iterate over the indexes in sorted order since the disk seeks will be continuous.
An index seek in simply a way to look for an index. This might be a b+tree, a hash, whatever method an index could be looked up.
It's possible to have an index seek over a clustered index, they are not mutually exclusive.
Comment: clearer might be to say... and index seek is an operation, a clustered index is an object.
Answer: A non-clustered index is a kind of index where each leaf node of the index points to a row in the corresponding table.
A clustered index is a kind of index where each leaf node of the index is the row in the corresponding table. Obviously there can only be one clustered index for any given table (but there doesn't have to be one).
An index seek is a method of looking for rows in a table where an index is consulted, individual pointers to individual rows are found, and only the pages containing the corresponding rows are loaded into memory. An index seek is an efficient method of looking up rows in a query if the number of rows expected is small, and if they tend to be clustered together on a few pages instead of being spread out across all the pages in a table.

clustered index versus index seek


Is there a way to customize the Game-view Editor GUI?

Question: I need to add a simple slider like scale slider in Game-view to change the timescale because I usually test my games by changing timescale.
Answer: Simple answer would be no, you can't. This is done in this internal class (In the 'DoToolbarGUI' private method to be precise), meaning you can't just overwrite it easily. See also this question if you still want to try to do that.
The best alternative that I can come up with, is a custom editor window that you can dock somewhere on a fixed place below the Game window or hierarchy window, so you can alter this setting (And perhaps other settings) from there like so:
public class ExampleWindow : EditorWindow
{
    public ExampleWindow()
    {
        minSize = new Vector2(100, 16);
    }

    [MenuItem("Window/ExampleWindow")]
    public static void ShowWindow()
    {
        GetWindow(typeof(ExampleWindow));
    }

    void OnGUI()
    {
        Time.timeScale = EditorGUILayout.Slider("Speed", Time.timeScale, 1, 10, GUILayout.ExpandWidth(false));
    }
}

If the window above is docked below the Game window, it would look like this:

EDIT
By looking a bit more at my custom window, I found a way to get it to look exactly like you want it to, it is however a bit cheating, as I'm just setting the position of my custom window on top of that bar basically...
public class ExampleWindow : EditorWindow
{
    private static ExampleWindow _instance;

    public ExampleWindow()
    {
        _instance = this;
        minSize = new Vector2(100, 16);
    }

    [MenuItem("Window/SettingsWindow")]
    public static void ShowWindow()
    {
        if (_instance == null)
        {
            ExampleWindow window = ScriptableObject.CreateInstance<ExampleWindow>();
            window.ShowPopup();
        }
        else
        {
            _instance.Close(); // Close existing window instead of opening it
        }
    }

    private void Update()
    {
        System.Type T = System.Type.GetType("UnityEditor.GameView,UnityEditor");

        var window = EditorWindow.focusedWindow;
        if (window?.GetType() == T)
        {
            Rect gameRect = window.position;

            // Set our position to the free space of the toolbar, you might need to alter this to be more exact as I just made some quick hardcoded guess here.
            float leftOffset = 500;
            float rightOffset = 315;
            float width = gameRect.width - leftOffset - rightOffset;

            position = new Rect(gameRect.x + leftOffset, gameRect.y + 19, width, 16);
        }

        //Close(); // Uncomment to force close all open windows (Don't forget to re-comment after they are closed)
    }

    void OnGUI()
    {
        GUILayout.BeginHorizontal(EditorStyles.toolbar);
        Time.timeScale = EditorGUILayout.Slider("Speed", Time.timeScale, 1, 10);
        GUILayout.EndHorizontal();
    }
}

After you initially open this window, click the game view to automatically move it into the correct place. Same applies when you resize the game view. The reason you need to do this is because I can't find a way to get a reference to the GameView without opening it. Meaning I can only get it by checking if the focussed window is the gameview.
Result looks like this for me:
Comment: I know how to make custom windows, I like to add this slider to unity's game view.is there a way to inherit from that class as a new window and add this slider?
Comment: No, as mentioned, this class is internal, the method that you would want to overwrite is not virtual and private aswell. Follow the link to that other question if you still wan't to try and overwrite it. I haven't tried to do that, as it is complicated and a lot of work for something that is not worth the time investement in my opinion. Especially as it could break in a new version of Unity.

I did however try something else by exploiting my custom window, I'll update my original answer.
Comment: ok, no problem I hope unity will be open source. I used window [here](https://user-images.githubusercontent.com/16706911/66992611-fb391300-f0d6-11e9-81ef-34774ebfc4ac.png) thanks for spending time to answer me
Comment: Added the other way to get it to look like you want to, there is probably still some work to do to get it to work exactly like how you want it to, as I haven't tested it that much. But this should give you an idea on how you can get it to work. Note however that to get it to look like this, I use the popup display, which doesn't have a way to close the window, so you'd have to do that yourself via code :D
Comment: thanks troien, this is really cool! but have many problems :) [image](https://user-images.githubusercontent.com/16706911/67008593-b1602500-f0f6-11e9-8169-9db096d2bf43.png)
Comment: Hmm... I can't reproduce that error (the image also doesn't show the stack trace)... You also have 2 windows open at the same time it seems. Although I still can't reproduce your error with 2 windows open. I'll update my answer again to make sure I include a way of closing the window in case ppl try this code :)
Answer: I made a custom toolbar.
I uploaded it in my github
Comment: @troien I make this possible :D


Moving SharePoint (MOSS 2007) Sites

Question: I have a site collection with the following structure:

Sales Dept Site (site collection top-level site)

Sales Dept Sub-Site 1
Sales Dept Sub-Site 2

We now have a need to insert a new top-level site so that the new structure will look like the following:

Sales Public Site (site collection top-level site)

Sales Dept Site

Sales Dept Sub-Site 1
Sales Dept Sub-Site 2

So, I need to shove all the existing content down a level and insert a new content at the site collecteion top-level site.
What is the best approach to accomplish this?  My thought is to create a new site collection with the top-level site created as I need it (Sales Public Site).  I can then export the content of the Sales Dept Site and import it into the new site collection as a sub-site.
Comment: Is this a Publishing site or Collaboration site?
Answer: You can move entire sites via the 'Manage Content And Structure' from the 'Site Actions' menu on the top level site, so there is no need to export and import sites.
Follow this guide for getting access to the 'Manage Content And Structure' if it doesn't exist in the 'Site Actions' menu.
Comment: I don't think I can move the content from the top-level site in a site collection using the "Manage Content and Structure" screen. I agree that would be the best way.
Answer: That approach should work. The easiest method is to export a site template, but that does have a fairly small size limit. For larger sites you may be able to get something working with the content deployment wizard.
Of course any customization of the site that assumes the current structure can't be guaranteed to continue to work. Is it an option to simply change the url and navigation to look like a part of the main site?
Comment: In this case, the site will be too large to export. Thanks.
Answer: You approach is the right one. However if you are using MOSS you should use use Manage Content and structure feature instead of exporting sites. This feature allows you to move your sites and restructure your collection. Learn more...
If you created your site collection as pure collaboration site you will have to activate SharePoint standard Publishing features on the top level site to enable this option.
Please note: This feature is not available in WSS.

Moving SharePoint (MOSS 2007) Sites


QGIS Print layout map coordinate works wierdly

Question: I set the coordinate as usual in QGIS, with coordinate grids. But the output has all the coordinates stacked at edges.
Answer: You have CRS in composer = EPSG:3857 (projection Web Mercator) which has units in meters, not degrees. So if you would like to have your coordinate grid with interval = 1° you have to set Geographic coordinate system (e.g. EPSG:4326 (WGS 84)), not projected coordinate systems.
Here you can read more about differences between a geographic coordinate system and a projected coordinate system


Is it possible to add a Table of Contents to a CBZ file?

Question: Like the title says, is it possible to add something like a Table of Contents to a <code>.cbz</code> file, maybe as an additional text file used to better navigate the content? And if it is, how should it be structured?
Answer: Since the CBZ format is not standardised, there are some pitfalls if you try to achieve this.
The best you can do is render the ToC as an image and add it at the front of list of image files contained in the CBZ.
Adding an extra file with the ToC information might break existing readers, if that ToC is not an image file.
An alternative is to load the data in the file comment of the CBZ file. This is limited in size (64K IIRC). There is an effort for metadata in CBZ this way (using JSON) that you could piggy-back on.
Disadvantage of a metadata solution is that there are no tools that currently display that information.
A bigger problem might be to get the information that you want to put into the ToC. Contrary to analysing the text of EPUB files after they are generated, the individual images of a CBZ have little to form the basis of a ToC.
Comment: Thanks,but that's not really what I'm looking for. Both the metadata and the image won't be useful to navigate it from any reader.
Comment: @Sekhemty, so what reader are you using? Does is support some kind of ToC already?
Comment: I'm using a Kobo Glo and Okular (KDE document reader), and they support, as any other reader that I'm aware of, TOCs for PDF, EPUB, MOBI, and so on. But given that a comic archive is a different kind of file, I was curious if if it could support this feature too.
Answer: Yes, but not directly.
You can name each image file with a specific name-description (ex."Story-A", "Story-B" etc).
You can see this "table of contents"(TOC) in some -but not all- cbz viewers, Pocketbook reader supports it.
The "TOC" contents are displayed in alphabetical order and for all files with no exception, so you should name them as: Story-A-1, Story-A-2, Story-A-3 , Story-B1, Story-B2 etc.
Another option is to convert the cbz file to PDF or epub and then add a real TOC to it.


Why did Google make Chromium Open Source?

Question: This question really baffles me. What advantage does making it Open Source bring? Aren't they worried someone can learn the secrets in their code and make a competing version of chrome?
Comment: While most answers here are about "Google doesn't want to 'sell' Chrome", even they would want to, they could've open sourced it for their own gain!  Most companies have realised that open source (in contrast to free software) is, honestly, not so much about donating altruistically, but simply a business model.  Especially if you are a big corporation, even if someone would fork your code to create competition, you still simply have a better lever and they usually end up with a product that's actually dominated and defined by what you do, rather their own.
Comment: @ljrk _"open source (in contrast to free software)"_ - [Free software](https://www.gnu.org/philosophy/free-sw.en.html) and [Open Source software](https://opensource.org/osd) are [virtually the same thing](https://opensource.stackexchange.com/questions/310/is-open-source-software-a-subset-of-free-software/383).
Comment: @marcelm It's unfortunate the accepted answer is not really accurate (and also not the most upvoted one, despite being the first presented!).  Quoting the OSI is just quoting one side, a side that is heavily biased.  The term "open source" was presented to the world in a conference organised by O'Reilly and ESR who both didn't like the "philosophical" approach to **free software** and sought to effectively replace it with a "company friendly" label, namely, opensource. Stallman was not invited, despite him definitely being a big figure about that topic (as much as I don't like him).
Comment: @marcelm - I'm not sure where you're getting the idea that ESR was meant to be "the other side" from OSI. He isn't. He's on the OSI side. The other side is the GNU Foundation and Stallman, who vehemently disagree with any suggestion that Free Software and Open Source are the same thing, or even that they're close.
Comment: Could we please not rehash the *open source* vs. *free software* debate in this comments field?   **On this site**, [we use the OSI definition](https://opensource.stackexchange.com/help/on-topic) of the former, so on this site the two terms are usually interchangeable.  This is not the place to reopen any of that debate.
Comment: @marcelm absolutely not, and I think ljrk's point is extremely relevant here: even though Chromium is open source, it's such a huge and dynamic project that users are effectively unable to exercise the four freedoms[1] in practice; they're tied to updates and changes that Google makes. [1] http://www.gnu.org/philosophy/free-sw.html (Edit: in fact, ljrk could turn that into an answer. It takes so many resources to maintain, and Google controls so many web practices, that the risk of competition forking it is small. Google has its cake and eats it too.)
Comment: @ljrk _"... OSI is just quoting one side, a side that is heavily biased. The term "open source" was presented to the world in a conference organised by O'Reilly and ESR ..."_ - I'm not sure what your point is; [ESR is one of the founders of the OSI](https://opensource.org/history#:~:text=OSI%20was%20jointly%20founded%20by%20Eric%20Raymond), so I'd argue that ESR's definition of "Open Source" matches that of the OSI.
Comment: The only mainstream browser not using Chromium under the hood these days is Firefox.  I would say that is a huge success for Google!
Comment: I guess it's similar to [Google open-sourcing Android](https://opensource.stackexchange.com/q/9820/282)?
Comment: A possible answer - I don't know if this is true - is if top developers preferred to work on open-source rather than proprietary projects, then Google would be able to hire better developers for the project.
Comment: @marcelm Precisely, he founded the OSI to promote the term "open source" as a replacement for the "company unfriendly" "free software".  You can agree with ESR or not, but it's clear that the answer whether both things are the same or not is heavily debated
Comment: Why is anything free!? Take that as a broad question.
Answer: Companies produce open source software for a variety of reasons, including marketing and developer relations. But I don't want to speculate. Instead, I want to point out three aspects:

Browsers don't have any secrets that must be protected.
Chromium is derived from a tradition of open source components.
Google benefits from the reach and impact that open source enables.

When Google created Chrome/Chromium, they didn't start from scratch. Building browser engines is expensive! Instead, they looked at the market situation at the time (2008):

Internet Explorer had won the first browser war (late 90s) and had about 70% market share, but was somewhat stagnant since then. Google depends on the web to sell ads, but IE wasn't a very attractive portal to the web.
Firefox was an open source browser that had about 25% market share. The Firefox code was based on the Netscape browser which had lost the first browser war – but was then open-sourced in an experiment: a bet that working together was better than working against each other. While FF could never match IE's popularity (because it didn't come pre-installed on Windows), it was the browser of choice for anyone who had a choice. But Google didn't want to bet the future of their company on another organization's browser.
The remaining market share was split between Opera and Safari. Safari was based on the WebKit rendering engine, which had recently been open-sourced.

WebKit was actually a fork of the KDE project's KHTML browser engine. There was some collaboration between WebKit and KHTML but at some point Apple found it easier to completely open-source their code: working together is easier. After all, Apple was not in the business of making browser engines but in the business of selling devices that need a pre-installed browser.
Google created Chromium by taking the open-source WebKit and combining it with their more advanced V8 JavaScript engine, which made client-side web applications more feasible. (V8 wasn't completely written from scratch, but some parts were based on Strongtalk which also formed the basis of the OpenJDK/HotSpot Java Virtual Machine). The name "Chrome" is a reference to the fairly minimal user interface Google added around WebKit and V8.
There wasn't any proprietary magic in Chromium that was worth keeping secret. V8 might have been such a thing, but Google didn't need a better engine for themselves, they needed a better web for themselves: a medium to sell ads through. This was a "platform play".
In their release announcement, the Chromium team explains their reason for publishing the code under a permissive BSD license.

Primarily it's because one of the fundamental goals of the Chromium project is to help drive the web forward. Open source projects like Firefox and WebKit have led the way in defining the next generation of web technologies and standards, and we felt the best way we could help was to follow suit, and be as open as we could. To be clear, improving the web in this way also has some clear benefits for us as a company. With a richer set of APIs we can build more interesting apps allowing people to do more online. The more people do online, the more they can use our services. […]
We believe that open source works not only because it allows people to join us and improve our products, but also (and more importantly) because it means other projects are able to use the code we've developed.

Note the mention of Firefox and WebKit but not Internet Explorer, which was perceived as holding the web back. The innovators in the space were open source, so Chromium also went open source. This openness helped the new browser gain rapid adoption with technology enthusiasts and later with the mainstream. This openness (paired with Google's deep pockets) helped Google become a heavyweight in shaping the future direction of the web. By becoming a major browser maker, they could help new technologies gain acceptance by implementing them themselves.
They didn't have to become the biggest browser for this to be successful, they just needed the web as a whole to become more attractive. Their decision to open-source V8 led to one such effect: the NodeJS system was built on V8, which is now one of the most popular environments for building backends for web apps. Node also helped with many important web technologies such as Websockets, and helped JavaScript to become a more attractive language. The web has become so attractive as a development environment that it is even displacing native apps, e.g. Electron is based on Chromium.
Ultimately, Chrome did become the biggest browser, and with this some things changed. E.g. Google forked Blink from the WebKit engine so that they no longer had to think about compatibility with Apple. But Chromium/Blink is still open source and this is very good for Google. Aside from Firefox and Safari, all other browsers have switched to Blink, including Microsoft's Edge. This gives Google an insane amount of leverage. When Google implements a browser feature that makes the web more attractive, nearly all browsers benefit directly and Google's web-based services become even more attractive.
Of course Google's current level of influence also has drawbacks. E.g. they recently weakened the capabilities of ad-blocking addons (ostensibly for performance reasons, but Google is an ad company). This isn't always good for users. They are also so dominant that they don't have to stick to the web standards process but can just implement features directly – such proprietary extensions are reminiscent of Internet Explorer at the height of its popularity. But unlike IE they are still largely open source. Downstream browser makers can either take the features, or expend the effort of maintaining a forked version. Maintaining a diverging version is not really an economically viable option, thus being open source helps Google exert control over most competing browsers.
Comment: @user1034912 That's an extremely rose-tinted summary. It would be equally valid to say that Google wanted to _control_ the Web, by _exerting influence_ over all other browsers. The truth probably lies somewhere in the middle. Progress in the web would have happened without them, but it's impossible to say whether it would have been better or worse for most of us; all Google care about is that it might have been worse _for them_.
Comment: *Browsers don't have any secrets that must be protected.* At the risk of nitpicking, this isn't quite true. Content Decryption Modules for 'EME' DRM are required to be proprietary/closed/non-Free software.
Comment: Well answered! In sum.... Google wanted to progress the Web (by standardizing browsers). A progress in the Web is a progress for a google. Kudos Google for this. The more you give, the more you get!
Comment: This answer doesn't clearly layout the main reason for the creation of Chrome. You need to realise that for the big companies everything is about big business. Google created Chrome to get more people using the web. Google effectively is "the web company", meaning they profit from huge numbers of people using the web (through advertisements, as you rightly mention). Horace Dediu does a good job explaining Google's business model (http://www.asymco.com/2013/04/10/making-rain/). Releasing Chrome is inline with this goal from a business perspective.
Answer: Google is broadly not in the business of selling copies of software. Google is in the business of offering Internet and Web services, most often accessed through a browser.
The overwhelming dominance of Chromium clones that you suggest in your question has already happened: Opera, Edge, and Chrome are all Chromium-based. Firefox and Safari are the only major holdouts not relying on Chromium. There could scarcely be better news for Google:

Any improvements made by Microsoft or Opera are usable by Google. The permissive license of Chromium means competitor are not required to share their changes, but it is generally a huge pain for downstream modifiers to keep patch-sets private and much easier to push them back the upstream project. Also, Microsoft and Google both realize they have much more to gain by open cooperation on a sidecar piece of software like a browser than doing the same duplicated work independently.

It is much easier for Google to maintain their web services, because they have fewer browser to support. If there were only one brand of browser in existence, Google could focus on a single version of their services, instead of one for each browser.

It is easier for Google to have their service require (or only be efficient on) Chromium-based browsers, the development of which Google can control directly or indirectly. They can afford to lose holdouts still using Firefox/Safari or (even better) convert them to Chromium users instead, because their need to use Google services outweighs their desire to use Firefox.
Comment: "Commoditize your complements" is the business phrase for this, I think.
Comment: @Riking Apparently, [that's a Spolskyism](https://www.gwern.net/Complement), rather than a broadly-known term. In context, the meaning is clear enough, however.
Comment: Google is in the business of *selling ads*. **Everything** else they do is for selling ads.
Comment: "It is much easier to maintain web services, because they have fewer browser to support." Not sure I agree. The modern JavaScript toolchain pretty much makes this a non-issue.
Answer: By making Chromium open source, Google succeeded in turning almost all competing browsers into rebranded copies of Chrome and getting to set all the baseline behavior/policy that would go into them. This would not have happened if it were not open source (either by virtue of not having source available, or not being licensed as open source, or both). It's not clear whether independently developed browsers would have continued to thrive or not in this alternate timeline, but even if not, it's likely that Google would have gotten the same kind of hatred Microsoft got for Internet Explorer back in the day when it was a thing; as it stands, they're instead getting prasie for destroying the competition and creating a browser monoculture.
Comment: I don't think that's what standardizing means.
Comment: Yes, standardising web browsers was the game! Smart move!
Answer: To add to amon's very good answer:
Important trick for vendor is to force whatever the competitors are making into a commodity (Joel Spolsky called that "commoditize a products' complements"). If your competitor's product is a commodity, the buy decision is made mostly  on a price. And free is unbeatable price.
This is what Microsoft did with PC: make PC a commodity to run Windows software like Office (and in this way, destroying IBM PC business). And this is why IBM in return invested so much in Linux: to make server OS a commodity, and to make profit on services on top of it.
If Google makes the browser a commodity, provided for free, it can focus on harvesting personal info to sell more ads.
Comment: I took the liberty to link to Spolsky's article, which elaborates your point. Hope you don't mind.
Comment: @sleske  thanks for the link


Method of performing Panchopachār Pūjā

Question: Panchopachār pūjā is performed by using 5 different substances. What is the Method of performing Panchopachār Pūjā?
Answer: The Pancha Upacharas are Gandha,Dhoopa,Deepa,Pushpa & Naivedya.
Gandham-Sandal paste,Haridra Kumkumam,other scented objects come under this category.
Dhoopam-Lighted Incense Sticks.
Deepam-Lighted Ghee/Oil Lamps.
Pushpam-Flowers.
Naivedyam-Food offerings(like fruits,milk,sweets or cooked permissible foods).
These 5 Upacharas are offered to Gods along with chanting of few Mantras typically of the following form:
Om Bhur Bhuvah Swaha (salutations to God) Gandham dharaayami(or samarpayami),Dhoopam Aghrapayami(or samarpayami),Deepam Darsayami(or samarpayami) etc.
See the screenshot(a typical form of the Mantra used) below:

To be specific,suppose ,you are doing a Ganapaty Puja.
Then the 5 corresponding Mantras for offering the Panchopacharas will be:

Om Bhur Bhuvah Swaha Sri Mahaganapataye Namaha Gandham Dharayami(I am
  offering You Gandham)
Om Bhur Bhuvah Swaha Sri Mahaganapataye Namaha Dhoopam Aghrapayami(I
  am offering lighted Incense )
Om Bhur Bhuvah Swaha Sri Mahaganapataye Namaha Deepam Darsayami(I am
  waving/showing/offering lighted lamps).
Om Bhur Bhuvah Swaha Sri Mahaganapataye Namaha Puspaihi Pujayami(or
  Pushpam samarpayami)(I am worshiping with flowers or offering flowers)
Om Bhur Bhuvah Swaha Sri Mahaganapataye Namaha Naivedyam Nivedayami(I
  am offering food items)

With these 5 simple Mantras one is supposed to offer the Pancha Upacharas to Deity.
For example,chant the Mantra given above for Gandham while offering Sandal Paste and so on.
NOTE 1-If you are doing a Shiva Puja then just replace the "Sri Mahaganapataye Namaha" portion in above Mantras with "Sambaparameswaraya Namaha".Similarly For Vishnu Puja use "Mahavishnave Namaha" instead.
NOTE 2-Before offering Gods these 5 Upacharas, Dhyanam (meditating upon the Deity) & Avahanam(Invoking the Divine presence) are also to be done.There are specific Mantras for that purpose.
Source1.Source2
Answer: Applying gandha (Sandalwood paste) & haldī (Turmeric) – kumkum (Vermillion) to the Deity

Apply gandha to the Deity with the ring finger of the right hand.
  Then, offer haldī-kumkum at the Deity's feet by taking a pinch of each
  between the thumb and ring finger of the right hand. First offer haldī
  and then offer kumkum.

Offering patrī and flowers to the Deity

Do not offer artificial flowers (made out of paper or plastic or    decorative flowers) to a Deity. Fresh and sāttvik flowers should be
  offered to Deities.
Do not smell the flowers and patrī that are to be offered to the    Deity.
Patrī should be offered before offering the flowers.
Offer leaves and flowers to a Deity that attracts the Principle of    the Deity to the maximum extent. For example, bēl (Leaves of Aegle
  marmelos tree) to Deity Shiva and durvā and a red flower to Shrī
  Ganapati. While offering durvā to the Idol of Shrī Ganapati, cover
  the entire body with durvā except the face. Durvā offered to Shrī
  Ganapati are changed thrice a day. For this reason, pūjā of Shrī
  Ganapati is performed thrice a day.
Specific Deities must be offered a specific number of flowers and    that too arranged in a specific pattern. For example, Shrī Ganapati
  should be offered 8 flowers in rhomboid shape, and Deity Hanumān
  should be offered five flowers in elliptical shape. Ensure that these
  flowers are not placed in an uneven manner.
When offering flowers to the Deities placed in the temple at home,    recite the Name of the Upāsyadēvatā (Deity of worship) and then begin
  by offering small flowers of dark colour first, followed by
  medium-size lighter colour flowers and last, offer big white flowers.
  In a conical arrangement of Deities, only upon offering flowers to
  Shrī Ganapati placed at the apex of the cone, proceed to the next
  stage; in the second stage, offer flowers to other superior Male
  Deities. Thereafter, offer flowers to the Female counterpart of the
  Male Deity followed by the Deity's sub-forms.
Flowers should be offered at the Deity's feet instead of on the head.
While offering a flower, the stalk should be towards the Deity.

Waving lit dhoop or lit incense-stick in front of the Deity

Do not disperse smoke emitting from dhoop with the hands.
After waving the dhoop, wave incense-sticks of a specific fragrance    in front of the Deity, which attracts the respective Deity's
  Principle to a greater extent. For example, wave heena (A kind of
  herb) incense-sticks to Deity Shiva and rose incense-sticks to Shrī
  Lakshmī.
The number of incense-sticks required for waving in front of the    Deity: In general, a seeker in the initial stage of Shakti worship
  should wave five incense-sticks, those who perform pūjā as part of
  their duty should wave two incense-sticks and a seeker who performs
  upāsanā with bhāv (Spiritual emotion) and devotion should wave one
  incense-stick. The incense-sticks should be waved thrice in front of
  the Deity.
While waving dhoop or incense-sticks in front of the Deity, sound the    bell with the left hand.

Waving a lit lamp in front of the Deity

A lit lamp should be waved clockwise in front of the Deity thrice,    while simultaneously ringing the bell with the left hand.
Points to be remembered when lighting a lamp
Do not use a lit lamp to light another lamp.
An oil lamp should not be used to light a ghee
Change the wick of the lamp placed in the temple at home daily.

Offering Naivēdya to a Deity

While preparing Naivēdya, less amount of red chilli powder, salt and oil should be used; sāttvik substances such as ghee (Clarified
  butter) should be used in ample quantity.
Banana leaf should be used for offering Naivēdya.
Salt should not be served on the leaf prepared for Naivēdya to a Deity.
Keep the leaf (on which the Naivēdya has been served) covered.
When offering Naivēdya, first pray to the Ishtadēvatā and draw a mandal (Circle or protective sheath) on the floor in front of the
  Deity. Then place the banana leaf (or plate) containing Naivēdya on
  this mandal with the stalk of the leaf towards the Deity and the tip
  of the leaf towards yourself.
While offering Naivēdya, water should be sprinkled clockwise around the banana leaf or the plate only once (this act is known as drawing a
  mandal). Water should not be sprinkled anticlockwise again.
The act of offering Naivēdya to a Deity

Different acts to be performed after completion of the Pūjā

Lighting a karpūr-deep (Camphor lamp): Although the upachār of lighting a karpūr-deep is not included in Panchopachār pūjā, yet due
  to the sāttviktā of camphor, this act imparts greater sāttviktā.
  Hence, after offering Naivēdya, karpūr-deep can be lit.
Sound the conch and perform Āratī of the Deity with bhāv.
After imbibing the Āratī, apply Vibhūti (Holy ash) from the origin of the nose to the mid-brow region.
Drink Tīrtha (Sacred liquid) thrice. Take Tīrtha in the middle of the right palm and drink it. Then, after touching the middle of the
  palm with the tip of the middle finger and ring finger, touch the eyes
  with these fingers. Rub these fingers lightly from the forehead to the
  head in the upward direction.
In the end, partake Prasād (Holy sacrament) and wash your hands.

Source

Method of performing Panchopachār Pūjā


Is there a way to clone an existing VM on an ESXi server without having to re-import it?

Question: I have imported a VM into an ESXi server using the VMware "Converter stand alone utility".  However, this process is a little tedious.  Since I eventually want several copies of this VM (or, to be more accurate, several more-or-less identical instances of this VM) to be running at the same time, is there a way to clone the already imported VM?  Or do I have to re-import for each instance I want?
Comment: Update: I have a 12 GB VM, importing to the ESXi server.  Doing a straight import: 15 minutes.  Using the Converter Stand Alone to clone from the ESXi server back to itself: 1 hour 15 minutes.
Comment: Copying with cp, as per below: ran for about 15 minutes, but I couldn't get the resulting VM to start properly.
Answer: No need to use the converter to clone a VM.
Simply browse to the datastore:

Click on the host > Configuration tab
Select Hardware > Storage to display the datastores
Right-click on the datastore with the VM you want to clone > Browse Datastore
Create a new folder in the store
Right click on the VM folder and select Copy (must be done in the right pane of the Datastore Browser)
Paste the VM to a new sub folder (otherwise the VM will overwrite itself)
Once copied, rename and move the folder if desired
Select the .vmx file within the cloned VM and select 'Add to Inventory'
Comment: I tried this method out and, while it was a successful and interesting evolution, it turned out to be at least 2x *slower* than just using the standalone converter on a powered off VM. I also found it to be slightly fiddly, taking more clicks/typing than using the "copy as new..." functionality in converter. I am using an NFS datastore served by Nexenta and it's bandwidth constrained
Comment: Does this method allow you to copy while the vm is powered on?
Comment: Perhaps not. I just tried copying a running VM folder from the HDD store to my NFS store and got several errors. I suppose I better wait until I can take the vm down.
Comment: if you do this, wouldn't the vmx still reference the disk in the other folder?
Answer: Actually it's easier to just goto the host machine in VIC under summary tab and browse the datastore.  Then create a folder for the new vm, copy the vmdk file from your source vm by copy and paste within the datastore browser and then create a custom VM for the new vmdk file.  Make sure your VM and folder names match and it takes 1/10th of the time to do.
Example for me was:
7gig VM:

Converter: 13mins
Direct: 3mins
Copy via Datastore browser: 1min

I made copies of 17 VM's in Under 20 mins which saved a ton of time from converter.
Answer: [Editing my own answer]
Summary:

the Converter took me about 15 minutes to run from WS6 to ESXi
the Converter took about 45 minutes to run from ESXi to itself
logging in with a command prompt and then copying as per the "unsupported" instructions worked, but took about 20 minutes to copy the VM, and I was unable to correctly start the result

My conclusion: just use the Converter repeatedly.
Thanks all for the ideas.
(Update, much later: here are the details for how to create a copy of a VM without running the converter repeatedly.)
Comment: Unfortunately Converter is not being updated for Linux platform and the latest version 4.0.1 is not able to convert current versions of virtual machines.

Converter for Windows running in a VM has problems accessing VMs through VMware shares.
Comment: @pabouk that's only true for powered on machines, you can always clone vm to vm.
Answer: You need console (or SSH) access to the ESXi server, and then you can copy your VMs around using standard UNIX commands (cp).
To get console access:

go to the server console
type ALT-F1
type "unsupported" without quotes (no echo)
type your password (no echo, again)

Now you are at the server's command prompt; if you want to enable SSH access, edit /etc/inetd.conf and remove che comment symbol ("#") from the SSH line.
Comment: Rather than using cp, use vmkfstools.
Comment: While correct, there must be more to it than this; I couldn't get the copy of the VM to start properly.  It would always PXE then stop  with a claim of "no operating system".
Comment: That's strange, I've always been able to copy VMs this way. Are you copying all the VM directory or just the VMX and/or VMDK files? Try copying the full VM directory to another location, importing the copied VM into ESXi and then starting it.
Comment: For me it also always worked by just copying the files. Plan B would be to copy only disk/vmdk files and create a new vm and later attach vmdks.
Answer: There is a "ghetto-esx-linked-clones" script that will make Linked Clones rather than full clones.  Linked clones are great for VMs that you intend to use for short-term testing, since the clones only store differences relative to the original VM.  Running this script requires enabling SSH access to the ESXi host.
http://communities.vmware.com/docs/DOC-9202?tstart=7450
Answer: Leon Roy's advice worked for me. But I think there is something to consider:
vmdk-files stored directly in the directory of the vm are linked with a relative path to the vmx-file whereas vmdks that are stored outside this directory are linked with an absolute path.
So if one of the vmdks used by the VM is not situated in the same directory as the VM itself, you have to change the fileName value for that file in the vmx-file before re-adding it to the inventory. Otherwise, if you add the copied VM, it would use the original not the copy of the vmdk.
Answer: Using the converter was the most consistent approach to this solution.  Manually copying files in ESX-i was easy, but takes the same amount of time as using the converter, and does not always let you add the .vmx file to the inventory (it can be grayed out).  Keep this information list up; it's old, but it helped me :-)
Answer: Unless I'm sorely mistaken, you should be able to run the Virtual Infrastructure Client, connect to your ESXi server, right click on any stopped virtual machine and choose "Clone" which will duplicate the existing VM into another VM.
Comment: only when you are running on vCenter
Comment: I can confirm, ESXi 3.5 does not let you clone VMs from the VIC.
Answer: From memory the vCentre Server ( vmware.com/products/vi/vc/features.html )  will let you convert a machine into a template and then deploy multiple copies of that template into virtual machines. I believe there is a 60 day trial available ( vmware.com/tryvmware/index.php?p=vsphere&lp=1 ).
Comment: Only if you have Virtual Center - if you are running "Free ESX 3i" then you are limited in functionality.
Comment: if it is a one hit the trial may work for that.


How better is PAW available in VASP when compared to that present in PS Library?

Question: Papers with DFT calculations that use VASP work with PAW pseudopotentials which are also available in PS Library. I assume they are different since VASP is commercial. Given that, how different are they in terms of accuracy?
Comment: This may just be my ignorance of plane-wave based methods, but my understanding would be that there is no difference, similar to how Gaussian basis sets are the same regardless of what program they are implemented. Typically, the difference between commercial and noncommercial programs is less about accuracy and more about ease of use, feature richness, and availability of technical support.
Answer: This isn't a perfect comparison of what you asked, but I think it can help. I'll refer to PAW datasets as "pseudopotentials" here since that is how they are used in practice.
According to this relatively recent paper, when compared to all-electron calculations, the Standard Solid State Pseudopotential library (which has many PSLibrary pseudopotentials in it, though it is a mix of PAW, ultrasoft and norm-conserving ONCV from a few sources) is comparable in accuracy (delta gauge 0.5) to VASP PAW (delta gauge 0.6). When comparing only PSLibrary 1.0.0 PAW (which, if you read the documentation, was "updated" simply to improve the consistency of the pseudopotential generation approach, not necessarily make individual pseudopotentials more accurate), the delta gauge was slightly higher at 0.9. If you wanted to make an "optimal" set of PAW datasets from PSLibrary, using a mix of version 1.0.0 and older pseudopotentials (choosing the best from https://materialscloud.org/) they would probably be comparable in accuracy vs. VASP, at least when using the delta gauge metric.
There are also other things to consider, such as the specific subset of PAW (high or low accuracy), and the accuracy you get vs. the "hardness", i.e. how low of an energy cutoff you can get away with. I don't think there's a thorough analysis of this, but while both commercial and non-commercial software have their pros and cons, I don't think you will necessarily have more accurate results from a commercial code.


my phone, Galaxy S4, was hacked. and now I think it's affected my app permissions by adding files to them?

Question: My partner and I had our phones hacked recently. He was able to prevent any real damage from happening. But he reset his just in case. I wanted to go through my phone first, to see what had been affected. I noticed that most of my apps looked like they had been changed. There were a lot of things added to the list of permissions that the app and all related apps were granted. It just didn't seem like they were legit. I tried resetting app preferences and I dogs a factory reset and the apps are still like that. I don't know how to change it, or if I even need to. https://www.dropbox.com/sc/fnvxs9qwp2upwxo/AAAuhCphY2CMqC0EMVIJibX_a
Comment: Could someone with Dropbox access integrate that screenshot (I assume it is one) properly, please? Some people (e.g. me) cannot see it due to firewalling ;)
Answer: Granting other apps permissions does absolutely nothing unless those apps are designed to take advantage of those permissions.  It is unlikely that stock Android and Samsung apps are maliciously cooperating with this malware.
There is also nothing abnormal about the permissions in that screenshot.
Comment: That group of permissions wasn't there before tho, which is why I thought they might be malicious. And  basically every app on my phone has those permissions. Along with the permissions that were originally granted. So between the originals and the add-ons, most of the apps in my phone have access to evvveryyythiiiiing. Because somehow, all of these apps are related. There's a huge list at the top of permissions that names every app with those permissions. That list wasn't there before.
Comment: Is it possible for someone with access to my phone and accounts, etc, to be able to add those permissions?
Comment: Possibly.  But again they can't do anything, adding permissions to an app doesn't rewrite the app to use those permissions.
Comment: @MatthewRead taking into consideration the `.apk`s might have been replaced by "hacked variants", those apps might well take advantage of "additional permissions". Though I've never heard of such an hacking attack, that doesn't mean it's impossible – though I agree highly unlikely. Safest way is factory-reset and "clean install" of apps needed – even safer re-flashing the ROM first.


GUID Behind the Scenes

Question: I am wondering, what goes into the creation of a GUID. I don't mean what is used to create a GUID in a specific language (NewID() in SQL Server, Guid.NewGuid() in C#), I mean when you call those methods/functions, what do they do to make the GUID?
Comment: Are you looking for something more than [Wikipedia](http://en.wikipedia.org/wiki/Globally_Unique_Identifier)?
Answer: Also, RFC 4122 (which is referenced in the Wikipedia article) describes how GUIDs should be built.
Answer: The details of GUIDs, including the algorithm used to generate them is described on wikipedia.
Answer: In short, it's not complicated at all. GUID (or UUID) Version 4 (current) is a partially random number, plain and simple (122 out of 128 bits are random, the rest are used for storing version and revision). The trick is that the possible values of this number are so many that the probability of a hit is for most practical purposes, zero.
Comment: I would say that it is a partially random number. Some parts of it are not random at all.
Comment: Some of the bits are created from the machine info and don't change as long as your on the same machine.
Answer: Hash function. Its complicated.
http://en.wikipedia.org/wiki/GUID#Algorithm Knows more than I do.
Answer: A word of caution that a very great deal of what you read on the Internet about GUID creation may well be wrong, or at least out of date for your specific platform.
I once single-stepped through a heap of Windows code to settle an argument about GUID creation on WinXP.  Unfortunately, it turned out that I was wrong (i.e. I lost the argument), but so was Larry Osterman, so I felt slightly better about it.
Answer: There are five official ways of generating GUID's (and certainly many more unofficial ones).

Version 1 is a time based GUID usually using MAC addresses of the primary network card of the using used to compute the GUID. This is normally not used due to privacy issues, but I do believe that Microsoft SQL Servers from 2005 and onwards use a modified version of this (claiming to be version 14), to create sequential GUID's useful for id's in a database to avoid fractioning of data blocks (NewSequentialId()).
Version 2 is DCE Security version. I have never found this kind of GUID, but I have not worked a lot with POSIX either and there seems to be a connection between version 2 GUID's and POSIX.
Version 3 is a "name based" version, meaning you can take a text and create a GUID representation of that, given a namespace. Version 3 uses a MD5 hashing algorithm. See also version 5.
Version 4 is basically a random number type GUID. The random number is of sequrity level, not just your average random number generator though. This is the version usually used in the world today. The C# Guid.NewGuid() uses this version, according to Microsoft documentation. Also the normal function for generating an uniqueidentifier in MS SQL Server (NewId()) generates a version 4 GUID.
Version 5 is just like version 3, but uses a SHA-3 hashing algorithm instead. The extended guid C# project uses the version 5 algorithm.

For one implementation of GUID making I'd recomend looking at the extended guid project. As many has pointed out the RFC 4122 gives a detailed description on how all five algorithms work. However, there are no guarantees all implementations are correct.

GUID Behind the Scenes


What is proactive secret sharing scheme?

Question: In some papers, they just wrote that proactive secret sharing scheme is a secret sharing scheme which its shares are periodically updated. Does it have formal definition ?
Comment: Can you link some of these papers?
Answer: Proactive secret sharing schemes are typically used for multi-party computation variously referred to as "Secure computation" or simply MPC that arose from the work of Yao and Goldreich, Micali and Wigderson (GMW) in the 80s.
MPC's require secrets to be shared among multiple parties, and some of these parties may be controlled by an adversary that is in the most general setting able to deviate from the specified protocol in a "byzantine" manner. As a concrete case, in the GMW protocol with $n$ parties, in order for the $i$th party to share its bit $b_{i} \in \{0,1\}$ with the other $n - 1$ parties, she generates $n - 1$ i.i.d uniformly random bits and sends one of the generated bits to each of the parties. She then sets her share of $b_{i}$ such that the sum of her share and the other $n - 1$ bits mod 2 gives back the original bit $b_{i}$. This sharing scheme is "perfectly" secure since there is no complexity assumption.
In the classic MPC model, it is assumed that the parties controlled by the adversary are determined beforehand and remain fixed during the course. This is sometimes called static corruption.
In the early 90s, Ostrovsky and Yung ("How to Withstand Mobile Virus Attacks", In PODC, pages 51–59) described settings where the adversary is allowed to control a varying number of parties throughout the computation and corrupt additional parties that may have been intact at the onset of the protocol. This is typically called dynamic corruption, and protos that are able to remain secure in this setting are sometimes called proactively secure. In this model, "proactive" security property stems primarily from the fact that secrets shared among the parties are periodically re-randomized through a sharing scheme, called a proactively secure secret sharing scheme (PSS).
I should note that the original Ostrovsky and Yung paper from 1991 does not explicitly use the term proactive secret sharing, but this term is used in a 2014 rework of the '91 paper ("How to withstand mobile virus attacks, revisited" by Baron, El-Defrawey, Lampkins and Ostrovsky [BELO14]). The "Block-Redistribute" aspect of the protocol forms the core part of the PSS scheme in the [BELO14] MPC, but it's presented as a specification rather than a formal definition. As such, I have not found a succinct formal definition for "proactive secret sharing". What you may ask for, on the other hand, is a definition of what it means for a MPC to be proactively secure rather than strictly a definition of the term "proactive secret sharing". If that's the case, the definitions in [BELO14] sec. 2.1 " The Proactive Model under the UC Framework" are helpful.
Answer: One formal definition I came across is the Definition 3 of https://link.springer.com/chapter/10.1007/978-3-319-28166-7_2.
Comment: We aim to have comprehensive answers that are self-contained on this site. This a link-only answer, what happens if/when the link dies or changes? Can you please incorporate a summary and/or explanation of the relevant contents of the link?


SQL injection: real escape string function

Question: example4.php?id=id=2-1
I came across the above injection and I can not figure out why(how) does this work and what's interesting is it returns all the records from the database.
Anything guys? educate me
Thanks
Answer: It runs the query WHERE id=id. As id is just another column and in SQL you can just pass name of column when doing comparison operations.
This is saying to fetch all rows WHERE id of the row equals id of the same row, which is true for all rows.
This is same as WHERE 1=1, it basically alters WHERE statement in such a way that it is always true.
Answer: The injected fragment probably results in a query similar to this:
… WHERE id=id=2-1

Since MySQL is parsed from left to right, the above is equivalent to:
… WHERE (id=id)=2-1

So the expression id=id is evaluated first and returns 1 (TRUE value) for each row as any non-NULL value is equivalent to itself when using the = operation. So it can be simplified to:
… WHERE 1=2-1

Which, oft course, can be simplified to:
… WHERE 1=1

And this, again, is true for each row with a non-NULL id value.

Regarding the title: it's a common misunderstanding that passing an input value through mysql_real_escape_string function makes it automatically safe to be used in an SQL statement. Even the PHP manual states that ambiguous:

This function must always (with few exceptions) be used to make data safe before sending a query to MySQL.

However, what the manual is missing is that values passed through mysql_real_escape_string are only supposed to be used in MySQL string literals and nowhere else. Unfortunately, the manual misses to clarify that important aspect.
The result is that mysql_real_escape_string is also used for data which is not intended as a string literal. Like as a different literal value, a keyword, or even as a column or table identifier.
Likewise, in the case discussed above, the input value is not used in a string literal, so mysql_real_escape_string won't help. However, a prepared statement, in which the input would be passed as parameter, would have helped.


Joining two windows doesn't work

Question: I click join area and then the Area Options dialog disappears and nothing happens.
Comment: Close the timeline first
Comment: If you look at the system console, you will see an error printed: `areas don't share edge`. You can only join areas if the fully share an edge, but in your case the right-hand area shares an edge with **two** other areas.
Answer: quoting from the manual:

order to merge two window frames, they must be the same dimension in the direction you wish to merge. For example, if you want to combine two window frames that are side-by-side, they must be the same height. If the one on the left is not the same as the one on the right, you will not be able to combine them horizontally. This is so that the combined window space results in a rectangle. The same rule holds for joining two window frames that are stacked on top of one another; they must both have the same width. If the one above is split vertically, you must first merge those two, and then join the bottom one up to the upper one.

read:
https://www.blender.org/manual/getting_started/basics/interface/window_system/arranging_frames.html?highlight=join%20window

Joining two windows doesn't work


How to evaluate sums in the form $\sum_{k=-\infty}^\infty e^{-\pi n k^2}$

Question: Online, one may find the values of the following sums:
$$\sum_{k=-\infty}^\infty e^{-\pi k^2}=\frac{\pi^{1/4}}{\Gamma(3/4)}$$
$$\sum_{k=-\infty}^\infty e^{-2\pi k^2}=\frac{\pi^{1/4}(6+4\sqrt 2)^{1/4}}{2\Gamma(3/4)}$$
$$\sum_{k=-\infty}^\infty e^{-3\pi k^2}=\frac{\pi^{1/4}(27+18\sqrt 3)^{1/4}}{3\Gamma(3/4)}$$
Can someone show me how to prove at least one of these? I've already tried using the reside theorem but had no luck with that.
Comment: They boil down to special values of Jacobi Theta functions and elliptic integrals, see https://math.stackexchange.com/a/1798992/44121
Answer: The sums in question are nothing but values of Jacobi theta function defined by $$\vartheta_{3}(q)=\sum_{n\in\mathbb{Z}}q^{n^2}\tag{1}$$ Evaluation of these functions for certain specific values of $q$ is done via the help of their friends called elliptic integrals. Before discussing the problem of evaluation of theta functions, it is best to give preliminary information about elliptic integrals.
We start with a number $k\in(0,1)$ called elliptic modulus and define another number $k'=\sqrt{1-k^2}$ called complementary (to $k$) modulus. The following equation $$K(k) =\int_{0}^{\pi/2}\frac{dx}{\sqrt{1-k^2\sin^{2}x}}\tag{2}$$ defines complete elliptic integral of first kind $K(k) $ for modulus $k$. The expressions $K(k), K(k') $ are usually denoted by $K, K'$ respectively if $k$ is known from context. It is then a wonderful surprise that if the values $K, K'$ are known the value of modulus $k$ can be obtained via Jacobi theta functions with argument $q=e^{-\pi K'/K} $ (also called nome) $$k=\frac{\vartheta_{2}^{2}(q)}{\vartheta_{3}^{2}(q)},\,\vartheta_{2}(q)=\sum_{n\in\mathbb{Z}}q^{(n+(1/2))^2}\tag{3}$$ Also under these circumstances we have $$\vartheta_{3}^{2}(q)=\frac{2K}{\pi}\tag{4}$$ The most interesting aspect of these functions and integrals was understood by Ramanujan and he championed the idea of a modular equation to which we turn next.
The function $f(k) =K(k') /K(k) $ is strictly decreasing and maps interval $(0,1)$ to $(0,\infty)$ and hence if $p$ is a positive real number then there exists a unique number $l\in(0,1)$ such that $$\frac{K(l')} {K(l)} =p\frac{K(k')} {K(k)} \tag{5}$$ (here $l'=\sqrt{1-l^2}$ is complementary to $l$, also $K(l), K(l')$ are usually denoted by $L, L'$). Thus given $k\in(0,1),p\in(0,\infty)$ we have a new modulus $l$ such that the above equation holds and if $p$ is fixed in our discussion then $l$ is a function of $k$. Jacobi proved in his Fundamenta Nova that if $p$ is a positive rational number then the relationship between $k, l$ is algebraic and this relationship between $k, l$ in form of an algebraic equation is called a modular equation of degree $p$. It is a computational challenge to find such equations for large values of $p$ and Ramanujan was an expert in finding such modular equations.
Let $P(k, l) =0$ be the modular equation of degree $p$ where $P$ is a polynomial with rational coefficients. Ramanujan added another constraint in this equation namely $l=k'$ so that $k=l'$ then the equation $P(k, k') =0$ shows that both $k, l=k'$ are algebraic numbers. And in that case equation $(5)$ leads us to $$\frac{K(l')} {K(l)} =\sqrt{p}, \frac{K(k')} {K(k)} =\frac{1}{\sqrt{p}}\tag{6}$$ and thus we have the following theorem

Theorem: If $p$ is a positive rational number and $K(k') /K(k) =\sqrt{p} $ then $k$ is an algebraic number and such values of $k$ are called singular moduli.

From now on $p$ will denote a positive rational number unless otherwise stated. Note that if $Q=\exp(-\pi K(l') /K(l)) $ then equation $(5)$ shows that $Q=q^{p} $. From equation $(3)$ it follows that a modular equation can also be thought as an algebraic relation between theta functions of arguments $q$ and $q^{p} $. It can also be proved by differentiating the equation $(5)$ that the ratio $K(k) /K(l) $ can be expressed as an algebraic expression in $k, l$. Ramanujan expressed many of his modular equations as algebraic expressions for $K/L$ and that's what we need here.
We start with $q=e^{-\pi} $ so that $K=K', k=k'=1/\sqrt{2}$ and the value of integral $K$ is easily evaluated for this value of $k$ which gives the desired value of the first sum in question. From equation $(4)$ it follows that $$\frac{\vartheta_{3}(q)}{\vartheta_{3}(q^p)}=\sqrt{\frac{K}{L}}$$ And as discussed earlier the ratio $K/L$ can be expressed as an algebraic function of $k, l$ therefore the evaluation of $\vartheta_{3}(q^p)$ can be performed if the value of $l$ as well expression for $K/L$ in terms of $k, l$ is known. The value of $l$ can be obtained by solving the modular equation $P(k, l) =0$ as $k=1/\sqrt{2}$ is known.

To sum up we need the modular equation connecting $k, l$ as well as expression for $K/L$ in terms of $k, l$. These are well known and have a simple form if $p=2$ and are famously known as Landen transformation $$l=\frac{1-k'}{1+k'},\frac{K}{L}=\frac{2}{1+k'}\tag{6}$$ Thus putting $k'=1/\sqrt{2}$ we get $K/L=4/(2+\sqrt{2})$ and the second sum in question $$\vartheta_{3}(e^{-2\pi})=\sqrt{\frac{L}{K}}\vartheta_{3}(e^{-\pi})=\frac{\pi^{1/4}\sqrt{2+\sqrt{2}}}{2\Gamma(3/4)}$$ has the value as mentioned in your post.
For $p=3$ we have the following modular equation $$\sqrt{kl} +\sqrt{k'l'} =1\tag{7}$$ Putting $k=k'=2^{-1/2}$ we get $\sqrt{l} +\sqrt{l'} =2^{1/4}$. With some effort the value of $l$ can be obtained. To get the value of $K/L$ we differentiate equation $(5)$ and get $$\frac{dl} {dk} =p\frac{ll'^{2}L^{2}}{kk'^{2}K^{2}}$$ Thus $$\left(\frac{L} {K} \right) ^{2}=\frac{kk'^{2}}{3ll'^{2}}\frac{dl}{dk}\tag{8}$$ Differentiating equation $(7)$ with respect to $k$ we get $$\sqrt{\frac{l} {k}}+\sqrt{\frac{k} {l}} \frac{dl} {dk} - \frac{k}{k'} \sqrt{\frac{l'} {k'}} - \frac{l} {l'}\sqrt{\frac{k'}{l'}} \frac{dl} {dk} =0$$ ie $$\frac{dl}{dk} =\dfrac{\sqrt{\dfrac{l}{k}}-\dfrac{k}{k'}\sqrt{\dfrac{l'}{k'}}}{\dfrac{l}{l'}\sqrt{\dfrac{k'}{l'}}-\sqrt{\dfrac{k}{l}}}$$ and putting this value of $dl/dk$ in equation $(8)$ we get the value of $L^2/K^2$ in terms of $l, l'$ (the value $k=k'=2^{-1/2}$ being used in the process) as $$\left(\frac{L} {K} \right) ^{2}=\frac{1}{6\sqrt{ll'}}\cdot\frac{1}{l+l'+\sqrt{ll'}}\tag{9}$$ Since the values of $l, l'$ and their square roots are known we can get the value of ratio $L^2/K^2$ in form of a radical expression.
The algebraic calculations are formidable and I managed to get $$\sqrt{l} =\frac{\sqrt{2}-\sqrt[4]{3} (\sqrt{3}-1)} {2^{5/4}}, \sqrt{l'} =\frac{\sqrt{2}+\sqrt[4]{3} (\sqrt{3}-1)} {2^{5/4}}, \sqrt{ll'} =\frac{(\sqrt{3}-1)^{2}}{2\sqrt{2}}$$  and $$l=\frac{(\sqrt{3}-1)(\sqrt{2}-\sqrt[4]{3})}{2}, l'=\frac{(\sqrt{3}-1)(\sqrt{2}+\sqrt[4]{3})}{2}$$ Using these values in equation $(9)$ we can show that $$\left(\frac {L} {K} \right) ^{2}=\frac {3+2\sqrt{3}}{9} $$ and thus the desired value of the third sum is obtained.

For $p=5$ Ramanujan gives the modular equation $$\frac{5L}{K}=\frac{1+(\alpha^5/\beta)^{1/8}} {1+(\alpha\beta^3)^{1/8}}, \frac{K} {L} =\frac{1+((1-\beta)^5/(1-\alpha))^{1/8}}{1+((1-\alpha)^3(1-\beta))^{1/8}} $$ where $\alpha=k^2,\beta=l^2$. Using $$\alpha=\frac{1}{2},\beta=\frac {1}{2}-6\sqrt{161\sqrt{5}-360}=\frac{1-\sqrt{1-\phi^{-24}}}{2}$$ (value of $\beta$ is obtained using value of class invariant $G_{25}=(1+\sqrt {5})/2=\phi$) corresponding to nomes $e^{-\pi}, e^{-5\pi}$ we can get the value of $L/K$ in algebraic form. It is hard to believe, but this thread tell us that the final result has a very simple algebraic form given by $$\frac{L} {K} =\frac{\sqrt{5}+2}{5}$$ The algebra involved can be simplified a lot if we use a denesting by Ramanujan for $\beta^{1/8},(1-\beta)^{1/8}$ given here (see equation $(7)$).
Comment: @ParamanandSingh Your blog posts are beautiful fair play!!
Comment: Wow, thanks for the detailed explanation! It will probably take me a while to go through and understand it all.
Comment: @Nilknarf: All the facts stated in this answer are proved in my blog posts. Search for "modular equation" in this [archive page](https://paramanands.blogspot.com/p/archives.html)  and you will find detailed treatment of these topics. I have covered approaches given by both Ramanujan and Jacobi. And yes its a difficult topic which will require some time.
Comment: Okay, awesome! Thanks for all the help!
Answer: See: Ramanujan's Notebooks Volume 3, Chapter 17, Example(i). pp 103.
See also: Ramanujan's Notebook Volume 5 chapter 35. Values of Theta-Functions P. 325.
Comment: Are these online by any chance?
Comment: @ColmBhandal: they should be available online if you search enough. But those are unofficial copies not like the legal ones available for some old classic texts.


How a file is determined

Question: If I have the integer ""1234" stored in a file, the size of the file when I use the command "ls -l" or "wc -c" is 5. If I have "12345" the size of the file is 6. Basically the number of bytes in a file = (number of individual digits) + 1. Now, I am assuming the "+1" comes from the space it takes to create the name of the file. But why is the rest of the byte count equal to the number of individual characters? Does the file system read the file character by character even we "write an integer" to the file? Elaboration on this would be very helpful.
Comment: There'll be an end of line character at the end of the file. But this isn't a computer science question.
Comment: This is about how a certain OS and/or filestystem implement stuff, not about CS.
Comment: But I feel as if it is relevant, since much of computer science has to do with data science, and knowing how a file system works is relevant knowledge.
Answer: The +1 is for the newline character.
The byte count equals the number of characters, in this case, because each character takes exactly one byte.  That need not be true in general (see, e.g., UTF-8), but it is for the example you listed.
You didn't write an integer to the file.  You wrote a string -- a sequence of characters, namely the character 1, then the character 2, then 3, then 4, then a newline.  Files don't store integers or other types.  They store a sequence of bytes.  Each character is converted to one or more bytes using an encoding, and then the sequence of bytes is written.
Comment: @JonathanSmit, that's a programming question that will depend on what that language/library does, which is off-topic here.  You'll need to consult the documentation or ask on Stack Overflow to figure out what that specific method does.
Comment: So even when I use the command outfile.write(32); where write takes in an "int" as a param, it would still encode it as a char right?

How a file is determined


Difference between "Component definition item" and "Components or Rendering"?

Question: What is the difference between "Component definition item" and "Components or Rendering" in Sitecore?
Answer: A rendering is more than a component definition item.  it consists of a definition item in Sitecore and a file on the file system.
A view rendering is the simplest Sitecore MVC rendering type. As with all presentation items in Sitecore, a view rendering consists of a definition item in Sitecore and a file on the file system. In the case of view renderings, the file is a standard Razor view (.cshtml) which expects a model of type RenderingModel by default (but can be configured to use a custom class). The model is assembled by the Sitecore MVC pipeline - you do not create a controller and ActionResult as you would with standard ASP.NET MVC. For this reason, controller renderings may be a better choice for complex business logic .
http://sitecore-community.github.io/docs/sitecore-mvc/view-renderings/
A controller rendering is an advanced component type that allows you to specify a controller and an action on the component definition item. The action must return a result that can be rendered  - such as a view. The controller itself does not need to inherit from a Sitecore-specific class - it is just a normal MVC controller.
http://sitecore-community.github.io/docs/sitecore-mvc/controller-renderings/
Comment: Thanks! for reverting.So can i say that the purpose of a component definition item is to allow the component to be added to a placeholder or it stores the rendering parameters of the component   ?
I


Drilling in guitar tops

Question: If cheap acoustic guitars sound bad because  the tops are thick, then wouldn't drilling a lot of very tiny holes in the top improve the tone and volume at all?  I mean VERY TINY holes...
Comment: Not mine either, but: If the material of which a "soundbox" is made matters at all, then the only things that can matter are its reflective properties, ORrrr... its ability to vibrate. I assume the problem is that thick tops don't vibrate. Think of it as a drum head—if your drum head were failing to vibrate, adding holes wouldn't help!
Comment: The top would still be thick. It's not my area of expertise but I think theoretically (that means don't try this at home!)  making the sound hole bigger or adding another one might have more effect than very tiny holes.
Comment: It would certainly change the harmonic content, not necessarily in a good way. One thing to consider when designing acoustic instruments is… people have has a long time to test alternative constructions, including putting multiple holes in them. Ovation made an entire series of guitars with seemingly 'pointless' extra holes - but they really relied on a transducer for their sound, so the holes may have been ornamental, or perhaps to tune out some lower harmonics the pickups didn't get along with.
Comment: Cheap acoustic guitar tops that sound bad are not necessarily any thicker than great acoustic guitar tops. Top thickness is not the essential problem of cheap guitars
Comment: There's a HUGE difference between drilling through-holes and drilling blind holes from the underside.
Answer: No. The problem with a top too thick is that it is too stiff and too heavy to properly vibrate, especially at lower frequencies that have higher amplitude. So the sound will be small and tinny. Drilling holes in the top would solve the weight issue, but it will not make the top more flexible.
But the top has an important function: The top is a membrane that is supposed to transfer the vibrations into the air. Creating lots of small holes in the top will reduce the amount of surface you have, reducing the ability to move air. Also the big total opening will reduce the effect of the resonance chamber.
Also cheap acoustical guitar tops might be made from less than optimal wood, which affects vibrations, or occasionally even plywood (this is common in cheap curved tops, as you do not need to carve, but you can simply glue plywood into a matrix under heat and pressure. But plywood strongly inhibits vibrations).
Comment: Actually, drilling holes in the top *will* make it more flexible.  If the top is really too thick, the only solution would be to sand or plane it down- an operation that would cost more than most guitars are worth.
Comment: @CarlWitthoft Yes indeed, drilling holes is not going to help the response- quite the opposite.  And as I also said, it's probably not worth trying to thin the plates.
Comment: @ScottWallace  yes to more flexible,  no to responding in a desirable way to the frequencies of interest.   Aside from the original material probably being of [redacted] quality,  shaping and thinning to achieve a plate which responds well for the desired Zernike polynomial terms  (drum-head vibrations) is a nontrivial task.

Drilling in guitar tops


Node access based on condition

Question: I'm adding an event list to a website and I want to limit what anonymous users see based on a field value, a checkbox "Private event". If the checkbox is marked then only a subset of the fields for the given event are shown. Furthermore, after a year of the event I want all fields to become visible to anonymous users. I took a look at the Access Control module but couldn't find a way to have this conditional type of access to fields. Is there another module that I could use?
Comment: It sounds like your issue is too localized for a module with general application. You should look, instead, at putting your logic into a preprocess function to hide or show the fields based on your logic. Have a look at [Setting up variables for use in a template](https://drupal.org/node/223430) for a starting point.
Comment: @Triskelion It doesn't quite feel right to me to put this in the theme. Sure, usually a site only runs a single theme, but lets say you have one mobile and one 'normal' theme, then you'd have to re-implement this logic in both themes. It feels like this is to much logic/site functionality to be in the presentation layer.
Comment: @Letharion Good point. Only the last two layers of preprocess are theme-specific so it could probably be set up as a module_preprocess function. That way it would apply to all themes. However, I like your approach below.
Comment: @Triskelion Ah, you're right of course, I just read template and thought of the theme. :)
Answer: I would do like this:

Define a new 'Restricted' View mode. Either manually with hook_entity_info_alter or with Display Suite.
Create a new Page in Page manager, using the by default available Node view.
Create two separate variants in the page.

The first one will use a selection rule on ´Role: Anonymous´ and ´Field Private event: True´. In this Variant, display the node with the 'Restricted' view mode.
The second variant will not need a selection rule, as it will be the fall through option. Here you show the node with the normal 'Full' view mode.

For making everything visible after a year , it sounds like either a hook_cron with some code in it, or perhaps a combination of some Rules with a VBO, which would flip the private field off after a year. Sounds like that might be a separate question though.
Comment: Could the selection rule not also test the date, eliminating the need to alter the Field Private Event?
Comment: It absolutely could, but last time I checked the generic per field access checks weren't sophisticated enough to do something like comparing dates, so I believe that would require a custom access plugin. (Or a patch to ctools)
Comment: Hi Letharion, thanks for fast reply. If I do what you suggested does this mean that I will have to basically maintain two pages, one for logged in users and another one for anonymous ones?
Comment: I don't fully understand what you are asking. Technically, you'd be maintaining two "View modes", to differentiate the rendering, and two "Variants", to tell Drupal when to use which rendering. I don't know if that answers your question or not. There's no duplication of work or code, if that's what you mean.

Node access based on condition