How to create Magento editable grid?

Question: I couldn't find a better tutorial for creating an admin grid which is editable. And the grid column contains dropdown boxes. And there's only one save button for the entire grid. (Means there's no Action column anymore). I'll provide a mock diagram of the grid which I want to generate. Please suggest if found any tutorials or way to achieve this easily. I have created this grid form. But it's not saving data.
Answer: Here is a tutorial
http://www.atwix.com/magento/inline-editing-in-magento-backend-grids/
It suggests you override the column renderers
Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Input
to allow inline editing, it will save the data as each control is edited rather than at the end with a save button.
Answer: I have never seen such a thing, but what you want is more or less, what phpmyadmin implemented in one of the last versions:

you have a <form> around the whole grid
you click in a cell and get a input/dropdown/whatever editable element
you click the save button and submit the form
you process the data in the backend and save it.

Your question is far too broad to answer it concrete. If you have implemented parts of it and have problems, come with the magento parts here and with the JS problems on stackoverflow or here.
Comment: I understand your point about googling it.! I only actually replied because I remembered the tutorial from when I was looking up information about custom grids. I do take your point about people using google though.
Comment: I don't say it is too broad. What I say is: It is too broad to deliver a solution instead of a path where to go. The blog post by atwix helps, but don't solve the whole problem, so even a blog post doesn'T cover what she needs :)
Comment: I don't think the question is too broad, she even included a diagram which is more than most
Comment: The question is "Please suggest if found any tutorials or way to achieve this easily"
Comment: There is no way to achieve this easily and we are not the ones which google for someone else. At least this is my point of view

How to create Magento editable grid?


If the lens wasn't discovered/invented what current technologies wouldn't be possible

Question: When I'm thinking of the most crucial discoverys of science than I think of the lens invented in the 16e century. By using a lens man could make microscopes and telescopes. When I think about that than I can't imagine that people had gone to the moon, had a mobile telephone, can listen to the radio watch tv, use GPS. But is through that the invention of the lens was crucial for futher technological inventions or could man invent those things via an other way and was it not really necessary?
Comment: Is such a "what if" question appropriate for the *History* of Science and Mathematics website?
Comment: You could make similar case for gunpowder, printing press or calculus, but it is simply impossible to take out one piece while assuming that the rest remain in place, so I am afraid this question has no answer.
Answer: First of all, the lens was discovered much earlier than 16s century. The properties of the convex lens were described by Alhazen in his Book of Optics in 1021. The eyeglasses were invented in Italy in 13s century. This is by far the most important use of lens.
Notice that most humans after the age of 40 need eyeglasses just to be able read and write (and do many other jobs). And many people need them before 40. So this invention substantially prolonged the active life of people of many professions, including scientists and inventors. So certainly many discoveries in all areas would not be made without this invention.
Another invention based on the lens, which affected the life of most humans is
photography, with all its subsequent derivatives including cinema, video and TV.
All this would be impossible without lens.
Comment: I had a pinhole camera long ago.... photography without lenses!


Add single permissions entry on the folder

Question: On windows 2008 file server, I have huge folder, where some of subfolders do not inherit ACL from the parent object. I would like to add single permissions entry (full control for local administrators group) to the whole folder, and to propagate this entry even to folders which does not inherit ACLs from above. All existing permissions entries should be kept as it is. By default, if I just add single permission entry at the root folder, subfolders which does not inherit ACLs won't inherit new entry. If I turn on "Replace all child object permissions with inheritable permissions from this object", this will reset all existing ACL entries on folders which does not inherit ACLs. Is there any method available to solve my problem ?
Comment: Are you comfortable w/ Powershell?
Comment: Yeah, your solution is a command-line utility and looping through all the sub folders.  I, too, recommend PowerShell, but the older cmd-based utilities would work as well.
Comment: Not so comfortable with powershell, but thanks for pointing me in right direction.
Answer: You could use SetACL if you're not comfortable with PowerShell (as BigHomie and HopelessN00b have suggested).
You should read the full documentation and test your command on a dummy location, but the syntax you'd use would be something like:
setacl -on <PATH> -ot file -actn ace -ace "n:Administrators;p:full;i:so,sc;m:grant;w:dacl" -rec cont_obj -ignoreerr

Comment: _The term 'setacl' is not recognized as the name of a cmdlet, function, script file,..._

I probably need some additional library ?
Comment: Why download 3rd party tools when Windows has its own?
Comment: It's a whole other command, not part of PowerShell. Click the link above for details.
Answer: It's not possible in GUI, but should be with icacls, see Command-Line Reference.
There, you can see how /grant works:

Grants specified user access rights. Permissions replace previously granted explicit permissions.
Without :r, permissions are added to any previously granted explicit permissions.

As switch /t makes the command recursively, combination of these should do the trick.
So I'd suggest something like icacls "X:\PATH\TO\FOLDER\" /grant DOMAIN\group:(f) /t but please see the documentation whether it matches your goal (and as always try it first on a test directory).


Minecraft Launcher Update

Question: My Minecraft launcher won't update whatever I do. I have downloaded the new launcher file, still same version. I have clicked edit profile, but the only versions there are are 1.6.2 and "use latest version". still staying in 1.6.2. It used to update normally and well but now it's stuck in the launcher version 1.2.1.
Answer: You should try to delete your .minecraft folder.
On windows you'd press WIN+R and type %appdata%. Now copy the saves folder in the .minecraft folder to a save place, and delete the whole .minecraft folder.
Then download the launcher again and see if it works.

Minecraft Launcher Update


Can I say "he lost his brave face"?

Question: "Put on a brave face" is to express that someone try to hide it's feeling and pretend to be alright. What if someone tries but fails,  can I say, "He lost his brave face after that"? Or what would be a better word or phrase to express this situation?
Comment: @Kris: This is nonsense. The sentence is perfectly understandable. The heart of the idiom is "brave face", & to say "He's wearing a brave face" is no less idiomatic & meaningful; therefore, anyone who understands what a "brave face" is will understand what "He lost his brave face" means. Pontification is de rigueur for the Pope, however.
Comment: (To) "*put on a brave face*" is an idiom, to *lose one's brave face* is not. You cannot rephrase an idiom and still expect to convey the idiomatic sense. Always avoid rephrasing idiomatic expressions, set phrases and such, or conjugation of the verb in them.
Comment: Sure, that's no problem. "He put on a brave face, but he lost it when he realized that he would die in the avalanche."
Answer:
What if someone tries but fails .. What would be a way to express this situation?

Well, that depends on a few different factors, such as

How brave was this person to begin with?
Was this person humbled when he failed? Or did he simply become less brave?

You haven't supplied too many details about the scenario, so there is room for some interpretation. I'm assuming that this person wasn't very brave to begin with (based on how you said this person will "try to hide feelings and pretend to be alright"), and that maybe everyone else thinks that some humility came with the failure (otherwise, you might have inquired about "I lost my brave face" instead of, "He lost his brave face").
So, I'm assuming that that this person is thinking pretty highly of himself when he puts on his "brave face," but you want to describe his feelings afterwards, when that bravado is proven to be hollow. So long as those aren't inaccurate assumptions, here are a few idioms you might consider:

that took him down a peg or two (according to NOAD, this means make someone realize that they are less talented or important than they think are. Sometimes the word notch is used instead of peg)
that wiped the smile off his face (according to Cambridge, this means to make someone feel less happy or confident, especially someone who is annoying you because they think they are very clever)
that served up a big slice of humble pie (according to Yahoo's online dictionary, eating humble pie means admitting one's faults in humiliating circumstances)
he was all talk and no action (this can be used when someone boasts a lot, but, when crunch time comes, the person folds under pressure)
he was apparently too big for his britches (or breeches; according to UE.com, this means a person is conceited with an exaggerated sense of their own importance; this one might be a stretch)

Most of these idioms focus more on the humility that accompanied this person's failure when they "lost their brave face." If you'd rather focus on how the person became less confident instead, you could simply say, "He lost his courage."
Answer: I agree with Bill Franke that a form like "He put on a brave face, but he lost it when he got scared" is acceptable; but "he lost his brave face when he got scared" is less acceptable for several reasons.  Perhaps the most important is that because it isn't idiomatic, people may interpret it literally, and may envision the person actually losing his face, as opposed to merely changing expression from brave to frightened.
Among many words pertaining to a change from brave to scared or up to down are
• downfallen, "Pertaining to one who is crestfallen, depressed, down in the dumps"
• crestfallen, "Sad because of a recent disappointment"
• shamefaced, "ashamed, displaying shame, especially by blushing in the face"
• abashed, meaning "embarrassed, disconcerted, or ashamed"
Comment: I disagree: "he lost his brave face" relies on knowing the idiom, but so does *putting it on* in the first place. Such an innovative use of an idiom prevents it being a cliche.

Can I say “he lost his brave face”?


Why do Git/Mercurial repositories use less space?

Question: I've read on several discussions here and on SO that DVCS repositories use about the same or less space than their centralised counter-parts. I may have missed it, but I haven't found a good explanation of why that is. Anyone know?
Comment: Are the followinfg posts the one you read? http://stackoverflow.com/questions/7727791/how-much-space-do-i-need-for-git-vs-svn or http://stackoverflow.com/questions/8657710/does-git-need-more-space-than-svn or http://stackoverflow.com/questions/456336/version-control-with-the-least-disk-space-overhead
Comment: I haven't, thank you! So I understand from those that there are two answers: compression using zlib and saving objects as packfiles when possible. The examples from Mozilla is also great!
Comment: @Alex No, that misses the main reason. SVN saves complete snapshots, Git and Mercurial only save the HEAD revision and diffs. Using conventional compression can give you best-case rates of about 60–80% compression. Using diffs could give you as much as 99%. These numbers are pulled out of my ass though – real numbers might differ; the *tendency* will be the same though.
Comment: @KonradRudolph, isn't that what packfiles are all about?
Comment: @Alex Not really. As far as I know the packfile is additionally *packing* multiple files into one. This isn't necessarily related.
Comment: From this link (found from VonC's linked questions): http://git-scm.com/book/ch9-4.html -- I understand that it's exactly what you were saying. It's creating packfiles of similar items, storing only one full file and the others as deltas.
Answer: From my own experience, the following statements are all true:

Git is very efficient in storing text files, and only storing these files that were changed. so when doing a comparison of SVN and Git to compare the repository sizes, they may be similar, or there may be even a small advantage for Git.
This is completely wrong if you compare the size of repositories where a significant amount of files are office files (like MS word, excel, powerpoint, ...). Here Git stores complete copies as well, which means that 10 small changes on a powerpoint slide stack results in 10 complete copies, where Subversion only stores a binary diff, which may be a factor of 100 smaller.

If you compare the checkout location (which is a repository in itself with Git), the story is totally different:

Subversion stores for each file a complete copy, so the size of your checkout location is normally 2 times the size of the files themselves.
Git stores the complete history of the repository locally, so depending on the size of the history, this may be smaller or much bigger than that of the Subversion checkout copy.

If you compare the amount of bytes you have to down- or upload, it is different again.

Subversion has normally to send or receive less bytes, because it only sends differences. It has to do that on every commit and update.
Git has to get the whole repository (initially), and then sends complete files (compressed?) which is not such different for text files, but may be different for binary files. And yes, Git only does that when you push or pull something to the remote repository.

So at the end, you compare apples with oranges, and depending on what you want to do with Subversion or Git, the result may be different.

@jk asked about complete copies or binary diffs, and I could not answer that question. I asked Matthew McCullough which gave a Git workshop lately at Jax 2012 (which I visited). He has taken the time (thank's a lot to him) to explain with a detailed gist the inner working of Git. So yes, there is a compression working there (and I will do an experiment with a microsoft office file as well and will compare that with his gist), but no, the compression is done on the whole file. Citing from his gist:

Loose objects are written in compressed, but non-delta format at the time of each commit.
Comment: Git treats text and binary files exactly the same way in all and any regards with respect to storage. The loose vs. packed objects is unrelated to text vs. binary. The reason binary files often result in much larger diffs than text files is that many binary formats (including all the new office formats) are already compressed and thus even a small change in content often causes big change in the resulting binary blob. This is equally of concern to git and subversion, but subversion only takes the penalty on server, while git everywhere.
Comment: The loose vs. packed objects has nothing to do with text vs. binary. It is amortization of the difficult work of finding the binary diffs. Speed is important feature of git, so during regular operation, git only zips the new data and slaps them in the repository. This is loose objects. Than when you ask it to by calling `git gc` or too many loose objects accumulate, it finds good candidates to delta-compress them against (git can diff against other than previous version), stores the deltas in a "pack" and removes the loose objects.
Comment: For those who are interested in real-world numbers: I just compared two working copies from the exact same repo. The SVN working copy is about 2,9 GB, the [GIT](https://www.kernel.org/pub/software/scm/git/docs/git-svn.html) working copy is around 0,8 GB.
Comment: Asked someone (by email) which knows much more than me, and will include his answer in my answer then.
Comment: are you sure that git stores complete copies of office files? I think it also stores binary diffs. of course the really issue with these sort of files is they are often already compressed so a small change can cause the whole file to change


Client not reading from Mongo secondary database

Question: I've implemented a replica set that I'm using globally. I have my master in Oregon, US and 4 secondaries. California and Virginia, Frankfurt and Sydney. I also have web servers in those same regions as well. Those web servers connect to mongo using mongoose:
var mongoose = require("mongoose");
var dbUrl = "mongodb://***.***.***.***:27017,***.***.***.***:27017,***.***.***.***:27017,***.***.***.***:27017,***.***.***.***:27017/exampleDb";
var dbOptions : {
   "replSet": {
      "rs_name": "exampleRepSet",
      "readPreference": "ReadPreference.SECONDARY_PREFERRED",
      "read_preference": "ReadPreference.SECONDARY_PREFERRED",
      "w":0,
      "slaveOk": true
    }
}
mongoose.connect(dbUrl, dbOptions);

My problem is that my client's have higher latency to the database depending on how far away they are from the master. California get 40ms while Sydney gets 400ms. I don't understand why this is happening since they should be reading off of the secondary database in their region.
I understand that writes must be done to the primary but even if I perform a find then shouldn't it be done on the regional secondary and return pretty quick?
I realize there are some redundant options in that config but I'm getting desperate. I've also tried the option "ReadPreference.NEAREST" to no avail.
Answer: Using "ReadPreference.SECONDARY_PREFERRED" does not provide any such guarantee to read from a node in the same region.
I'm not familiar with Mongoose but the first thing I would do is prove this via the Mongo shell first. Second I would remove the redundancy you acknowledged above. If it shouldn't be there, get rid of it. Via the shell; try using a read preference of "secondaryPreferred" but really what I think you want is "nearest" which will read from a node with the least network latency.
Again; I cannot speak towards Mongoose specifically but there are some non Mongoose related to resolve first per what you shared.
The best this will do is confirm for you if you have a Mongoose issue or not.
Also; using a WriteConcern of 0 and reading from Secondary nodes is not a terrific practice if you rely on the data being on the secondary. If you are okay with the eventual consistency, then a write concern of 0 and reading from secondaries is fine.


Ektron Activity Stream Widget

Question: How activity stream widget in ektron works? I have given object id as "userid" and type as "user".After saving, no ativities of that user is displaying
Answer: Make sure the user you have selected is publishing events to their activity stream in their profile under workarea > settings > users > "Your User" , and then hit edit. All of the items they are pushing to the stream will be listed on one of these tabs.
I believe all the options are turned on by default, but that may vary between versions or be disabled for some other reason. Additionally, the user may simply have marked their activity as private, depending on how much control they have been granted over their own profile.
Please see the ektron reference manual for more details on configuring this widget:
http://documentation.ektron.com/cms400/v802/mobile_help/Advanced/Content/Managing%20User%20Communities/Activity%20Streams/Community_Management_ActivityStreams.htm#Making

Ektron Activity Stream Widget


What is the basic idea behind the renormalization group?

Question: What is the idea behind the renormalization group as it is used in quantum field theory and statistical physics/condensed matter physics? And what kinds of problems can be addressed/solved by using it?
Comment: Idea: physical observables should not depend on where (at what energy scale) you decide to renormalize your system. Application: for instance, it improves your perturbation theory by allowing to sum big logs
Answer: The main idea behind renormalization is the scale invariance of the essential physics.
Shankar's review is a rather good introduction into the subject. In particular, he makes an interesting point about the interplay between the field theories, which suffer from infrared and ultra-violet singularities, and the solid state physics where such singularities do not exist, due to the presence of natural cutoffs. Renormalization group is then essentially studying of how physical properties change with the size of the cutoff, and finding which of the are invariant to the cutoff.
Answer: The basic idea, in very general terms, is explained in
https://mathoverflow.net/questions/363119/every-mathematician-has-only-a-few-tricks/363383#363383
In the notations of that post, and regarding the RG in QFT and statistical mechanics, $E$ is theory space, e.g., the set of all models say living on the unit lattice. For such a model $v_0$, like Ising at the critical temperature and zero magnetic field, a feature of interest $Z(v_0)$ could be "the long distance behavior". If this sounds too vague, then take the exponent of the power law governing the decay of the two-point function. One way one can define an RG map $E\rightarrow E$, is using the block spin procedure, i.e., averaging over blocks of linear size $L$ and multiplying by a suitable power of $L$.
In statistical mechanics, one usually has a given point of interest $v_0$, and the use of the RG amounts to studying the trajectory starting from $v_0$. In QFT, it is more involved because one has a sequence of starting points which depend on the UV cutoff (e.g., $\phi^4$ model with cut-off dependent couplings), then one iterates the RG a number of times dependent on the cutoff up to say some fixed "anthropic" scale. The requirement is then to make sure the obtained effective theories, at this fixed scale, converge when the cutoff is removed. I will not repeat here the details which can be found in this other answer
What is the Wilsonian definition of renormalizability?


Wiring 3-way switch

Question: I'm currently rewiring my basement and have done all the circuits but one. In an effort to save time/effort/money, I was wondering if it was possible to have a circuit with a 3-way switch that controlled lights BOTH between and at the end of the second switch?
Answer: From your question it sounds like you have a series of fixtures, some between the two switches and some past one of the switches.  The key to a successful 3-way switch setup is maintaining the two traveler conductors between the two switches and then choosing one of the two switches as the "in" and the other as the "out".
Usually the "close" switch (the switch where either power comes direct from the breaker or where it comes from the first fixture) will have power and a neutral if it's fed from the breaker, but the distant switch will have just one 4 conductor wire running to it from the first switch, two travelers plus the hot return plus a ground.  If you wanted to put more fixtures beyond that distant switch, you are missing the neutral.
My recommendation would be to find the "hot" point (where power first enters from the breaker) and identify the switched hot plus the neutral, and run standard 3-conductor from there to the additional fixtures. You might get lucky and find that where your fixtures need to go is closer to the "hot" point anyway.  If not, sorry about your luck but it's time to buy some more romex!
Answer: Yes, but you'll need to run /4 Romex from the way to light in the chain all the way to the second switch, something like this:

circuit in -(/2)- first 3-way switch -(/3)- first light -(/4)- second light -(/4)- second 3-way switch -(/2)- third light

Wiring 3-way switch


How To Remap This Clouds Shader To Wrap Around Volume Cube Made Into Sphere?

Question: today I am making a procedural Earth-like planet in Geometry Nodes, but I am deviating from the tutorial to add a nice looking cloud layer that works in Eevee. I have run into a snag as to how it maps the shader, and I can only get the clouds to appear in the upper half of the volume cube. I'm including the blend, thankfully it's a small file size, as the Cloud material is very complex and I can't capture it in a screenshot. If I were to make an educated guess, I'd say it looks like there is a cut-off in the coordinates at the z-axis 0 point, as it is cutting off right at the ground level. I don't know, math is where I always get hung up and have to ask for help. Thank you for your continued assistance.
Edit: I found the solution in the Clouds shader, there is a Flat Mask and I just had to adjust the color ramps on it to spread the Clouds across the full sphere!
Edit: To avoid having to start a whole other topic, I've run into another issue. I'm trying to use my attribute "mountains" (The mountains) to change the roughness map. I managed to make it work for the bump map, but every combination of Math node settings, Mix Color node settings, and Mix node settings seems to override one of the maps or removes the specularity of one of the maps altogether. I'm still new to understanding attributes and the like, but I'm perplexed why it was straightforward for the bump but not for the roughness.
Answer: I found the solution in the Clouds shader, there is a Flat Mask and I just had to adjust the color ramps on it to spread the Clouds across the full sphere. Now I'm just stuck figuring out how to do the roughness map.


How to choose a foreign language to learn based on my interests?

Question: I already know Russian and Ukrainian, I study English.
I'd like to find the next language to learn.
In fact, I'd like to know all the Romance languages, but I should start somewhere.
To begin with, I'm a programmer and study computer science at the university. I'd like to get a master's degree in another country.
In Germany and France, there is the possibility of receiving a free higher education, but neither French nor German do I like because of phonetics.
If I start learning German, it will be useful to me only in Germany. But if I start learning French, I can use it in France, the UK, Canada and other countries.
Moreover, if I know French, it can help me immigrate to Canada, although Canada is not the first in the list of countries for my immigration.
I'd like to learn Spanish, because in Spain there are funny girls!
Speaking of my interests, this is programming, music (pop, pop rock, folk, country (bluegrass), blues, jazz, classical music).
I also really like reading books. Fantasy and detective stories.
Which way will be right if I want to master several languages?
Thanks in advance!
Comment: You got a downvote (not by me) because some of our members are much stricter about on and off-topic question. This is quite off-topic, because it is a personal advice based on opinions unlikely relevant to someone else. But when you have more specific questions about learning, ask away! Reading is excellent way to learn languages, see [graded readers](https://languagelearning.stackexchange.com/questions/tagged/graded-readers)  for any language of your interest, like [English](https://languagelearning.stackexchange.com/questions/3313/graded-readers-for-english)
Answer: You seem to have a pretty good grasp of your priorities. We, strangers on the internet, can not make your life decisions for you.
As a factual point, German is also useful in Austria and Switzerland, at least.
I recommend that you try the various languages a little bit (maybe study each a bit via Duolingo or a similar free platform) and then make a slightly more informed choice.
Note that French and Spanish are both Romance languages, so they will support each other more than German will either. Learning both at the same time might also lead to minor setbacks.
Answer: You need to think not only interest but also the ultimate goal.
Funny girls speaking Spanish are also all over Latin America :-)
For immigration, higher level of English alone is preferable to "some" English and French, including Canada.
Just FYI, immigration to USA is quite unpredictable process. In Canada or Australia/NZ, you first immigrate, then look for a job. In USA, you try to win a H1B lottery to get a job permit, they you pay lawyers some more to get your permanent residency, and many years later, you might get permanent residency, if your company did not went bankrupt in between (which almost happened to me). Or can try to win "Green Card lottery" - Diversity Visa Lottery.
Scandinavian countries (Denmark, Sweden) and Netherlands have liberal immigration policies and (I believe) in many companies you can go by in English (but you should still learn local language), and might have affordable education too. But that would be better answers on Expats SE.
So this is not a "language learning" question, but priorities/goals question, and you need to do much more research about your goals and priorities. "Wants" versus "needs" and all that.
Answer: Wanting to make money is a terrible motivation for learning a language. The desire for a monogamous romantic relationship is a little better, as long as it is coupled with a genuine love for the language and culture themselves. For this purpose, you can do a lot worse than move to China, South Korea or Southeast Asia.
The best motivation is from a hobby other than making money or love.
You say you want to attend a foreign university. There are famous ones throughout Europe that trace their origins to Medieval times, so Spanish, French, Italian or German will all do for this purpose, and you can rule out French and German because of your phonetic preferences.
If you like classical and rock music, you really should reconsider German. Portuguese has good jazz, and so does French (think Montreal Jazz Festival). If you like mystery novels, learning Norwegian or Swedish will help you read Stieg Larson and Jo Nesbø in the original. As for fantasy, again, GERMAN (i.e. Brothers Grimm, Richard Wagner), or maybe Finnish from which Tolkien derived his Elvish tongues.


How do I get a bank account for political party?

Question: We created a political party in UK. And now we need a bank account in its name. What are the banks that have political party type account? Or will a business account do the job?
Comment: Hi and welcome. Please take a moment for our [tour]. This does not look to be on topic, consult our [help/on-topic] for a better picture of what you can ask about.
Comment: @notstoreboughtdirt I think it is a constructive subjective question about which a long enough answer can be written.
Comment: @user8262214 Could you explain what you mean by "political party type account"? By most metrics a UK political party is just a membership 'club', which might be registered with the Electoral Commission if people want to stand for elections in its name
Comment: have you asked your own personal bank about it ?
Comment: Other than asking your bank about it, ask the UK electoral commission https://www.electoralcommission.org.uk/
Comment: @Max Nope. I need a bank account for party, and I need to know the right procedure for that in UK.
Comment: For any legal persona (corporations, clubs, ngos) to operate you should first register it with the appropiate authority, which will then provide you with the documentation needed to perform its activities (among them opening bank accounts). If you just meet with some people and want to call it "a political party" that is ok, but legally that party does not exist and therefore it cannot be a part of a contract.
Comment: @SJuan76 Is that a statement of UK law? It certainly used to be the case that small organisations didn't always need to register, qv. eg. http://www.smallcharities.org.uk/starting-new-charity-faqs/#c5230 for charities.
Comment: This does not appear to be about "governments, policies and political process". It is not clear that the OP has "done his homework" (by, for example visiting a bank). Nobody here can give a definitive answer since we are not bank managers sitting with a prospective client.
Comment: I think this is more about how bank account creation works, maybe try: https://money.stackexchange.com/
Answer: I've done banking in the UK for charities and sports clubs. Any high street bank will have some type of account for such organisations, which is likely to be appropriate for a new political party. It may be known as a club account, community account, treasurer's account, or something else. Here are some general advice pages for the UK:

Scout out a good bank for your club (Daily Telegraph)
Bank accounts for community groups (ResourceCentre)

If your party becomes particularly large and successful, its financial affairs will become more complicated; but this is something you can discuss with your bank if and when it happens.
Your party will of course need to comply with relevant laws on political parties and election funding, but the bank is unlikely to have any responsibility for this. (As an analogy: If you were running a charity, it wouldn't really be the bank's job to check if you were handling money in accordance with the legal requirements for charitable status.)
Answer: Political parties usually (always?) are considered non-profits, so whatever legislation applies to non-profits applies to your new party.
You basically need to show up at your bank and open an account like you would for any other business, the difference being that you're a non-profit rather than a for-profit organization.
Comment: FYI, "non-profit" and "for-profit" are US terms which are not really used in the UK.
Answer: I am not sure there is a special type of account for political parties (it might operate as one for a company), but there are certain rules that might pop in when opening an account or after its creation:

special reports for Electoral Commission

All party headquarters, and those accounting units with income or
  spending of over £25,000, have to send us annual statements of their
  accounts. We publish parties' statements of accounts online to ensure
  there is transparency about their income and spending.

bank can close the account(s) under certain conditions

[...]Like most other commercial
  organisations, banks and building societies are under no obligation to
  continue doing business with someone if they do not consider it
  appropriate to do so.

E.g.: Barclays Bank bans BNP accounts
It would be interesting to know if any of the criteria or extra checking applied to politically exposed persons apply in this case (could not find information about this).
Comment: The Politically Exposed Person thing is interesting, but I'm 99.9% certain the OP is *not* already a member of the UK Parliament. Just being a parliamentary candidate is not enough to make you a PEP.


Check corrupt mysql Database table

Question: I am trying to check for corrupt tables in mysql database while it is running. This check will be done in a service which will run continues. I was looking at mysqlcheck, but the documentations says that it locks and unlocks a table. Is mysqlcheck time efficient to use in a service, and if not what is a better approach/
Comment: No you don't. If corruption happens too frequently for your taste, you'll need to find the reason and address it. If MySQL encounters a corrupted table, it will write a record in the error log; it should be sufficient to monitor that.
Comment: How often are you encountering corrupt tables in MySQL that this is something you need to continuously monitor for?
Comment: yes it is something i need to continously check for. One corrupt table will affect other components
Answer: I won't answer the question you asked; instead I will try to dissuade you from thinking you need to ask that question.
Do not use MyISAM; it can become corrupt sometimes, (rarely).
Do use InnoDB; it essentially never becomes corrupt, even across nasty crashes.
Do not expect any disk crash to be repairable.  Use other techniques to recover from such.
Bottom line:  mysqlcheck is often needed for MyISAM after a power failure.  However, mysqlcheck is both useless and unneeded for InnoDB.
Comment: +1 for crashes *not* being repairable.  If someone crashes their car, they probably wouldn't try to drive that car again straight away - they would get /another/ car that is safe to use.  This is why [we] DBAs make such a "Song and Dance" about keeping /proper/ Backups.

Check corrupt mysql Database table


What's this pink flower in my lawn? Is it poisonous? I am in the UK

Question: What's this pink flower in my lawn? Is it poisonous? I am in the UK
Comment: Looks more like candy than a flower.  Can you remove one with the root and take a closer picture?
Answer: I think it's possibly Lathraea clandestina at the bud stage, although this usually appears in spring rather than autumn - how the flowers develop will confirm or deny this ID.  Its common name is purple toothwort, and it's rather uncommon in ordinary gardens, usually appearing near trees or in wooded areas, though you can actually buy it at garden centres. It isn't poisonous, and is usually associated with tree roots; it is considered parasitic because it gets all its nutrients from another plant's woody roots, which is why it doesn't have any leaves, but does not cause damage to any tree its associated with. Further info here https://www.first-nature.com/flowers/lathrea-clandestina.php
If, as it develops, it becomes obvious it is not Lathraea, please post another photograph...
Answer: That looks more like a pelleted rat poison. Something like Final Rodenticide.


facebook iframe app - how to organize and write code for faster page loading - PHP SDK

Question: I am writing an app within a facebook iframe and am unsure how best to write this.  I originally wrote all the code within the main canvas.php file but found everything was running too slow before results were being loaded into the iframe.
I then tried using the php header location method so to try and load different pages into the iframe, thus reducing page load time.  However, the header location is ignored.
I have also tried using javascript to get the page to load within the iframe instead, this does load in the new page but the page experiences lots of problems.  It wil not pass parrameteres to itself using $_GET.
Basically, I need to perform some checks when the canvas page is first loaded in the iframe and then re-direct to another file to avoid the checks being perfomed on every page load as this seriously shows everything down.  I then need to have page reloads with different parrameteres in the URL to populate the iframe with different results, again this is very slow as it has to perfomr all the checks again.
Therefore, how can I achieve a smooth workflow as a normal site within a facebook iframe?
[EDIT]  Just thought is Ajax a valid option?
Many thanks in advance.
Answer: Most people experience slow response times due to not having a channelURL specified.  See http://developers.facebook.com/docs/reference/javascript/

Channel File
The channel file addresses some issues with cross domain communication
  in certain browsers. The contents of the channel.html file can be just
  a single line:
It is important for the channel file to be cached for as long as
  possible. When serving this file, you must send valid Expires headers
  with a long expiration period. This will ensure the channel file is
  cached by the browser which is important for a smooth user experience.
  Without proper caching, cross domain communication will become very
  slow and users will suffer a severely degraded experience. A simple
  way to do this in PHP is:

The channelUrl parameter is optional, but recommended. Providing a
  channel file can help address three specific known issues. First,
  pages that include code to communicate across frames may cause Social
  Plugins to show up as blank without a channelUrl. Second, if no
  channelUrl is provided and a page includes auto-playing audio or
  video, the user may hear two streams of audio because the page has
  been loaded a second time in the background for cross domain
  communication. Third, a channel file will prevent inclusion of extra
  hits in your server-side logs. If you do not specify a channelUrl, you
  can remove page views containing fb_xd_bust or fb_xd_fragment
  parameters from your logs to ensure proper counts.
The channelUrl must be a fully qualified URL matching the page on
  which you include the SDK. In other words, the channel file domain
  must include www if your site is served using www, and if you modify
  document.domain on your page you must make the same document.domain
  change in the channel.html file as well. The protocols must also
  match. If your page is served over https, your channelUrl must also be
  https. Remember to use the matching protocol for the script src as
  well. The sample code above uses protocol-relative URLs which should
  handle most https cases properly.


DDMS mode in eclipse ,issue pulling a file from an android device

Question: I need to pull an sqlite database my android app is creating to check some details and data, i can do it when using the emulator , but find the "data" folder empty when a i use a real android device,could someone help with this issue ?
thks in advance.
Answer: What i did was rooted my device and manually extracted the sqlite db from the app's directory.
you can also find apps that extract the db for you! you need to be rooted!


Correct ISO week numbering in Crystal Reports XI

Question: How can I get the ISO-8601 week number of a given date in Crystal Reports XI?
Answer: Crystal Reports supports the DatePart-function which can give you the ISO week number of a given date.
NumberVar week := DatePart("ww", date, crMonday, crFirstFourDays);

However, in Crystal Reports XI there is a bug that gives erronous results round new year. The best solution is probably to create an own function getISOWeekNumber:
Function (optional DateVar d := CurrentDate)
NumberVar week := DatePart("ww", d, crMonday, crFirstFourDays);

// Correct for that CR doesn't handle the fact that the last days of a year can belong to week 1 of the next year:
if week = 53 and DatePart("ww", cDate(year(d) + 1, 1, 1), crMonday, crFirstFourDays) = 1 then
    week := 1

// A bug in CR makes DatePart return values like 9363 for days in January that belongs to the last week of the previous year.
else if week > 53 then
    week := DatePart("ww", cDate(year(d) - 1, 12, 31), crMonday, crFirstFourDays);

week;

To get the "week-year" of a specific date, you could then use the following function:
// Returns the year to which the ISO week of the specified date belongs.
// E.g. 2012-12-31 will return 2013, as that date belongs to week 1 of 2013.
Function (optional DateVar d := CurrentDate)

NumberVar week := getISOWeekNumber (d);

if week = 1 and month(d) = 12 then
    year(d) + 1
else if week > 10 and month(d) = 1 then
    year(d) - 1
else
    year(d);

Comment: As counter-intuitive as it is to me that Dec. 31, 2012 should be considered week 1 of 2013, it looks like you're right. This is a bug with 2008 as well.
Comment: If you want every week to have 7 days (which you as good as always want) you have to decide what to call the week that spans the new year. Calling it "2012-53/2013-01" would perhaps be more intuitive, but arguably not better. ISO-8601 simply names the whole week after which year most days in the week belongs to.


What is an e-mail client?

Question: What is an e-mail client? Why might I need one? If I am sending e-mail, I log on to my service provider (e.g. Yahoo!) directly. Where does an e-mail client fit in in this scenario?
Comment: I was afraid of the day someone asked this question.
Comment: @Lord Torgamus: fyi, both "e-mail" and "email" are valid.
Comment: Why do we have a web interface to our e-mails? I love e-mail clients.
Comment: @grawity, that depends on which style manual an organization follows. Unfortunately, SU doesn't have one.... I tend to change it if I'm already editing something, but I won't choose to edit something _just_ to make that one change.
Comment: An e-mail client is handy [when nightmares occur](http://mashable.com/2011/02/27/gmail-glitch). :-)
Answer: A client is a program/user that uses resources of another machine, called a server.  An email client is a program that uses email resources (reading, sending) from a mail server.  Webmail front ends (hotmail, yahoo, web gmail) are all mail clients.
But when you say 'mail clients' you tend to think of stand-alone programs for mail.  Some well known stand alone clients: Outlook/Entourage, iMail, Eudora, Thunderbird.  Your iPhone/iPod Touch has a mail client. Android phones and Blackberry phones have them.  For old school geeks like me, pine, elm, mutt, even mail and mailx.
So, advantages of a standalone client over say, webmail?

One, history, what you're used to.  Email predates the web by many years.  There simply were no webmail clients because there was no web. The interfaces are cleaner. Very resource light, can run in a terminal, they are so non-featured that there are pretty much no viruses for them.
Another used to be offline access - you could download mail, go offline, read it, compose messages, get online and send. This is less required now with always on connections, and now HTML5/Google Gears allows the tools for offline access in Webmail, though Gmail is the only one I know that uses this.
Another and probably the one most important now is the mail UI. A native standalone-client app has UI advantages over a webapp. I still prefer the tabbing and window usage of a native app such as iMail or Thunderbird than even a very nicely written webmail client such as gmail. There are just some things it can't do. It's even more critical on smaller screen devices such as ipods. A client can use native UI buttons and slides and all where a webapp can't, or not as well.

Downsides to standalone clients:

Requires a download. OK, not so bad.
Requires configuration. You need to know two servers, outgoing (SMTP) and incoming (IMAP or POP3).

Pop3 was made when people had one machine, so the model is you have one client that you always use to get your mail. I check mail on at least 2 machines, 3 if you include my iPod. So getting a consistent view of your mail is very hard. IMAP is a newer protocol, so the model is a view on the server which helps across machines, but not everyone uses it (Yahoo only has POP3 on free accounts for example). I'd never set up a POP3 client for anyone because they'd probably lose track of message locations.
The configuration can be hairy too, with choices of SMTP, IMAP, POP3, and various ways of securing these. Webmail just has a URL, when you open it you log in. All your mail is there, you can go from machine to machine and get the same view. No SMTP ports, no radius authentication if you're unlucky enough to need to care what that is.

TL;DR: a mail client is any program that accesses mail from a server, though it's somewhat implied it's a standalone client. Standalone clients have some advantages (UI mostly), but usually the config problems make it easier to just use webmail clients exclusively.
Answer: An email client is the program that lets you send email. The Yahoo web interface is an e-mail client too, but not all services have a web interface, so you can use a desktop client (like Outlook) as a generic client for those services. Or even if they do have a web interface, it might be convenient to have a tool that downloads the email directly to your desktop or smartphone.
Comment: Desktop or more recently *mobile* client. The Internet is full of *Sent from my iPhone*.
Comment: Desktop in the broadest sense. A smartphone is just a computer with a desktop too. I even mentioned smartphones in my answer.
Answer: Having an internet connection is a given. Nowadays at least. In the past internet was costly. You wanted to make a connection, quickly download all your mails to the mail client application and then disconnect. After reading your mails and writing your own a new connection was made, mails send, and connection closed.
Comment: In other words, you wouldn't want to stay online (blocking the phone line, so no other calls could be made, even if the call was free) while you type new or browse emails. An email client lets you do that offline, then quickly dial up, send, disconnect. Always-on broadband still isn't available worldwide you know, some people still have modems.
Answer: An email client that runs on your computer gives you following advantages over an email client running on the web server of your email provider:

You can choose the email client of your liking.
You can use the same email client when you switch providers, or even use multiple providers at the same time with the same client.
A local email client can integrate well with other software on your computer. For example, you can use a PIM suite to manage your emails, contacts and appointments, interlink them and make your computer remind you when your appointments are coming, automatically send emails to the other attendants, etc.
You can use digital signatures and email encryption through the use of PGP. The first lets you prove your identity to the recipient while the second lets you send confidential emails. While technically possible with a web email, it's either too inconvenient or too insecure to be feasible.
Your data is safer. Your email provider might go out of business, or they might decide to cancel your account because you violated their TOS. If you used a local email client and configured it to store all the email, you won't lose your old messages if this happens.
You have slightly more privacy. While the email provider can still read the contents of all your emails, and know the addresses of all the parties in your conversations, they won't be able to track how often you read email, when you read them, which emails you read, etc. If you delete the emails from the server the provider won't be able to track which emails you've kept. You can also use encryption to protect the email contents as mentioned above.
If your internet goes down (e.g. there was a power outage, a cable failure, the government decided to shut it down or you just went into some deep cave with no internet connection), you could still access your email if you configured your email client to keep it.

Of course there are disadvantages:

With a web client you can access your email from any PC without the need to install any additional software.
You might need to use your notebook at a place where everything but web access is blocked. Then your email client won't work.
Sometimes the web client offered by the provider is very good and it might provide features that no local client does.

The first two can be remedied if you mix a normal and a web-based client for your email. Some web email services offer you with access through a normal email client, so you can use that to read email when at home or on your laptop, and login through the web interface at other places (although it can be argued that doing so is not secure, and you better do it from a second disposable email account).
Even if you don't really like to use a local client, it might still come in handy when you decide to move from one provider to another. If both offer an IMAP access, you can temporarily use an email client to move your emails from the first provider to the second.

What is an e-mail client?


Sum $x_1^{2015}+x_2^{2015}+x_3^{2015}+x_4^{2015}$ where $x_1, \dots, x_4$ are the roots of $f=X^4+4X^3+6X^2+aX+b$

Question: Consider the polynomial: $$f=X^4+4X^3+6X^2+aX+b$$
We know that $f$ has four real roots. Let $x_1,x_2,x_3,x_4$ be the roots of this polynomial. How can one compute $$x_1^{2015}+x_2^{2015}+x_3^{2015}+x_4^{2015}?$$
If $a=4$ and $b=1$, we obtain a self-reciprocal (palindromic) polynomial. We can write $f=(X+1)^4$, thus $x_1=x_2=x_3=x_4=1$. Hence the sum computes to $-4$.
Are there any other cases to consider ($a,b$)? I thought using the formula for the quartic equation and paying attention to the cases where we have only real roots.
Any ideas? Thank you!
Comment: Note that in case $a=4, b=1$ you don't obtain $f=(X-1)^4$ but rather $f=(X+1)^4$ which yields $x_1=x_2=x_3=x_4=-1$ and hence the sum computes to $-4$.
Answer: We know the following to be true:
$$
\tag1x_1+x_2+x_3+x_4 = -4
$$
$$
\tag2x_1x_2+x_2x_3+x_3x_4+x_4x_1+x_1x_3+x_2x_4 = 6
$$
$$
\tag3x_1 x_2x_3+x_2x_3x_4+x_3x_4x_1+x_4x_1x_2 = -a
$$
$$
\tag4x_1x_2x_3x_4 = b
$$
Now we can square $(1)$ to get
$$
\begin{align}
(x_1+x_2+x_3+x_4)^2 = &x^2_1+x^2_2+x^2_3+x^2_4\\
&+2[x_1x_2+x_2x_3+x_3x_4+x_4x_1+x_1+x_3+x_2x_4]
\end{align}
$$
Substituting in values from $(1)$ gives
$$
\begin{align}
(-4)^2 &= x^2_{1}+x^2_{2}+x^2_{3}+x^2_{4}+2(6)\\
16&=x^2_{1}+x^2_{2}+x^2_{3}+x^2_{4}+12\\
4&=x^2_{1}+x^2_{2}+x^2_{3}+x^2_{4}
\end{align}
$$
Using the Cauchy-Schwartz Inequality, we get
$$
\left(x^2_{1}+x^2_{2}+x^2_{3}+x^2_{4}\right)(1^2+1^2+1^2+1^2)\geq (x_{1}+x_{2}+x_{3}+x_{4})^2
$$
where equality holds when
$$
\tag5x_{1} = x_{2} = x_{3} = x_{4}
$$
Thus, the equality condition holds, because $4\cdot 4= (-4)^2$. So from $(1)$ and $(5)$, we have $$x_{1} = x_{2} = x_{3} = x_{4}=-1$$
Setting the values of $x_{1} = x_{2} = x_{3} = x_{4}=-1$ in $(3)$ and $(4)$, we get $(a,b)=(4,1)$, which is thus the unique solution. So we can evaluate the sum as
$$
\begin{align}
x^{2015}_{1}+x^{2015}_{2}+x^{2015}_{3}+x^{2015}_{4} &= (-1)+(-1)+(-1)+(-1)\\
&=-4
\end{align}
$$
Answer: Note that $x_1+x_2+x_3+x_4=-4$ since $f=(X-x_1)(X-x_2)(X-x_3)(X-x_4)$ and we can just compare the coefficient of $X^3$. We can use this idea to get larger powers.
Similarly we can get $x_1^2+x_2^2+x_3^2+x_4^2=16-(2\times 6)=4$ and use a similar trick for cubes.
Define $Tr(x_1^i)=x_1^i+x_2^i+x_3^i+x_4^i$. This function has a deeper meaning, but all we shall use from it is that is additive, ie $Tr(a+b)=Tr(a)+Tr(b)$, which you are welcome to prove if you wish.
Now for higher powers we note that $x_1^4=-4x_1^3-6x_1^2-ax_1-b$ hence using this identity we can write $x_1^{2015}$ in the form $Ax_1^3+Bx_1^2+Cx_1+D$ and use the additive property of the trace function $Tr$ I defined above and the values we worked out for these to get an exact answer.
Comment: Meaning of the $Tr$ function is not clear to me. Is it $Tr(x) = x + a + b + c$, where $x$ is an argument and $a,b,c$ are parameters?
Comment: If you plug a root $\alpha$ of $f$ in then $Tr(\alpha^i)$ gives you the sum of the roots to the same power and the additive property allows you to extend this to a full definition. Technically it is the sum of all the galois conjugates of an element over the field extension if you understand that.
Comment: Is it a function of the root, or root in the power of $i$, or all roots?
Comment: When we adjoin all the roots of the polynomial to our field $\mathbb{Q}$, we get a new field $K$, and then $Tr:K \rightarrow \mathbb{Q}$ as a function.
Comment: So in particular, it is a function on any $\mathbb{Q}$-linear combination of the roots and their powers.


Quickly build a Drupal website from another Drupal website

Question: I have an existing website in Drupal, say abc.com, and it's in english. Now I want to quickly build this website for different domains. The layout remains same, but the language and images may change. How can I do this and how quickly can it be done? Should anything be done on the first site so that building the second site becomes easy like profiling or something?
Answer: There are several tools available to make this easier. Some benefit greatly from being applied, while some can be added in hindsight without issues.

Drush make, allows you keep a file with the definition of which modules, their versions, any patches etc, you need to build your site. This then makes it easy to quickly pull in all the modules again when you need to set up a new site. It also happens to be very useful whenever you need a workflow that includes patched modules.
Features on the other hand, allows you to take the configuration you make with your modules, such as Views, Panel Pages, Contexts and more, and export it to a module. To some extent, this module requires you to have thought about features from the beginning. Some things, blocks and their settings for example, cannot readily be exported this way, meaning that those will either need to be manually configured after the new site is setup, or be replaced by something. I use Panels content panes in place of blocks, largely for this reason.
An Install profile finally allows you to tie number one and two together.
In the install profile, you first define dependencies on a few core modules, then on all your features, and finally on any other modules you need, that aren't pulled in by features. Then when you run the install, all of your modules will be enabled automatically. This part can easily be done in hindsight, but then you always end up with some amount of custom work that depends entirely on your site, and can't quite be captured in another way, and needs custom code to run during install. This step has proven to require quite a bit of work when colleagues of mine have attempted this after the site is already built.

This approach can readily be, and should IMO be, applied already when building the site initially, but can also be used afterwards to help cloning a website. Realistically, the second will require more work than the first. It is left as an exercise to the reader to discover other cool benefits of this approach, such as how one can automatically generate demo content and more.
Comment: @Hacker in this model, the language would be set in the install profile, but really, you could just set the language to whatever you want after the site is finished. Regarding content, I was under the impression that you wanted _same site_, _new content_. If you just want to start from an exact clone of _everything_, go with BetaRide's suggestion.
Comment: How about language change? and importing of the content also.
Comment: Drush make is an excellent way of quickly building Drupal sites. We often use this approach to build a standard Drupal setup before moving on to the bespoke elements. Features are also good, as long as they are well thought out to start with; otherwise, you can end up in a bit of a mess.
Answer:
Copy your files.
Copy the DB, backup & migrate module is very useful here.
Adjust settings.php to your new site
Install and configure the new language
Change the images to your needs.

Done.
Answer: Use the Features module:

Features provides a UI and API for taking different site building
  components from modules with exportables and bundling them together in
  a single feature module. A feature module is like any other Drupal
  module except that it declares its components (e.g. views, contexts,
  CCK fields, etc.) in its .info file so that it can be checked,
  updated, or reverted programmatically.


Is there a package management system for shell scripts on Mac OS?

Question: Is there a package system (think npm, cpan, or even homebrew) that would be suitable for shell scripts?
Comment: @Mark Easily distribute a shell script, ideally with support for updating the script, etc. Lots of people are doing `curl https://install.example.com | /bin/sh` type things, I was wondering if there was a better way.
Comment: Can you expand on what your requirments are?
Answer: Shell scripts don't need much packaging, so most people use a source control system for this. There are dozens of options, but I'd start with github and come back with a more detailed question once the github / source control system broke under the strain of volume of your scripts or the complexity of the situation.
As it stands, we can only guess what your true requirements are since all three examples you list run natively on OS X and you can roll your own packages according to each recipe if you prefer to use them.
For internet hosting, you could easily use GitHub since they host files for download or you could push the files to Amazon S3 and many other cloud hosting services that serve up files for free or inexpensively. Amazon for example allows 5 GB of free space and 20,000 hits per month before you need to pay them anything. Dropbox also has no practical limit on the number of hits, but offers less space initially if you were to sign up for a new account with them.
Answer: If you need traditional revision control, you can easily use GitHub even if you don't know git via their free Mac app. I've done that at https://github.com/tjluoma?tab=repositories.
If you just want sharing, put your scripts on Dropbox. For example, I save mine in ~/Dropbox/bin/ which I've added to my $PATH so they're available on all my Macs. View the file on Dropbox.com and choose the share option, then choose 'Twitter' to get the short URL like https://db.tt/oOYTUPB4 or the longer one like https://www.dropbox.com/s/8l906xc39uo2cbc/dock.sh
The advantage (or disadvantage, I suppose) of the Dropbox version is that it will always share the most recent version of the script without you having to do any sort of official check-in procedure.
The primary disadvantage of the Dropbox method is that the URL leads to a web page for the script, whereas the direct (or "raw") version of the script can be located by adding ?dl=1 to the URL, such as https://www.dropbox.com/s/8l906xc39uo2cbc/dock.sh?dl=1


Optimal rate of convergence for nonparametric estimators in Sobolev space

Question: Given a regression model on interval $[0,1]$
$$
Y_{i}=f(x_{i})+\epsilon_{i},\ i=1,\ldots,N
$$
with fixed design and standard error assumptions $E(\epsilon_{i})=0;\ E(\epsilon_{i}\epsilon_{j})=\delta_{i,j}\sigma^{2}$.
The regression function $f$ is from Sobolev space
$$
f\in W^{q}\left[0,1\right]=\left[f,\ldots,f^{(q-1)} \text{ are absolutely continuous,  } \int_{0}^{1}\left| f^{(q)}(x)\right| ^{2}<\infty\right]
$$
Is the optimal convergence rate with respect to $L_{2}$-norm $N^{-q/(2q+1)}$
? If yes, could you give a reference? If not, what additional assumptions
are required ?
Answer: Yes, this is the classical Pinsker's theorem for Sobolev ellipsoids. Your rate is slightly off; also you need to restrict to $L^2$-balls. Part of the theorem says that, for $R > 0$,
$$
\inf_{T_n} \sup_{f \in W^q[0,1], \|f\|_{L^2}<R} \| T_n f - f \|_{L^2}  = O(n^{-\frac{2q}{2q+1}})
$$
where $\inf_{T_n}$ denotes infimum over all estimators measurable with respect to data. Pinsker actually gave an linear shrinkage estimator that achieve the minimax risk exactly. Pinksker's estimator is, however, nonadaptive---it requires the smoothness parameter $q$ to be known. Later Stein gave a SURE block-threshold estimator that is adaptive over all $q>0$.
Wasserman's All of Nonparametric Statistics should outline these results.


Can I prevent certain users from connecting to a calendar?

Question: I have calendar.  All can view(Read).  I only want certain people to be able to add or edit events on this calendar.  I have most users in a "Read" permissions group and those who will be added events in another.  The problem is, while users in the Read group cannot add or edit events in Sharepoint, they are still able to "Connect to Outlook"  for this calendar and add events there.  Is there a way to disable the "Connect to Outlook' button?
Answer: I just tested this out to confirm my assumptions. The permissions in SharePoint should be carrying through to Outlook. If the user can't add an item to the calendar in SharePoint, they shouldn't be able to add one in Outlook. Can you confirm the user can't add in SharePoint?
In my test, I added a user to the Visitors group, and specifically to the Calendar permissions as Read Only (not View).
HTH
David
Comment: Ah... I see my issue was I was logged into sharepoint as a different user as my outlook... when they both match it works as it should.  Thank you...
Comment: Excellent, please consider marking this question as answered for the community!


Industrial Controller Vs Prototype Controller(Study level Controller)

Question: What is the difference between industrial Controller and prototype(Study)level controllers or Raspberry pi/Arduino Vs. Industrial Controllers(PLC, NON PLC) controllers
Comment: A RPi or Arduino is not a controller. What kind or purpose are you thinking about? Can you elaborate a bit what you want to know?
Comment: I am working on industerial application for example: I have to connect many sensors near about 40 sensors are their. I have to give actuation to 3 phase motors by using these sensor readings and also such many task are their. So for this i dont want to use PLC. I have to use industrial  controller.
Comment: But industrial controllers like the Siemens S7 are PLCs. It's one of the most used industrial controllers of the world. (https://w3.siemens.com/mcms/programmable-logic-controller/en/advanced-controller/s7-400/Pages/Default.aspx) Thus, I don't get what you're asking.
Comment: Thank you for giving me the answer of first question. I want the difference in such manner why we are not able to use prototype controllers(Arduino /pi) as industrial controllers.
Answer: Industrial controllers are driven by really intense quality requirements. For example, a single controller may be responsible for a bioreactor growing a batch of culture worth $1,000,000USD to a manufacturer.  Industrial controllers have to run for months and months without failure.
In contrast, prototype, hobby and study controllers such as the Raspberry Pi and Arduino are designed to support exploration and teaching. Although quality is important, it is not a primary concern. For Raspberry Pi controllers, ease of use is paramount. Raspberry Pi excels at ease of use and is a rich platform for experimentation.
Here's a specific example. Modern industrial controllers support web services for configuration, monitoring and maintenance. And when I set up my Raspberry Pi controller for aeroponics, I also use web services for the same reason.  The Raspberry Pi supports many web servers and I chose NodeJS, which is based on Javascript. Javascript is an interpreted language with automatic memory management. Javascript is a wonderful language for experimentation and exploration. So is Python. But interpreted languages tend to die for mysterious reasons related to memory leaks and fragmentation. Which means my Raspberry Pi dies every now and then for mysterious reasons and has to be rebooted.
These failures that I accept for the Raspberry Pi would be unacceptable for an industrial controller. For industrial controllers, I would choose a C++ web server such as Mongoose, which is small, simple and quite robust. Now I could certainly run Mongoose on the Raspberry Pi, but Raspbian itself might not be best for industrial control. Industrial controllers tend to have custom-built and tightly managed operating systems created by Yocto
Industrial controllers are often subject to strict regulations, especially in the biotech sector, where mistakes can impact human life and welfare. Even simple things like enclosures are regulated. For example, an industrial controller enclosure is often subject to "waterproofness ratings".
Taken together, the stringent constraints on industrial controllers cost manufacturers and consumers a lot, but that cost provides high value in terms of safety and yield. Thankfully, many hobbyists are able to create controllers with equivalent functionality (but with less stringent quality) using MCUs such as Arduino and Raspberry Pi. Indeed the latter provide a fertile frontier of new ideas and techniques for all controllers.


What happens first? .htaccess or php code?

Question: If I use mod_rewrite to control all my 301 redirects, does this happen before my page is served? so if I also have a bunch of redirect rules in a php script that runs on my page, will the .htaccess kick in first?
Answer: The .htaccess will kick in first.  If you look at the Apache request cycle:

PHP is a response handler.  mod_rewrite runs at URI translation, except for rewrite rules in .htaccess and <Directory> or <Location> blocks which run in the fixup phase.  This is because Apache doesn't know which directory it's in (and thus which <Directory> or .htaccess to read) until after URI translation.
In response to to gabriel1836's question about the image, I grabbed it from the second slide of this presentation but it's originally from the book: Writing Apache Modules in Perl and C which I highly recommend.
Comment: Could you post a link to image?
Comment: Interesting, I did not realize logging happened only after the response was delivered. +1 for finding that diagram.
Answer: When a request is made to the URI affected by the .htaccess file, then Apache will handle any rewrite rules before any of your PHP code executes.
Answer: Yes, the .htaccess file is parsed before your script is served.
Answer: .htaccess happens first.
Answer: htaccess is controlled by the webserver. This file will be taken in account before your PHP file.
For example, you could restrict access to a particular folder with your htaccess file. So, it have to be take in charge before your PHP.
Hope this helps.
Answer: The .htaccess is performed by Apache before the php script execution.
(imagine if the php script is executed and then the .htaccess make a redirection to another page...).
Answer: You always can test this with the following command:
wget -S --spider http://yourdomain.com

With this command you see the who is responding to your request.
As all the others mentioned, .htaccess is first.
Answer: So basically, the .htaccess more or less requires the relevant PHP code or files, as according to the rules specified in the .htaccess, meaning .htaccess is run first.


my rasberry pi (3) doesnt have desktop like everyone else

Question: i am finding difficulties with my pi not starting up with desktop screen, is it a simple issue or do i need an update (i am connected to wifi) top image is controller i am using, second is screen upon startup
Comment: What OS are you using. If it's RetroPie you don't get a desktop.
Comment: oh i think it is retropie, thanks that helps me not waste my time trying to figure it out
Comment: If you want the desktop, you can install RetroPie onto Raspbian. There's a guide on the RetroPie website. The RetroPie image (which you maybe using) is supposed to work more like an appliance and boot straight to Emulation Station.
Comment: @mintyfreshpenguin RetroPie IS Rasbpian. It's a collection of packages installed on top of Raspbian.
Answer: You can install the LXDE desktop on your RetroPie image:
https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#where-did-the-desktop-go
If you want to boot directly to your desktop, go to "RetroPie configuration" (in EmulationStation) and select "raspi-config" and change the boot behavior to desktop (Enable Boot to Desktop/Scratch):
https://www.raspberrypi.org/documentation/configuration/raspi-config.md
Answer: Just to clarify a bit, RetroPie is a collection of packages installed on top of Raspbian. There is no need to manually install RetroPie on top of a clean Raspbian image in order to have a "desktop". From RetroPie, you can go to the command line and install any desktop environment that you choose. If you want to replicate a vanilla Raspbian experience, you just need to install the raspberry-ui-mods package.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install --no-install-recommends xserver-xorg
sudo apt-get install raspberrypi-ui-mods


Can you reference Xib files from static libraries on the iPhone?

Question: In my app, i currently have all my code separated into a static library, to make it easier to set up the xcode project targets for the actual app and for unit tests for my code.  The problem with this is that i want to put most of my xib files in the static library as well, but it seems that when i run my app and try to reference the xib it can't find it unless it is included in the actual app's target instead of the static library target.  Is it possible to have xib files and other resources included in static libraries that can be referenced by code in that same library, and if so, how?
Answer: No it isn't possible, because a static library is not the same as a "bundle".
A bundle is a directory that may contain all manner of files including resource files (xib), executable files and static libraries. It exists on the filesystem as a group of individual files.
A static library is a single file that contains classes, code and variables that were linked together by the library creator. It does not "contain" other files, it is essentially a database of compiled code.
Although it would be possible to put the data for the xibs in there, Xcode would have no way of knowing that it was in there, as it looks for them as individual files on the filesystem.
In Mac OS, you may create a "Framework" which is essentially a bundle of code, resources, settings etc which may be reused by multiple projects. However, Apple does not seem to support custom framework creation for iPhone OS.
Bundles
https://developer.apple.com/library/content/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1
Static Libraries
http://en.wikipedia.org/wiki/Static_library
Comment: Just found this, may be of use: http://landonf.bikemonkey.org/code/iphone/iPhone_Framework_Support.20081202.html
Comment: Unless the Xcode Wizards (or whatever we call them on OSX) are wrong, there is no "bundle" on iOS either, leaving me in a marginally suicidal state.
Comment: Thanks for the links.  Would it be possible to organize my xibs into their own bundle and have my library code be dependent on that?  (Sorry if the answer is in that apple doc you provided; i don't have much time to peruse it at the moment.)
Comment: @Yar hopefully you didn't kill yourself, I think  you can add frameworks to iOS projects in Xcode 6
Comment: Add bundle from OS X wizard than after change Based SDK "OS X xx.x" to "iOS x.xx or iOS Latest" in Build setting
Answer: Reply to comment (won't fit in comment box)
No worries, I've been trying to do pretty much the same thing as you for the last week - I'd like to ship a "framework" of xibs, include files and .a libs to a client without giving them all the source code. I couldn't find a good way to do this with bundles either.
For whatever reason, Apple are being particularly obtuse about this - I can't see a reason for them to be so in the case of static libraries (dynamic libraries fair enough).
My solution for now is to manually create a package folder "Foo" that contains the following subfolders:

"include" -> put .h files here
"res" -> put .xib files here
"lib" -> contains "iphoneos" & "iphonesimulator" subfolders each with libFoo.a

Then zip this up and send to the client. The client then:

Unzips the package where ever they like.
Adds the "res" folder under the resources group.
Changes the following target settings:
Other Linker Flags = -Objc -lfoo
Header Search Paths = /include
Library Search Paths = /lib/$(PLATFORM_NAME)

I can probably automate the package creation with some build steps at my end, but the client is stuck with four slightly fiddly steps to get set up.
Comment: `-lfoo' is just the linker flag for "link to library foo'. See http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html. Please upvote if you found this answer useful.
Comment: Can you please explain what the -lfoo linker flag does?  I'm not sure how the compiler processes this.  Thanks!
Comment: Ok, so it's just by convention?  For example if my lib is in package "Thingy", and my output file is "libThingy.a", then my linker flag would be "-lthingy"?  Is that correct?  Also you have "-Objc"--isn't it supposed to be "-ObjC"?  Thanks!  +1
Comment: To answer my own question--sorry i didn't look at the link first--that is correct.  :-)
Answer: I found a perfect solution for this that does all the above automatically and more
https://github.com/kstenerud/iOS-Universal-Framework
Its an xCode plugin
It worked for me like a charm,
It works only for XCode 4 and above
Answer: Yes You can. add a xib file in your library as you would do for any normal project. Then in library project target add the xib file in copy Files section along with .a file.
In your main project where you are using the library, drag and drop the xib file where .a file for library is located.
Comment: You are the only guy who is supporting that It can be done. I tried all the solution, but it is not working for me at all. And just because you are confident enough I am trying harder to do that. Can you please help me with the steps. I am tired of experimenting.
Comment: I am seconding @Rudeboy's request. Did you actually try this or are you just assuming that it should work?
Answer: Answer in including Xib files to your static library.
This time we have Xcode 11, you just create a bundle target in addition to your library target. The bundle template is available on macOS. Then from the library code, reference the bundle to be able to reference the nib. You distribute the library with the bundle.
A detailed video about using Xibs with static libraries below:
https://www.youtube.com/watch?v=WQI02KR9kQw
Answer: When distributing you could also create an SDK. JSON.framework did this in their SVN, and I successfully replicated this. You can see how this was done in http://hltypes.svn.sf.net/ in the hltypes-ios.xcodeproj and the iOS folder in the project.
Primarily you need to "install" into your build folder, and then you need to copy the specially formatted SDKSettings.plist. Then add the path to the SDK into "Additional SDKs" list in application project. Downside of composite SDKs are the need to restart Xcode 3.x whenever this mini-SDK is updated, and Xcode's insistence on constructing a composite SDK created from Apple's base SDK and your mini-SDK (which means you need to wait quite a bit).
Application project still needs to have .xib and other resources manually added.


Analytic Applications of Stone-Čech compactification

Question: Following Bredon's Topology and Geometry, we let $\mathcal{F}$ be the set of all continuous maps $f:X \to [0,1]$ on a completely regular space $X$, define $X \xrightarrow{\Phi} [0,1]^{\mathcal{F}}$ by setting $\Phi(x)(f)=f(x)$ for each $x \in X$ and $f \in \mathcal{F}$, and declare the closure $\beta(X)$ of $\Phi(X)$ in $[0,1]^{\mathcal{F}}$ to be the Stone-Čech compactification of $X$. Munkres writes in Topology that there are "a number of applications [of the Stone-Čech compactification] in modern analysis", which is purportedly "outside the scope of [the] book." I looked at a few sources, including The Stone-Čech compactification by Russell Walker, and failed to find any application of the theorem that is overtly analytic. Perhaps I do not have sufficient background in functional analysis---this is where, I assume, the prototypical analytic applications would be in--to recognize the functional-analytic applications I have encountered, but the point remains that I have yet to see such an example. So:

What are prototypical applications of the Stone-Čech compactification in mathematical analysis, and where can I read about them?
Comment: I think the most important analytic applications of ultrafilters are [ultralimits](http://en.wikipedia.org/wiki/Ultralimit) and Banach limits (in guise of [invariant means on amenable groups](http://en.wikipedia.org/wiki/Amenable%5Fgroup)).
Answer: I'm not sure this is what Munkres is talking about, but here's something he could be talking about. Let $X$ be a completely regular space and let $C_b(X)$ be the ring of bounded continuous functions $X \to \mathbb{R}$. This is a commutative Banach algebra when equipped with the sup norm, and in fact it is a $C^{\ast}$-algebra when equipped with the trivial involution.
Then the Gelfand spectrum of $C_b(X)$ is canonically isomorphic to $\beta X$; equivalently, $C_b(X)$ is canonically isomorphic to $C(\beta X)$. One application here is that by the Riesz representation theorem, positive linear functionals on $C_b(X)$ can be identified with Borel regular measures on $\beta X$. A special case of this construction is described in the Wikipedia article.
Comment: I've added link to the wikipedia article. (I hope this is the one you had in mind.)
Answer: Stone-Čech compactification is frequently mentioned in the book Carothers: A short course on Banach space theory, so this might be a good guess where to look for such applications.
One of the applications is Garling's proof for Riesz representation theorem for $C(K)$, $K$ being compact. The proof is first done for the Stone-Čech compactification of discrete space and then extended to arbitrary compact Hausdorff spaces.
You can check Chapter 16 of Carother's book, or some of the following papers:

D. J. H. Garling: A 'short' proof of the Riesz representation theorem, Mathematical Proceedings of the Cambridge Philosophical Society, 1973 - Volume 73, Issue 03, pp 459-460
D. J. H. Garling: Another 'short' proof of the Riesz representation theorem,
Mathematical Proceedings of the Cambridge Philosophical Society, 1986, Volume 99 / Issue 02, pp 261 - 262
Donald G. Hartig: The Riesz Representation Theorem Revisited, The American Mathematical Monthly, Vol. 90, No. 4 (Apr., 1983), pp. 277-280
One of these papers mentions that this proof can also be found in the book R. B. Holmes: Geometric functional analysis and its applications.

I am making this post community wiki, so that if someone is more familiar with the proof, they can add more details. (I only know that such a proof exists and more-or-less understand what are the basic ideas behind it.)
Comment: The proof of Riesz theorem is mentioned also here: [Proofs of the Riesz–Markov–Kakutani representation theorem](https://math.stackexchange.com/q/1270275#1270384).


Selecting multiple photos on the HTC One X (AT&T)

Question: I just received the HTC One X from AT&T. How can I select multiple photos in the Gallery?
Comment: Have you tried long-pressing (tap and hold) on an individual photo? On the vanilla Gallery that will enable multi-select mode.
Comment: @eldarerathis That doesn't actually work.
Answer: My experience of the One X in order to be able to select multiple items in the gallery you need to first give it a task to do.
For example,

Open Gallery
Hit 'Share' in the bottom left, you'll need a service which takes multiple uploads, such as Facebook
Then you'll see the 'multi-select' grid with tick boxes next to each image which you can then select.

As far as I can see from playing on my device for 10 minutes, there isn't a general 'multi-select' feature. You might try a different gallery app though. I would recommend QuickPic
Answer: Try any Third party Gallery apps like QuickPic Gallery.
Answer: I think multiple selection is (Programmatically) supported in KitKat and newer versions of Android as given in this link.


why creating the opportunity record fails when a donor submit a donation on click & pledge platform?

Question: there is a click and pledge platform integrated with Salesforce . whenever I submit a donation by a web form connected to Salesforce a contact record , a household(account) record and a record in C&P data created automatically.
but as classics , when you create a contact and account , an opportunity record will be created associated to that contact and record
this is the problem I have . this record is not produced because the id which is created by click and pledge on sales force is too long for SF and the insert clause fails
I don't know how to fix and how to check the back end configuration
Answer: Have you tried contacting pledge support . Looks like they might need to change the field size in salesforce.


Total vs. Totales

Question: I was just discussing this with a co-worker of mine. He wanted to use the word "totales" and I didn't think that was correct, so I immediately went to RAE to check but RAE didn't mention anything about it. Doing various searches we came up with very few uses of "totales" so he decided not to go with it, but is it really wrong to use that? It's for the sum of the rows in a table.
Answer: Total:

El total de personas afectadas por la lluvia llega a 250.

Totales:

Los totales de las encuestas se sumaron y dieron como resultado un 40% de personas que prefiere una tablet a un portátil.

Total: singular.
Totales: plural (more than a total).
Answer: For a single column in a table, its sum is a single number: "total".
For multiple columns, a row of per-column sums involves multiple numbers: "totales".

Total vs. Totales


How to verify a CD against an ISO image?

Question: I've got a physical burnt CD and the original ISO image of it. No reference checksum files were provided for the CD contents. How do I check the actual CD is correct (corresponds to the original image) and fully readable?
Comment: Do you mean to check the data on the CD right after it was burned ? Because most burning software tools have an option to check written data (ex Nero).
Comment: I know but I need to to do the check not right after the burning procedure but after some time (after the burning program was already closed), maybe even on a different PC. As far as I know Nero doesn't offer to initiate a verification procedure independently of a burning procedure - it's verification facility is only an add-on for burning and can happen only right after the burning. What I want is to insert a CD, choose an ISO file and click to verify... Another constraint is that I wan't to do this under Linux as I suspect my Windows CD/IDE driver is not ok.
Comment: That's really difficult , are you burning a bootable CD or pure data ?
Comment: A bootable CD..
Comment: FYI, some Linux ISOs have a built-in boot option to verify their contents.  You can use that option and it'll check all the disc's files against a file containing checksums.  You could also run `md5sum` yourself and compare, if you don't want to boot the CD/DVD.
Comment: https://superuser.com/questions/220082/how-to-validate-a-dvd-against-an-iso
Answer: If you still have the ISO, you can compare them byte by byte using cmp. It's a simple enough command and it exits on the first difference it finds, so it's considerably faster than making a checksum if there actually is an error early on.
cmp /dev/cdrom /path/cdrom.iso

Possible outcomes on success:

no output: it's identical and all OK. You may append && echo OK to the command if the lack of output confuses you.
cmp: EOF on cdrom.iso: it's identical but the cdrom has more bytes than your iso file. This is usually due to zero padding at the end of the cdrom. Since that does not matter in practice, it's still a success.

Possible outcomes on failure:

cmp: EOF on /dev/cdrom: for some reason the data on your CDROM is incomplete. Maybe your ISO was too large to fit a real CD.
/dev/cdrom cdrom.iso differ: byte 18296321, line 71780: there is some unexpected difference between your CDROM and your ISO image.
Comment: while diff reports 'differ', your cmp method is awesome!
Answer: First, you rip your CD to a temporary file:
dd if=/dev/sr0 of=copy.iso

Then you check if copy.iso and orig.iso have the same size, for example with:
stat -c '%s %n' orig.iso copy.iso

If the size is identical, it's easy:
sha1sum orig.iso copy.iso

But I noticed that in certain cases the size can be slightly different because there are trailing zeroes in either the copy or the original image. For example, if copy.iso is smaller than orig.iso:
sha1sum copy.iso
head -c $(stat -c %s copy.iso) orig.iso | sha1sum

Of course you should also check that the trailing bytes are just zeroes:
od -j $(stat -c %s copy.iso) orig.iso

The first line, except for the offset, should be zeroes only. The second line should be an asterisk. The asterisk is to avoid showing consecutive identical lines.
Comment: +1 for checksums. This is usually the *de facto* standard for comparing files(or directories) and not caring about knowing the differences(as is the case with diff): more minimal.
Comment: or you can do `head -c $(stat -c %s /path/to/master.iso) /dev/sr0 | sha1sum` to avoid needing to make an image of the burnt CD.
Answer: If the ISO file is the same one used to burn the CD, then here are my two favourites:
diff /dev/sr0 /tmp/file.iso

Compares the recorded image against the image file. If you feel a bit more masochistic, you could try something like this:
sha1sum /dev/sr0 /tmp/file.iso

and compare the signatures. This one's more useful if you already have the SHA1 sum somewhere. Both commands will read the medium to the end.
If you want to do it the way @Marki555 suggests, you'll want to mount both optical drive and image first. Here's a complete script: (you can, of course, dispense with the sudo if you're root — a bad idea, in general)
sudo mkdir /tmp/{a,b}
sudo mount /dev/sr0 /tmp/a -o ro # or whatever
sudo mount /tmp/file.iso /tmp/b -o loop,ro
diff -dur /tmp/{a,b}
sudo umount /tmp/a
sudo umount /tmp/b
sudo rmdir /tmp/{a,b}

Comment: `cmp [-l]` is better suited for binary files. Diff works best on text.
Answer: You can check that CD is fully readable by using dd (for example dd if=/dev/cdrom of=/dev/null). But you can't compare it directly with an ISO image. Each software will create slightly different ISO file (maybe some different headers, or padding), although these different ISO images will all provide the same CD contents (directory structure, file attributes and file contents).
So you can only mount the CD, mount the ISO image and compare it at filesystem level by using some kind of directory comparison tool (sorry, I didn't use any yet on linux).
Comment: Since the cd was burned from an already prepared iso image, there's nothing to be built differently when burning, so you can directly compare the cd with the iso image.
Comment: `diff -r` will compare the directory contents recursively.
Answer: Brasero can do that:
Tools -> Check integrity...
Comment: Brasero is a (Gnome) graphical application available in any Linux distribution. Install it and then go Edit -> Plugins and check File checksum (is checked by default). See [here](https://askubuntu.com/questions/54367/how-can-i-verify-data-after-burn-when-using-brasero-to-burn-a-data-dvd)


What Early Church Father taught that marriage is between a man and a woman?

Question: It is very obvious that marriage biblically is defined as being between one men and women one (Genesis 2:23-24, Matthew  19:5-6, Mark 10:6-8, 1 Corinthians 7:2, Hebrews 17:4) but what Early Church Fathers believed and defined marriage as being between one man and one woman?
Comment: If the Bible clearly defines marriage, what Church Father would disagree? And which would bother to restate the definition?
Comment: Why would any Church Father even think of teaching something that everyone already knows and takes for granted?
Comment: All the church leaders from the apostles and for centuries thereafter took marriage to be between a man and a woman. A more pointed question could be to ask which early church fathers taught marriage to be between two people of the same sex. Mind you, such a question would likely remain unanswered.
Answer: Origen reinforced the biblical rule that marriage is between a man and a woman:
I quote from this website which quotes Origen:
https://www.copticchurch.net/patrology/schoolofalex2/chapter19.html
"Since God has joined them together (a man and a woman in marriage), for this reason there is a gift for those joined together by God. Paul knowing this declares that equally with the purity of the holy celibacy is marriage according to the Word of God a gift, saying, "But I would that all men were like myself; howbeit, each man has his own gift from God, one after this manner, and another after that" (1 Cor. 7:7). Those who are joined together by God obey in thought and deed the command "Husbands, love your wives, as Christ also the Church" Eph 5:25."


Prove $\frac{1}{(y+z) x^4} + \frac{1}{(x+z) y^4} + \frac{1}{(y+x) z^4}\geq\frac{3}{2}$ for $x, y, z>0$, with $xyz=1$

Question: How to prove that $\frac{1}{(y+z) x^4} + \cfrac{1}{(x+z) y^4} + \cfrac{1}{(y+x) z^4}\geq\frac{3}{2}$ for $x, y, z>0$...
I've tried substituting $a=1/x$, $b=1/y,$ $c=1/z$, and also writing the 1 that is being divided into $(xyz)^4.$ In both of those cases I tried applying Titu's lemma, but didn't manage to do anything. In the first case, I've observed that it is similar to Nesbitt's inequality, just with an extra $a^2$,$b^2$ and $c^2$ multiplied
Comment: Hi! What is the context of the problem? What did you attempted?
Comment: I've tried substituting a=1/x, b=1/y, c=1/z, and also writting the 1 that is being divided into (xyz)^4. In both of those cases I tried applying Titu's lemma, but didn't manage to do anything. In the first case, I've observed that it is similar to nesbitt's inequality, just with an extra a^2,b^2 and c^2 multiplied.
Comment: Is this from an ongoing contest?
Comment: Previously asked at https://mathoverflow.net/q/435000/12357
Answer: By arithmetic mean-geometric mean inequality: $y^2z^2 + z^2x^2 \geq 2z^2xy = 2z$. Also, we can use Bergstrom's Inequality (a special case of Cauchy-Schwarz inequality) and arithmetic mean-geometric mean inequality we get
$S= \cfrac{1}{(y+z) x^4} + \cfrac{1}{(x+z) y^4} + \cfrac{1}{(y+x) z^4} = \cfrac{(xyz)^4}{(y+z) x^4} + \cfrac{(xyz)^4}{(x+z) y^4} + \cfrac{(xyz)^4}{(y+x) z^4}\\
= \cfrac{(yz)^4}{(y+z)} + \cfrac{(xz)^4}{(x+z)} + \cfrac{(xy)^4}{(y+x)} \geq \dfrac{(y^2z^2 + z^2x^2 + x^2y^2)^2}{2(x+y+z)} \geq \dfrac{(x+y+z)^2}{2(x+y+z)} = \dfrac{1}{2}(x+y+z) \geq \dfrac{3}{2}\sqrt[3]{xyz} = \dfrac{3}{2}.$
Equality holds when $x=y=z=1$.
Answer: By Holder and AM-GM we obtain:
$$\sum_{cyc}\frac{1}{(y+z)x^4}=\frac{\sum\limits_{cyc}\frac{1}{(y+z)x^4}\sum\limits_{cyc}(y+z)x\sum\limits_{cyc}1}{6(xy+xz+yz)}\geq$$
$$\geq\frac{\left(\sum\limits_{cyc}\frac{1}{x}\right)^3}{6(xy+xz+yz)}=\frac{(xy+xz+yz)^2}{6}\geq\frac{9}{6}=\frac{3}{2}.$$


Does brute forcing require a password and username list?

Question: I have been learning metasploit. One thing I noticed was that, all the videos on YouTube, which said "Brute forcing", used a password and a username list. My question is that, won't this be called a dictionary attack instead? Because as far as I know, brute forcing actually generates a password or a string and checks it.
Answer: A "dictionary" attack is a subset of a "brute force" attack. You are still trying every item in a list to see if it works, and that makes it "brute force". Another type of brute force, of course, is to permute all characters and lengths.
Answer: A dictionary attack only defines the scope of a brute force attack. It means that instead of generating the passwords or usernames, they have been pre-generated in a file, and you should use those instead of wasting CPU cycles on generating passwords and checking if it has been generated before. So No, it is still a brute force attack.
In fact a lot of brute force attack programs and libraries still allow for three types of dictionaries: Username dictionaries, password dictionaries, and combination dictionaries of a username and password combination.
Because it is still entering every possible combination in it's scope and trying them until one works, it is still a brute force attack.
Comment: what if the actual password or the username is not in the dictionary?
Comment: Depends on the program or library. Some will ask if you want to fall back to generating usernames and passwords, some will ask if you want to use another dictionary, some will just exit. It depends on how it was programmed.
Answer: Technically, brute forcing means trying a subset of a set of elements in order to bypass a form of access control, without taking into account the feedback of the form of control, as in the approach doesn't change as it would in the context of a timing attack. Passwords are attempted either until a match is found or the dictionary is exhausted.
Dictionary attacks are meant to speed up the process by skipping, possibly wrong, sequences of characters in favour of ones which are more likely to be remembered; words and/or sequences of words(i.e. pass phrases).
For example x&(fsb}@ is more difficult to remember than question thus the word question is more likely to be used as a credential.
If you want to generate all permutations of n characters, using m characters you would come up with a set of m ^ n elements.
For example if we have a set of characters {'a', 'b'} and we would like to generate all length 2 passwords using these characters we would come up with:
aa,
ab,
ba,
bb

a set of cardinality of 4. Similarly if we would like to increase the length to 3 we would come up with the following set:
aaa,
aab,
aba,
abb,
baa,
bab,
bbb

a set of cardinality 8.
The English dictionary currently has around 171476 words far fewer than all characters of length 6, for example.
Comment: I don't think I agree with any point that you have made in this answer. Do you have any sources to back up these statements?
Comment: @schroeder On which point you do not agree? Yes, which one should I clarify?
Comment: Literally all of them. Brute forcing *has* to take into account the feedback from the form (else how would it know that it succeeded?). Dictionary attacks have nothing to do with what is "most likely to be remembered" but more generally, what set is more likely to succeed. Dictionary attacks *can* make use of dictionary words, but that is not generally true. The string `x&(fsb}@` is a perfectly valid entry in a dictionary, depending on the character space being tested. The number of words in the English dictionary is 1,025,109.
Comment: @schroeder I've meant to say that it works exhaustively simply trying all entries until a valid password is reached or the dictionary itself is exhausted, but it doesn't work like a cryptographic timing attack, as in doesn't change the approach depending on the received output. x&(fsb}@ does not constitute a meaningful word in the English language as in it's not in the dictionary. I was referring to words in current use. Source: http://www.oxforddictionaries.com/words/how-many-words-are-there-in-the-english-language
Answer: In addition to the correct answers so far, not only is a dictionary attack a subset or specific type of brute-force, the two are also typically used together in a real attack scenario.
You would lead with a dictionary attack to check for the most common and most likely usernames and/or passwords early, instead of finding that the password was "password" all along but you started with "aaaaaaaa".
Then, if your dictionary attack is unsuccessful, you would switch to permutated dictionary attacks (typical character exchanged, added numbers, etc.)
And if that fails as well, then you go and do a true brute-force attack, excluding those strings you already tested.