Is Superman really super compared to other Kryptonians?

Question: I remember from somewhere, that Superman's cousin acquired powers faster than Superman himself. Would that mean that Superman is just as strong as any other Krytonian if they were still around in the same environment? Is Superman really super compared to other Kryptonians?
Answer: Yes, Superman was really super even compared to other Kryptonians. (Or at least he was until the DCnU New 52 changed the DC Universe, yet again.) Under the original premise, as the Last Son of Krypton, Kal-El/Superman gained his powers due to the slow and long-term exposure of his body to the radiation of our yellow sun. This made him a force to be reckoned with in comparison to other Kryptonians because of his much greater strength, durability, experience and control in the use of his many powers.
Superman and the rays of the Sun
Yes, according to writers who wanted to boost Superman's powers in the early 1950's he gained extraordinary abilities after his exposure to the Earth's yellow sun. Early Superman was only capable of leaping a quarter of a mile and running faster than a freight train. These modest feats would still make him amazing by the standards of the early 1940-1950s. Take a look at these clips from Secret Origins #1.

Early Superman being heroic, leaping tall buildings and chasing cars on foot.

No, there is nothing currently in science that would explain this, so don't think too deeply, the writers who conceived of Superman's powers beyond those that were derived from Earth's lessened gravity.

They knew next to nothing about stars, solar energy, radiation or properties of stars.

They did not realize how little difference there is between a red sun and a yellow one besides color, energy output and the star's life-span.

This exposure to a yellow sun would activate a process by which his Kryptonian cells would become super-charged and along with the reduced gravity of Earth, make him capable of a host of amazing superhuman abilities, making him one of the physically most power powerful beings on the planet.

That said, over the years, there have been many reboots and changes to the premise of how quickly Kal-El would gain his powers (one continuity had him gain his powers as a child and have an entire career of superherodom as Superboy.) This was later retconned out of existence. Most tales now have Superman gaining his powers as an adult after years of exposure to solar radiation.

This however does not explain the rapid speed that most Kryptonians seem to gain their powers once exposed to the yellow sun of Earth. In the new Krypton stories, the Kryptonians also possess superpowers and this was not after decades of exposure.

So what makes Superman super?
What make Superman super has been characterized by the RESTRAINT he has in the use of his powers. Even when Kryptonians have had powers from the sun, he was often considered stronger due to the amount of exposure he had compared to theirs. Current DCnU seems to be working toward the idea of Kryptonians needing time to gain powers under a yellow sun. Supergirl's spaceship had a device designed to charge her cells with yellow sun radiation.

In earlier continuities, Superman was considered to have a store of internalized energy that had built up over the decades, making him stronger, tougher, with greater endurance than a Kryptonian who found themselves empowered by the sun but not with the longevity Superman would have had being continuously exposed to the power-giving radiations.

His other advantage, played up by writers was his experience with using his superpowers. This may not be as apparent with the reboot of the DCnU but in earlier continuities, his experience being Superman, the use of his powers, the vulnerabilities he had to learn to overcome gave him a decided advantage in a fight with other Kryptonians.

Imagine discovering yourself with the ability to hear all along the auditory range and not having practice discerning which sounds were important, how to differentiate sound levels, and controlling what ranges you were interested in hearing sounds at.

Supergirl is overwhelmed by her new super-senses. Supergirl #2

Now add to that visual acuity through the entire electromagnetic spectrum, telescopic, microscopic visions, energy projection from your eyes, a sense of smell ten thousand times better than a human and all of this happening simultaneously in addition to having strength millions of times greater than you previously had before, all of this would make for a confusing time as you learned to adjust. Did I mention, flying?

In the previous DCU all Kryptonians under a yellow sun, possess vast superhuman strength, speed, and stamina, invulnerability; flight; super breath; x-ray vision; telescopic and microscopic vision; freeze breath; heat vision; and super hearing. If they are trained properly, they will be able to use these abilities with some degree of effectiveness.

Why does Supergirl in the DCnU appear more powerful than Superman?
If previous continuities are any gauge, Kryptonians grow more powerful, the longer they remain under a yellow sun. So both Superman and Supergirl, assuming they do not deplete their store of internal energy (See Doomsday vs Superman in the Death of Superman) will continue to slowly grow more powerful over time.

Supergirl has appeared in conflicts with Superman to be more physically powerful. Superman asserts he has spent his time as a superhuman learning how to restrain his powers to do as little collateral damage as possible.

Exercising restraint often means having to take significant abuse on Superman's part.

Where Supergirl, new to the fragility of the Earth's environment has not yet learned how to control the amount of damage she causes when she uses her powers at their highest settings.

If this does not change, she will most assuredly kill someone, most likely as an unintended consequence of using her powers without a degree of discretion.
Comment: One of the best depictions of Superman's restraint, or lack of, was in the series finale of Justice League Unlimited.  Supes goes toe to toe with a Braniac empowered Darkseid in the middle of an evacuated Metropolis.  Clark makes this great speech about feeling like he lives in a world of tissue paper most of the time, but that he can finally cut loose, because he's found something that can take his full power...a super charged god.
Comment: I had no problem with Clark not flying; I agree that it probably improved the show a lot to save that until the end. I just hated that he seemed to be the *only one* that couldn't fly, thus totally ruining the impact when he finally did.
Comment: one of my biggest complaints about *Smallville* was how every other Kryptonian *except* Clark had full access to and control over their powers, sometimes after minutes on Earth. :\ So much for "no flights/no tights".
Comment: --Complains about seeing finger bones-- --Buries face in hands--
Comment: Smallville was designed to be a soap opera where we would never truly see the hero as we knew him, we would only see him during his journey. This meant he could NEVER be flying since that was the trademark of Superman, his power of flight. It was one of my pet peeves of the show, too.
Comment: @Monty129 - we got a bit of that in Superman vs. The Elite as well.
Comment: Do you have a citation for this? "In the early 1950's he gained extraordinary abilities after his exposure to the Earth's yellow sun" - Wiki lists it as Action Comics #262 (March 1960) - I'm trying to determine how far apart Kryptonite was from the Solar Power explanation
Answer: What makes Superman Super (that is, extraordinary) is not merely the set of powers he has as a Kryptonian under a yellow sun.  Those powers are standard for any Kryptonians on Earth.  What makes him special is his personality.  The way he uses those powers for good is what makes him exceptional.  The story Red Sun is all about this, as it has Superman's ship land in the USSR instead of Kansas, so he's raised by Soviets instead of the Kents.
But purely in terms of powers, he has no abnormal powers for a Kryptonian.  Any other Kryptonian on Earth would gain powers roughly identical to Superman's.  Admittedly the varying physical strength of various Kryptonians would still apply.  So Supergirl would be physically weaker than Superman, simply due to her smaller size and lower muscle mass.
It's unclear from the question what canon or timeframe we should be pulling from here, but in pre-New 52 DC Universe, Zod and friends escaped from the Phantom Zone and were physical equals to Superman.  Later, the shrunken bottle city of Kandor was embiggened, which released 100,000 Kryptonians on Earth, and they were roughly as strong as Superman.  Superman maintained an advantage over them in combat due to his greater experience with his powers.  The other Kryptonians were used to their standard (roughly human-level) level of strength/speed/etc when they received their powers, which took some adjustment.
Comment: Actually, depending on continuity and which Supergirl we're discussing, she could be *stronger* than Superman.  At least one of them was from a Kryptonian sub-race that had a minor mutation which allowed them to process and store the energy more efficiently.  She was stronger, though without the experience.
Answer: I think the reason for other Kryptonians gaining their powers relatively quickly is that planet Krypton possesses conditions that are naturally more challenging that Earth, e.g. higher gravity, a less nourishing atmosphere and higher air pressure etc. Their bodies were naturally stronger and tougher upon arriving on Earth, providing intrinsically elevated physical abilities prior to yellow sunlight exposure.
This may be why Kara seems stronger than Kal in so many iterations of the canon. However, I believe that Kal has a different advantage in that the amount of time spent on Earth, particularly in growing up under its yellow rays, has developed his ability to absorb radiation more efficiently. This therefore allows him to perform greater feats at full strength, making him unique and, ultimately, the most powerful 'superman'.
(Note: I'm watching Man of Steel at the moment so this explanation is somewhat influenced by aspects of the movie's more grounded logic, which brings some interesting theories to the table.)
Answer: FWIW, as memory serves, Kal-El had been designated by OA to become the ultimate Green Lantern for reasons I don't remember anymore. Whether this was genetic, or attitude, I don't know. There is at least one instance where he gets the ring though, in the Elseworld "In Darkest Knight" where Bruce Wayne gets the ring instead of Hal Jordan. Which, when you think about it, makes a heck of a lot more sense than Jordan. But OA gets scared of how powerful Green-Wayne is, and gives rings to Clark, Diane, and I think Barry Allan to take Green-Wayne down. I haven't read it in a long time though, and as memory serves Green-Wayne wipes the floor with them.
Answer: What makes superman special among kryptonions is actually pretty simple. It's the fact that he's a natural birth, it's been said by multiple sources that him being a natural birth allows his body to process solar energy better. Because he wasn't genetically changed and is in fact a more pure kryptonion that the others such as his cousin he us more like the kryptonions of the past who were know for conquering worlds before they became a more scientific culture. The reason why at times Kara has seemed more powerful is due to the fact that due to his need to fit in among humans, kal has been putting barriers between him and his powers since he got them. He would have to work on unlocking them throughout his life hence the reason it took him so long to fly while other kryptonions caught onto it pretty soon. Another reason is that Kara doesn't have the restraint that Kal does, which is something she struggles with throughout her time as a hero.
Answer: Actually some comics state Supergirl's cells are more efficient at consuming the solar radiation of our sun. As such her potential is said to be beyond that of Kal El. That being said he has more experience. And in modern comics Superman is said to be more powerful than all other Kryptonians because he is the reincarnation of the Kryptonian Sun God Rao.
Answer: What people forgot to mention is that Superman absorbs and stores solar energy more efficiently than other Kryptonians. He was the only living natural born Kryptonian. All other Kryptonians were genetically engineered to fit a specific role within society both physically and mentally. So Kal-El's body was that of a pure Kryptonian as opposed to the rest of the population that had had genes removed or spliced or subdued for their specific roles. This gives him more power and free will due to his genes not being altered or mental programing installed in him as opposed to other Kryptonians. But he works so hard at restraint to both not do harm and be human that he looks weaker in initial encounters because he holds back until he gets a feel for how hard he can go.
Comment: Can you offer any actual evidence of this? Or is this just your own headcanon?


Difference between 可能 and 能

Question: I've always wonder what is the difference between the word 可能 and 能. I know it both means can, possible but is there any difference between them?
Comment: 可能= possible ; 能= can/ able to. They are different words
Comment: "can" in English has multiple meaning
Answer: Literally 能 (néng) talks about capability, whereas 可能 (kěnéng) talks about possibility.
Often 能 is used where "capability" takes on a practical sense (not necessarily about being physically able to do something).  Typically, 可能 is used when deciding if something is a suitable thing to do.
We do the same thing in English: I can swim (capability) vs. I can swim in Summer (possibility).
能 and 不能

我能游泳。
Wǒ néng yóuyǒng.
  I am capable of swimming.

This literally implies I am physically capable of swimming.  It doesn't express whether or not I want to go swimming, if I'm allowed to go swimming, and if swimming is a suitable activity (although some of this will be clear from context).
A example where 能 describes a literal capability is:

罗根不是他的真名,并且还不能游泳。  (source)
Luōgēn bùshì tā de zhēnmíng, bìngqiě hái bùnéng yóuyǒng.
  Logan is not his real name, and he cannot swim.

An example where 能 describes a practical capability is:

戴隐形眼镜能游泳吗?  (source)
Dài yǐnxíng yǎnjìng néng yóuyǒng ma?
  [If someone] wears contact lenses, can they go swimming?

Of course, wearing contact lenses has no effect on one's ability to swim.
可能 and 不可能

你可能游泳。
Nǐ kěnéng yóuyǒng.
  You could possibly go swimming.

This indicates the possibility of going swimming; the person we're saying this to may or may not be able to swim.  An actual example is:

你可能游泳或者骑自行车 (source)
Nǐ kěnéng yóuyǒng huòzhě qí zìxíngchē
  You could go swimming or ride a bike

Another example is:

春节期间的水温比较低,我觉得不可能游泳。 (source)
Chūnjié qíjiān de shuǐwēn bǐjiào dī, wǒ juédé bù kěnéng yóuyǒng
  During Spring Festival, the water temperature is comparatively low, I feel it is not possible to go swimming.

In this example, we could change 不可能游泳 to 不能游泳 to talk about a practical impossibility.

Note: I'm a Chinese learner too.  I tried to ensure this is correct, but please let me know if I've made a mistake I'm unaware of.
Comment: You are quite right. I couldn't have a better one.
Comment: I think 能 can speak to capability in a nominal sense too (i.e. 風能,技能,etc). 可 cannot be used this way afaik.
Answer: So you're right about 能. MDBG defines it as:

can / to be able to / might possibly / ability / (physics) energy

But, 可能 on the other hand has a different set of meanings: MDBG defines it as:

might (happen) / possible / probable / possibility / probability / maybe / perhaps / CL: 個|个

Simply put:

能 = able
可能 = maybe

Here's two examples using 去 (go):
你明天能去吗?
Are you able to go tomorrow?
他可能去也可能不去。
He might go and then again he might not.
Answer: I don't understand why no one pointed out the obvious issue with the picked answer's example phrase. It's just plain wrong.

你可能游泳。

Like the second answer pointed out, it's not a verb!

might (happen) / possible / probable / possibility / probability / maybe / perhaps

Nobody in China would say "You possibly swim".
And the picked answer's own translation uses "go"

You could possibly go swimming.

-> 你可能会去游泳。

Difference between 可能 and 能


Services, resources or templates for creating an Android UI design

Question: Are there any online/standalone editors or template collections for designing Android application?
Answer: It would be difficult to find a site with templates for android apps, as each app has different functions. You don't specify what platform you are using for developing them, so I'm assuming you will use HTML. In that case, any template for 320px width or responsive template that includes mobile will work.
If you are creating your app from zero, I'd recommend you start with a UI kit for 'inspiration'. Some are:

20 Useful Tools, Stencils and GUI Kits for Android Developers
35 Free User Interface Kits for Mobile and Web Designers
50 Free UI and Web Design Wireframing Kits, Resources and Source
Files
Comment: Thanks. Maybe mobile adapted website templates will be something that I'm looking for.
Answer: I would suggest for the actual designing you use Photoshop or similar software, then there are a couple of excellent kits which give you the basics.
Googles own set of downloads which covers pretty much every UI element 4.2.1 has.
Android UI Design Kit gives you a collection of "building blocks" which you can edit to suit your design.
Crystal Design Kit is neither for iOS or Android and can easily be adapted to either
Lookamore on the other hand is specifically designed for Android.
For .sketch there is this Android Kit
For prototyping there are a few online tools, although they are very limited unless you are willing to subscribe. Proto.io is widely considered to be an excellent mobile prototyping tool and Fluid UI is also well worth a look.
To help you with design patterns and give you ideas there are sites such as Android App Patterns, DroidStyle and Android Niceties
Also it's worth noting that the most common screen size these days is actually roughly 1280 by 720px and some phones, such as my Sony Xperia Z, have a full HD screen. So it's best to work large and scale down.
And of course you can, as mentioned by Yisela, adapt a web UI kit to suit your needs.


Raspberry to power on Arduino

Question: Ok this may seems a little bit strange question.
For my personal educational purpose only I've built the following:
there are 2 sensors (one digital, the other analogic) connected to an Arduino Uno rev.3. The Arduino is connected via I2C to my Raspberry Model B. Via cron a python script is executed every 5 minutes. The script asks the Arduino for the values of these sensors, wait to get them and stores them in a csv file. So far, so good.
Now I want the Arduino to be powered from a 9V battery. Since the battery won't last very long if the Arduino were to be powered 24/7, I want the Raspberry to power up the Arduino when needed (the Arduino power source has to be the 9V battery), maybe wait a couple of seconds in order to stabilize the sensors, do the magic via I2C and then shutdown the Arduino.
How can I do that?
Thanks in advice.
Answer: Just connect the Arduino a mostfet or power-transitor, to the 9V battery. Have the Pi control whether or not the arduino gets 9V by connecting a GPIO pin to the Gate/Base of the mostfet/transitor.
You could put the arduino into sleepmode, but that's kind of pointless, as the voltage regulation, leds, and other stuff on the UNO board use as much power as the ATMega328 itself.
PS also add a pull down resistor to the gate, so it isn't floating while the pi is booting up, shut-down or powered down. That way the arduino will always be off in those cases.
Comment: N-channel mosfet, with a maximum voltage of at least 12V, and a Drain Current of at least 0.5A. But you'd have a hard job finding one that doesn't meet these requirements (-:.
Comment: Which kind of spec (if any) does the MOSFET have to have?
Comment: A N channel mosfet has to be connected to the negative side of the battery. This is kind of problematic as the ground of the arduino has to be connected to the ground of the pi.

Raspberry to power on Arduino


Vibrato on the viola

Question: I have been the viola  playing for about 2 years, and I feel like now is the time to learn vibrato. I thought I knew how, but it was actually terribly wrong. My sister tried to teach me, but I just don't get it. Could someone please explain it to me in a simple and easy way that I could understand? Thank you so much for the help.
Comment: We got taught it at a very young age as an essential part of how you play every note - before you learn where notes are on a violin, there is a lot of sliding into place, and that is used as a direct start to the vibrato. (I was a Suzuki technique, and this was 40 years ago, so I may be slightly mistaken...)
Comment: Without a teacher in front of you, I feel like your only option is educated trial and error. That's how I learned do vibrato on guitar - which, by the way, took at least a year of continued effort (I had no teacher).
Comment: My mother always told me that good vibrato on string instruments cannot be taught. I wonder if the string players on this site would agree.
Answer: Vibrato consists of letting your finger/hand/wrist/underarm/elbow/shoulder/heart move in a natural movement superimposed on your fingering.  For this to work, finger/hand/wrist/underarm/elbow/shoulder/heart should be supply joined: press any of the joints and it will give way elastically.
If that is the case, getting various amounts of mass to vibrate gently is a reasonably simple and sustainable task, with frequency and strength largely determined by where the focus of the vibration is.
Similar requirements of flexibility and elasticity exist for changes of position.
Answer: Good question.
Here's the golden secret: Start slow. And keep it slow. There are actually different "degrees" of vibrato (wide slow, wide fast, narrow slow, narrow fast...) but for now, it should be extremely wide (too wide?) and extremely slow (too slow.)
There are two steps that I have been taking to learn vibrato, and I will attach a link to the source.

Rubbing.

To get the movement right, put your instrument under your chin and drop the bow. Put your thumb under the wood and hold the instrument's body, right next to the neck. Then slide your fingers back and forth, forward and backward, on the wood of the instrument. The point here is to only move your wrist. This is hard; it's not really natural. That's why we practice it.
Video:

Long, slow, high vibrato.

No video for this one, but it's easier to understand. A few steps:

Set your metronome for 60
Get up into 5th position
Using your second finger, play a very slow vibrato - one movement per beat
Double this to two movements, then four, all the way until eight. Although this may feel slow, this is about the pace that you want to take most vibrato, although slower pieces generally have slower vibrato, and quicker pieces faster vibrato.

Do this last one every day before you play anything else for at least one minute (your hand may be a little sore -- just make sure that you only move your wrist on both of these exercises for now. One problem that I struggle with is trying to do both a wrist vibrato and a full arm vibrato at the same time, and that put my wrist out for a week.) and you will be amazed at how fast it will start carrying into your other playing.
Here's a good page to look at (you will find that first exercise as well as a plethora of other good ones here): http://www.violinmasterclass.com/en/masterclasses/left-hand/vibrato
Happy viola-ing! Or, uh, viola playing! Or, dang it, whatever it is.

Vibrato on the viola


Where can I get information about the FAA "restricted like" license to fly a N aircraft in Italy / Europe?

Question: I have recently bought a N-REG C172 in Italy since 2008 and in fact I have been told by the Italian NAA that my EASA License will be valid limited for flights in Italy. I understand if I wish to fly in other EU countries I should apply for a FAA "Restricted like" License which I can obtain symply by giving a short english language check in recognized FAA offices in Italy. Any Idea about this "restricted" option? Whom should I ask to get more info?
Comment: Why would the FAA have offices in Italy?
Comment: Why would you not just have your plane registered in Italy?
Answer: I don't know what an FAA "restricted" license is, but I guess it may be a foreign-based license issued under 14 CFR 61.75; see this answer for more information.
It's an FAA private license that's linked to your Italian one and it gives you all the privileges of a regular FAA private license, including operating N-reg aircraft anywhere in the world. But note that if your Italian license has more restrictions than the FAA one (e.g. no night flying) then you still have to obey those restrictions.
The process to get one is described here but I believe you have to physically visit an FAA office in the USA to get it.
Comment: In the meantime that's exactly what I've been told by an ENAC (NAA Italy) inspector.
Answer: The license they are talking about is an FAA license issues on the basis of your Italian one, provided that license is up to an FAA standard. See @Pondlife's answer for some links, and here's one on the AOPA website.
The FAA license would be restricted to the privileges of your Italian one. For example, if you do not have privileges to fly at night on your Italian license then you would not be able to fly at night. If your Italian license defines the day as being shorter than the FAA you'd have to use the Italian definition.
To get one you have to show up in person at an FSDO unless the Italian FAA equivalent has an agreement in place where they can validate identity, etc.
Answer: I'm just back from FSDO in Hempstead near NYC with my temporary license and would like to give a feedback to anyone interested.

follow instruction @ https://www.faa.gov/licenses_certificates/airmen_certification/foreign_license_verification/
obtain verification letter from FAA
Schedule a meeting with your FSDO inspector
follow instruction given by FSDO to log in application @ IACRA website  https://iacra.faa.gov/IACRA/Default.aspx
when visiting take your IACRA credentials with you + logbook + license and medical certification
During the meeting at FAA-FSDO you are required to complete your application in front of the FAA inspector and electronically sign (that's why you need your credentials) and prove your Logbook registrered hours as well show original Medical certificate and License, FAA will aslo verify your English knowledge ,in my case a nice conversation about general subjects with the two FAA gentlemen I had in front of me
You will finally be issued a Temporary permit valid 120days
Your definitive "restricted" FAA License will be delivered to your home address within 90days
Your license will give you  a permit to fly an N aircraft only where your original License is considered valid (Europe) and according to ratings and limitations of your original license
Answer: I suggest you to double check the information that "EASA License will be valid limited for flights in Italy". Is that specifically mandated by the FAA? Here in Italy is absolutely commonplace to have D and G registered aircrafts and fly them, also internationally, with EASA or Italian licenses.
Comment: D- (Germany) and G- (UK) registered aircraft are from EASA member states. N- (USA) registered aircraft are not only subject to EASA regulations when they fly in Europe, but also to FAA regulations. As far as I know, the FAA only allows operations of an N- registered aircraft on an FAA license or on a license of the country the aircraft is being operated in. So if you fly an N-registered aircraft in Italy, you have to have either an FAA license or an Italian license. If you then fly into France, you have to have either an FAA license or a French license. See the problem?
Comment: @Caterpillaraoz that might be a decent question to ask.
Comment: @Caterpillaraoz Yes it has, see [this question](https://aviation.stackexchange.com/q/1102/62) and read the comments: voretaq7 asked the FAA for an interpretation and they confirmed it.
Comment: Thankyou for the clarification. Has the problem of multiple states sharing the very same licensing body been clarified by the FAA? From this point of view we are becoming the "united states of europe", it soon will not really make sense anymore to talk of italian or french license.
Comment: @Pondlife Thanks!


How to write to a file in Scala?

Question: For reading, there is the useful abstraction Source. How can I write lines to a text file?
Comment: If you know how to do so in Java then you can use the same in Scala.  Is your question specifically with the Scala standard library?
Comment: @wheaties yes best way to do this in scala
Comment: Lihaoyi's OS-Lib library https://github.com/lihaoyi/os-lib
Comment: This library is really good: https://github.com/pathikrit/better-files
Answer: This is one of the features missing from standard Scala that I have found so useful that I add it to my personal library.  (You probably should have a personal library, too.)  The code goes like so:
def printToFile(f: java.io.File)(op: java.io.PrintWriter => Unit) {
  val p = new java.io.PrintWriter(f)
  try { op(p) } finally { p.close() }
}

and it's used like this:
import java.io._
val data = Array("Five","strings","in","a","file!")
printToFile(new File("example.txt")) { p =>
  data.foreach(p.println)
}

Comment: @RexKerr - I disagree. One should specify the encoding in almost all cases. Most encoding errors I encounter happen because people don't understand or don't think about encoding. They use the default and don't even know it because too many APIs let them get away with it. Nowadays, the most sensible default would probably be UTF-8.

Maybe you only work with English and other languages that can be written in ASCII. Lucky you. I live in Germany and had to fix more broken umlauts than I care to remember.
Comment: @JonaChristopherSahnwaldt - This is a reason to have a sensible default encoding, not to force everyone to specify it all the time.  But if you're on a Mac and your files written by Java are gobbledygook because they aren't Mac OS Roman encoded, I'm not sure it's doing more good than harm.  I think it's the platforms' fault that they haven't agreed on a charset.  As an individual developer, typing in a string is really not going to solve the problem.  (All developers agreeing on UTF-8 would, but then that can just go in as the default.)
Comment: new java.io.PrintWriter() uses the platform default encoding, which probably means that the result file is not very portable. For example, if you want to produce a file that you can later send around by email, you should probably use the PrintWriter constructor that allows you to specify an encoding.
Comment: @JonaChristopherSahnwaldt - Sure, in special cases you might want to specify the encoding.  The default for the platform is the most sensible default on average.  Same as with `Source` (default encoding by default).  You can of course add e.g. a `enc: Option[String] = None` parameter after `f` if you find this a common need.
Comment: @JonaChristopherSahnwaldt +10 for fixing all the broken umlaut. Can't use a hammer, maybe a hole punch? Or are they already holes that need filling, maybe this guy can help https://www.youtube.com/watch?v=E-eBBzWEpwE But seriously, the influence of ASCII is so damaging in the world, agree it should be specified, and default as UTF-8
Comment: Any idea what the NIO version of this would be?
Comment: @JanacMeena - NIO just dumps bytes to a file with `Files.write` so you can just create a string, `getBytes` on it (probably asking for UTF-8 encoding), and pass that to `Files.write`.  It's one-liner, albeit kind of a big one.
Answer: Edit 2019 (8 years later), Scala-IO being not very active, if any, Li Haoyi suggests his own library lihaoyi/os-lib, that he presents below.
June 2019, Xavier Guihot mentions in his answer the library Using, a utility for performing automatic resource management.

Edit (September 2011): since Eduardo Costa asks about Scala2.9, and since Rick-777 comments that scalax.IO commit history is pretty much non-existent since mid-2009...
Scala-IO has changed place: see its GitHub repo, from Jesse Eichar (also on SO):

The Scala IO umbrella project consists of a few sub projects for different aspects and extensions of IO.
  There are two main components of Scala IO:

Core - Core primarily deals with Reading and writing data to and from arbitrary sources and sinks. The corner stone traits are Input, Output and Seekable which provide the core API.
  Other classes of importance are Resource, ReadChars and WriteChars.
File - File is a File (called Path) API that is based on a combination of Java 7 NIO filesystem and SBT PathFinder APIs.
Path and FileSystem are the main entry points into the Scala IO File API.

import scalax.io._

val output:Output = Resource.fromFile("someFile")

// Note: each write will open a new connection to file and
//       each write is executed at the begining of the file,
//       so in this case the last write will be the contents of the file.
// See Seekable for append and patching files
// Also See openOutput for performing several writes with a single connection

output.writeIntsAsBytes(1,2,3)
output.write("hello")(Codec.UTF8)
output.writeStrings(List("hello","world")," ")(Codec.UTF8)

Original answer (January 2011), with the old place for scala-io:
If you don't want to wait for Scala2.9, you can use the scala-incubator / scala-io library.
(as mentioned in "Why doesn't Scala Source close the underlying InputStream?")
See the samples
{ // several examples of writing data
    import scalax.io.{
      FileOps, Path, Codec, OpenOption}
    // the codec must be defined either as a parameter of ops methods or as an implicit
    implicit val codec = scalax.io.Codec.UTF8

    val file: FileOps = Path ("file")

    // write bytes
    // By default the file write will replace
    // an existing file with the new data
    file.write (Array (1,2,3) map ( _.toByte))

    // another option for write is openOptions which allows the caller
    // to specify in detail how the write should take place
    // the openOptions parameter takes a collections of OpenOptions objects
    // which are filesystem specific in general but the standard options
    // are defined in the OpenOption object
    // in addition to the definition common collections are also defined
    // WriteAppend for example is a List(Create, Append, Write)
    file.write (List (1,2,3) map (_.toByte))

    // write a string to the file
    file.write("Hello my dear file")

    // with all options (these are the default options explicitely declared)
    file.write("Hello my dear file")(codec = Codec.UTF8)

    // Convert several strings to the file
    // same options apply as for write
    file.writeStrings( "It costs" :: "one" :: "dollar" :: Nil)

    // Now all options
    file.writeStrings("It costs" :: "one" :: "dollar" :: Nil,
                    separator="||\n||")(codec = Codec.UTF8)
  }

Comment: What about a Scala 2.9 version? :)
Comment: Is this really the current suggestion for Scala 2.10? Use Scala IO? There isn't anything in core Scala yet?
Comment: I've never used scalax.io, but judging from these example lines, it seems that its API design is pretty bad. Mixing methods for character and binary data in one interface makes little sense and will very likely lead to encoding bugs that are hard to find. The design of java.io (Reader/Writer vs. InputStream/OutputStream) seems much better.
Comment: The scalax project seems dead (no commits since June 2009). Is this right? [scalax commit history](https://github.com/eengbrec/Scalax.IO/commits/master)
Comment: @Eduardo: I have completed my answer with the new place for scala-io library (which has been updated for Scala2.9: https://github.com/jesseeichar/scala-io/issues/20)
Comment: @Rick-777: That is true. See my revised answer, with the new place for scala-io library.
Comment: @Phil Scala 2.10 will have one version of Scala IO in it: http://daily-scala.blogspot.fr/2012/07/scala-io-getting-started.html
Answer: Similar to the answer by Rex Kerr, but more generic. First I use a helper function:
/**
 * Used for reading/writing to database, files, etc.
 * Code From the book "Beginning Scala"
 * http://www.amazon.com/Beginning-Scala-David-Pollak/dp/1430219890
 */
def using[A <: {def close(): Unit}, B](param: A)(f: A => B): B =
try { f(param) } finally { param.close() }

Then I use this as:
def writeToFile(fileName:String, data:String) =
  using (new FileWriter(fileName)) {
    fileWriter => fileWriter.write(data)
  }

and
def appendToFile(fileName:String, textData:String) =
  using (new FileWriter(fileName, true)){
    fileWriter => using (new PrintWriter(fileWriter)) {
      printWriter => printWriter.println(textData)
    }
  }

etc.
Comment: Don't get me wrong, I like your code and it is very educational, but the more I see such constructs for simple problems, the more it reminds me about old "hello world" joke: http://www.ariel.com.au/jokes/The_Evolution_of_a_Programmer.html :-) (+1 vote from me).
Comment: If you're writing one-liners, nothing at all matters. If you're writing significant programs (large with an ongoing need for maintenance and evolution), this kind of thinking leads to the most rapid and pernicious kind of software quality degradation.
Comment: Not everyone is going to have "scala eyes" until some level of practice -- it is funny to see this code example is coming from "Beginning" Scala
Comment: The problem is less the Scala tricks here, but the verbosity and poor style.  I've edited this to much more readable.  After my refactor it's just 4 lines (well, 4 with IDE line lengths, used 6 here to fit in the screen). IMHO it is now very nice answer.
Comment: asyncwait "beginning" scala...the most ironic title ever,note: I've the book...and just now I'm beginning to understand it..I suppose than I was a step before "beginner" lol :D ........
Comment: @Jus12 : Don't forget to call fileWriter.close()

def writeToFile(fileName:String, data:String) =
  using (new FileWriter(fileName)) {
    fileWriter => {
              fileWriter.write(data)
              fileWriter.close()
           }
  }
`
Comment: @SandroAthaide `finally { param.close() }` takes care of closing. In fact, that is the only reason for using `using`.
Comment: Took me a while to understand this, but now that I do, it feels quite natural. Is `using` modeled after the python "`with` ... `as`"?
Comment: @mitchus I'm guessing it's based on C#'s `using` statement.  See samthebest's answer for a clearer, more idiomatic implementation.
Answer: A simple answer:
import java.io.File
import java.io.PrintWriter

def writeToFile(p: String, s: String): Unit = {
    val pw = new PrintWriter(new File(p))
    try pw.write(s) finally pw.close()
  }

Comment: As of java 7, use java.nio.file instead:                                                  def writeToFile(file: String, stringToWrite: String): Unit = {
    val writer = Files.newBufferedWriter(Paths.get(file))
    try writer.write(stringToWrite) finally writer.close()
  }
Comment: @samthebest could you add the libraries you `import` from?
Answer: Giving another answer, because my edits of other answers where rejected.
This is the most concise and simple answer (similar to Garret Hall's)
File("filename").writeAll("hello world")

This is similar to Jus12, but without the verbosity and with correct code style
def using[A <: {def close(): Unit}, B](resource: A)(f: A => B): B =
  try f(resource) finally resource.close()

def writeToFile(path: String, data: String): Unit =
  using(new FileWriter(path))(_.write(data))

def appendToFile(path: String, data: String): Unit =
  using(new PrintWriter(new FileWriter(path, true)))(_.println(data))

Note you do NOT need the curly braces for try finally, nor lambdas, and note usage of placeholder syntax. Also note better naming.
Comment: Sorry, but your code is imaginable, it does not fulfill the `implemented` prerequisite. You cannot use the code that is not implemented. I mean that you must tell how to find it since it is not available by default and not well-known.
Answer: Unfortunately for the top answer, Scala-IO is dead. If you don't mind using a third-party dependency, consider using my OS-Lib library. This makes working with files, paths and the filesystem very easy:
// Make sure working directory exists and is empty
val wd = os.pwd/"out"/"splash"
os.remove.all(wd)
os.makeDir.all(wd)

// Read/write files
os.write(wd/"file.txt", "hello")
os.read(wd/"file.txt") ==> "hello"

// Perform filesystem operations
os.copy(wd/"file.txt", wd/"copied.txt")
os.list(wd) ==> Seq(wd/"copied.txt", wd/"file.txt")

It has one-liners for writing to files, appending to files, overwriting files, and many other useful/common operations
Answer: Here is a concise one-liner using the Scala compiler library:
scala.tools.nsc.io.File("filename").writeAll("hello world")

Alternatively, if you want to use the Java libraries you can do this hack:
Some(new PrintWriter("filename")).foreach{p => p.write("hello world"); p.close}

Comment: No longer viable (not in Scala 2.11)
Comment: What are you talking about? `scala.tools.nsc.io.File("/tmp/myFile.txt")` works in Scala 2.11.8.
Comment: It's now in scala.reflect.io.File
Comment: What imports? ie where is File coming from?
Comment: The Scala compiler library.
Answer: One liners for saving/reading to/from String, using java.nio.
import java.nio.file.{Paths, Files, StandardOpenOption}
import java.nio.charset.{StandardCharsets}
import scala.collection.JavaConverters._

def write(filePath:String, contents:String) = {
  Files.write(Paths.get(filePath), contents.getBytes(StandardCharsets.UTF_8), StandardOpenOption.CREATE)
}

def read(filePath:String):String = {
  Files.readAllLines(Paths.get(filePath), StandardCharsets.UTF_8).asScala.mkString
}

This isn't suitable for large files, but will do the job.
Some links:
java.nio.file.Files.write
java.lang.String.getBytes
scala.collection.JavaConverters
scala.collection.immutable.List.mkString
Comment: @ChetanBhasin Probably because `write` will copy `contents` to a new byte array instead of streaming it to the file, thereby at its peak using up twice as much memory than `contents` alone.
Comment: Why isn't this suitable for large files?
Answer: Starting Scala 2.13, the standard library provides a dedicated resource management utility: Using.
It can be used in this case with resources such as PrintWriter or BufferedWriter which extends AutoCloseable in order to write to a file and, no matter what, close the resource afterwards:

For instance, with java.io api:
import scala.util.Using, java.io.{PrintWriter, File}

// val lines = List("hello", "world")
Using(new PrintWriter(new File("file.txt"))) {
  writer => lines.foreach(writer.println)
}

Or with java.nio api:
import scala.util.Using, java.nio.file.{Files, Paths}, java.nio.charset.Charset

// val lines = List("hello", "world")
Using(Files.newBufferedWriter(Paths.get("file.txt"), Charset.forName("UTF-8"))) {
  writer => lines.foreach(line => writer.write(line + "\n"))
}

Answer: A micro library I wrote: https://github.com/pathikrit/better-files
file.appendLine("Hello", "World")

or
file << "Hello" << "\n" << "World"

Comment: Here as well -  This question is one of the top hits when googling how to write a file with scala -- now that your project has gotten bigger, you might want to expand your answer a bit?
Answer: UPDATE on 2019/Sep/01:

Starting with Scala 2.13, prefer using scala.util.Using
Fixed bug where finally would swallow original Exception thrown by try if finally code threw an Exception

After reviewing all of these answers on how to easily write a file in Scala, and some of them are quite nice, I had three issues:

In the Jus12's answer, the use of currying for the using helper method is non-obvious for Scala/FP beginners
Needs to encapsulate lower level errors with scala.util.Try
Needs to show Java developers new to Scala/FP how to properly nest dependent resources so the close method is performed on each dependent resource in reverse order - Note: closing dependent resources in reverse order ESPECIALLY IN THE EVENT OF A FAILURE is a rarely understood requirement of the java.lang.AutoCloseable specification which tends to lead to very pernicious and difficult to find bugs and run time failures

Before starting, my goal isn't conciseness. It's to facilitate easier understanding for Scala/FP beginners, typically those coming from Java. At the very end, I will pull all the bits together, and then increase the conciseness.
First, the using method needs to be updated to use Try (again, conciseness is not the goal here). It will be renamed to tryUsingAutoCloseable:
def tryUsingAutoCloseable[A <: AutoCloseable, R]
  (instantiateAutoCloseable: () => A) //parameter list 1
  (transfer: A => scala.util.Try[R])  //parameter list 2
: scala.util.Try[R] =
  Try(instantiateAutoCloseable())
    .flatMap(
      autoCloseable => {
        var optionExceptionTry: Option[Exception] = None
        try
          transfer(autoCloseable)
        catch {
          case exceptionTry: Exception =>
            optionExceptionTry = Some(exceptionTry)
            throw exceptionTry
        }
        finally
          try
            autoCloseable.close()
          catch {
            case exceptionFinally: Exception =>
              optionExceptionTry match {
                case Some(exceptionTry) =>
                  exceptionTry.addSuppressed(exceptionFinally)
                case None =>
                  throw exceptionFinally
              }
          }
      }
    )

The beginning of the above tryUsingAutoCloseable method might be confusing because it appears to have two parameter lists instead of the customary single parameter list. This is called currying. And I won't go into detail how currying works or where it is occasionally useful. It turns out that for this particular problem space, it's the right tool for the job.
Next, we need to create method, tryPrintToFile, which will create a (or overwrite an existing) File and write a List[String]. It uses a FileWriter which is encapsulated by a BufferedWriter which is in turn encapsulated by a PrintWriter. And to elevate performance, a default buffer size much larger than the default for BufferedWriter is defined, defaultBufferSize, and assigned the value 65536.
Here's the code (and again, conciseness is not the goal here):
val defaultBufferSize: Int = 65536

def tryPrintToFile(
  lines: List[String],
  location: java.io.File,
  bufferSize: Int = defaultBufferSize
): scala.util.Try[Unit] = {
  tryUsingAutoCloseable(() => new java.io.FileWriter(location)) { //this open brace is the start of the second curried parameter to the tryUsingAutoCloseable method
    fileWriter =>
      tryUsingAutoCloseable(() => new java.io.BufferedWriter(fileWriter, bufferSize)) { //this open brace is the start of the second curried parameter to the tryUsingAutoCloseable method
        bufferedWriter =>
          tryUsingAutoCloseable(() => new java.io.PrintWriter(bufferedWriter)) { //this open brace is the start of the second curried parameter to the tryUsingAutoCloseable method
            printWriter =>
              scala.util.Try(
                lines.foreach(line => printWriter.println(line))
              )
          }
      }
  }
}

The above tryPrintToFile method is useful in that it takes a List[String] as input and sends it to a File. Let's now create a tryWriteToFile method which takes a String and writes it to a File.
Here's the code (and I'll let you guess conciseness's priority here):
def tryWriteToFile(
  content: String,
  location: java.io.File,
  bufferSize: Int = defaultBufferSize
): scala.util.Try[Unit] = {
  tryUsingAutoCloseable(() => new java.io.FileWriter(location)) { //this open brace is the start of the second curried parameter to the tryUsingAutoCloseable method
    fileWriter =>
      tryUsingAutoCloseable(() => new java.io.BufferedWriter(fileWriter, bufferSize)) { //this open brace is the start of the second curried parameter to the tryUsingAutoCloseable method
        bufferedWriter =>
          Try(bufferedWriter.write(content))
      }
  }
}

Finally, it is useful to be able to fetch the contents of a File as a String. While scala.io.Source provides a convenient method for easily obtaining the contents of a File, the close method must be used on the Source to release the underlying JVM and file system handles. If this isn't done, then the resource isn't released until the JVM GC (Garbage Collector) gets around to releasing the Source instance itself. And even then, there is only a weak JVM guarantee the finalize method will be called by the GC to close the resource. This means that it is the client's responsibility to explicitly call the close method, just the same as it is the responsibility of a client to tall close on an instance of java.lang.AutoCloseable. For this, we need a second definition of the using method which handles scala.io.Source.
Here's the code for this (still not being concise):
def tryUsingSource[S <: scala.io.Source, R]
  (instantiateSource: () => S)
  (transfer: S => scala.util.Try[R])
: scala.util.Try[R] =
  Try(instantiateSource())
    .flatMap(
      source => {
        var optionExceptionTry: Option[Exception] = None
        try
          transfer(source)
        catch {
          case exceptionTry: Exception =>
            optionExceptionTry = Some(exceptionTry)
            throw exceptionTry
        }
        finally
          try
            source.close()
          catch {
            case exceptionFinally: Exception =>
              optionExceptionTry match {
                case Some(exceptionTry) =>
                  exceptionTry.addSuppressed(exceptionFinally)
                case None =>
                  throw exceptionFinally
              }
          }
      }
    )

And here is an example usage of it in a super simple line streaming file reader (currently using to read tab-delimited files from database output):
def tryProcessSource(
    file: java.io.File
  , parseLine: (String, Int) => List[String] = (line, index) => List(line)
  , filterLine: (List[String], Int) => Boolean = (values, index) => true
  , retainValues: (List[String], Int) => List[String] = (values, index) => values
  , isFirstLineNotHeader: Boolean = false
): scala.util.Try[List[List[String]]] =
  tryUsingSource(scala.io.Source.fromFile(file)) {
    source =>
      scala.util.Try(
        ( for {
            (line, index) <-
              source.getLines().buffered.zipWithIndex
            values =
              parseLine(line, index)
            if (index == 0 && !isFirstLineNotHeader) || filterLine(values, index)
            retainedValues =
              retainValues(values, index)
          } yield retainedValues
        ).toList //must explicitly use toList due to the source.close which will
                 //occur immediately following execution of this anonymous function
      )
  )

An updated version of the above function has been provided as an answer to a different but related StackOverflow question.

Now, bringing that all together with the imports extracted (making it much easier to paste into Scala Worksheet present in both Eclipse ScalaIDE and IntelliJ Scala plugin to make it easy to dump output to the desktop to be more easily examined with a text editor), this is what the code looks like (with increased conciseness):
import scala.io.Source
import scala.util.Try
import java.io.{BufferedWriter, FileWriter, File, PrintWriter}

val defaultBufferSize: Int = 65536

def tryUsingAutoCloseable[A <: AutoCloseable, R]
  (instantiateAutoCloseable: () => A) //parameter list 1
  (transfer: A => scala.util.Try[R])  //parameter list 2
: scala.util.Try[R] =
  Try(instantiateAutoCloseable())
    .flatMap(
      autoCloseable => {
        var optionExceptionTry: Option[Exception] = None
        try
          transfer(autoCloseable)
        catch {
          case exceptionTry: Exception =>
            optionExceptionTry = Some(exceptionTry)
            throw exceptionTry
        }
        finally
          try
            autoCloseable.close()
          catch {
            case exceptionFinally: Exception =>
              optionExceptionTry match {
                case Some(exceptionTry) =>
                  exceptionTry.addSuppressed(exceptionFinally)
                case None =>
                  throw exceptionFinally
              }
          }
      }
    )

def tryUsingSource[S <: scala.io.Source, R]
  (instantiateSource: () => S)
  (transfer: S => scala.util.Try[R])
: scala.util.Try[R] =
  Try(instantiateSource())
    .flatMap(
      source => {
        var optionExceptionTry: Option[Exception] = None
        try
          transfer(source)
        catch {
          case exceptionTry: Exception =>
            optionExceptionTry = Some(exceptionTry)
            throw exceptionTry
        }
        finally
          try
            source.close()
          catch {
            case exceptionFinally: Exception =>
              optionExceptionTry match {
                case Some(exceptionTry) =>
                  exceptionTry.addSuppressed(exceptionFinally)
                case None =>
                  throw exceptionFinally
              }
          }
      }
    )

def tryPrintToFile(
  lines: List[String],
  location: File,
  bufferSize: Int = defaultBufferSize
): Try[Unit] =
  tryUsingAutoCloseable(() => new FileWriter(location)) { fileWriter =>
    tryUsingAutoCloseable(() => new BufferedWriter(fileWriter, bufferSize)) { bufferedWriter =>
      tryUsingAutoCloseable(() => new PrintWriter(bufferedWriter)) { printWriter =>
          Try(lines.foreach(line => printWriter.println(line)))
      }
    }
  }

def tryWriteToFile(
  content: String,
  location: File,
  bufferSize: Int = defaultBufferSize
): Try[Unit] =
  tryUsingAutoCloseable(() => new FileWriter(location)) { fileWriter =>
    tryUsingAutoCloseable(() => new BufferedWriter(fileWriter, bufferSize)) { bufferedWriter =>
      Try(bufferedWriter.write(content))
    }
  }

def tryProcessSource(
    file: File,
  parseLine: (String, Int) => List[String] = (line, index) => List(line),
  filterLine: (List[String], Int) => Boolean = (values, index) => true,
  retainValues: (List[String], Int) => List[String] = (values, index) => values,
  isFirstLineNotHeader: Boolean = false
): Try[List[List[String]]] =
  tryUsingSource(() => Source.fromFile(file)) { source =>
    Try(
      ( for {
          (line, index) <- source.getLines().buffered.zipWithIndex
          values = parseLine(line, index)
          if (index == 0 && !isFirstLineNotHeader) || filterLine(values, index)
          retainedValues = retainValues(values, index)
        } yield retainedValues
      ).toList
    )
  }

As a Scala/FP newbie, I've burned many hours (in mostly head-scratching frustration) earning the above knowledge and solutions. I hope this helps other Scala/FP newbies get over this particular learning hump faster.
Comment: Incredible update. The only problem is that now you have like 100 lines of code which could be replaced with `try-catch-finally`. Still love your passion.
Comment: @Observer I would assert that is an inaccurate statement. The pattern I am describing is actually reducing the amount of boilerplate a _client_ must write to ensure proper handling of closing of AutoCloseables while also enabling the Scala idiomatic FP pattern of using scala.util.Try. If you attempt to achieve the same effects I have by manually writing out the try/catch/finally blocks, I think you will find you end up with quite a bit more boilerplate than you are imagining. So, there is significant readability value in pushing all the boilerplate into the 100 lines of Scala function.
Comment: Sorry if that sounded offensive in any way. Still, my point is that there is no need in such amount of code, because the same could be achieved through non-functional approach with much more simplicity.
Personally, I'd write try-finally with some additional checks. It's just shorter.
If I wanted to use wrappers, ApacheUtils are there to use all the dirty work.
More, all standard Reader/Writers do close underlying streams so your multipwrap is not needed.

P.S. : I've changed my vote from minus one to plus one to support your efforts. So, please, don't suspect me in a bad intentions.
Comment: I understand your point of view. Thanks for discussion, I have to think about it a bit. Have a nice day!
Comment: No offense taken.
Comment: Remember, you are required to meet the explicit contract of AutoCloseable _regardless_ of how some implementations happen to work right now (ex: Java.io.Reader). The method I designed honors that requirement. Consider that at some point in the future, Reader was changed such that you could no longer depend upon it chaining dependent resource closes. And that is a completely valid design change per the AutoCloseable contract.
Comment: Then, any code using my method above remains functioning and stable. However, any code which left out the close on dependent resources (knowing about the _old_ Java.io.Reader implementation) would have a resource leak and then have to be revisited and refactored. This is why adhering to explicit interface contracts is such a high value.
Answer: Here's an example of writing some lines to a file using scalaz-stream.
import scalaz._
import scalaz.stream._

def writeLinesToFile(lines: Seq[String], file: String): Task[Unit] =
  Process(lines: _*)              // Process that enumerates the lines
    .flatMap(Process(_, "\n"))    // Add a newline after each line
    .pipe(text.utf8Encode)        // Encode as UTF-8
    .to(io.fileChunkW(fileName))  // Buffered write to the file
    .runLog[Task, Unit]           // Get this computation as a Task
    .map(_ => ())                 // Discard the result

writeLinesToFile(Seq("one", "two"), "file.txt").run

Answer: To surpass samthebest and the contributors before him, I have improved the naming and conciseness:
  def using[A <: {def close() : Unit}, B](resource: A)(f: A => B): B =
    try f(resource) finally resource.close()

  def writeStringToFile(file: File, data: String, appending: Boolean = false) =
    using(new FileWriter(file, appending))(_.write(data))

Comment: This uses "duck typing" which depends upon reflection. For many contexts, depending upon reflection is a non-starter.
Answer: No dependencies, with error handling

Uses methods from the standard library exclusively
Creates directories for the file, if necessary
Uses Either for error handling

Code
def write(destinationFile: Path, fileContent: String): Either[Exception, Path] =
  write(destinationFile, fileContent.getBytes(StandardCharsets.UTF_8))

def write(destinationFile: Path, fileContent: Array[Byte]): Either[Exception, Path] =
  try {
    Files.createDirectories(destinationFile.getParent)
    // Return the path to the destinationFile if the write is successful
    Right(Files.write(destinationFile, fileContent))
  } catch {
    case exception: Exception => Left(exception)
  }

Usage
val filePath = Paths.get("./testDir/file.txt")

write(filePath , "A test") match {
  case Right(pathToWrittenFile) => println(s"Successfully wrote to $pathToWrittenFile")
  case Left(exception) => println(s"Could not write to $filePath. Exception: $exception")
}

Answer: 2019 Update:
Summary - Java NIO (or NIO.2 for async) is still the most comprehensive file processing solution supported in Scala. The following code creates and writes some text to a new file:
import java.io.{BufferedOutputStream, OutputStream}
import java.nio.file.{Files, Paths}

val testFile1 = Paths.get("yourNewFile.txt")
val s1 = "text to insert in file".getBytes()

val out1: OutputStream = new BufferedOutputStream(
  Files.newOutputStream(testFile1))

try {
  out1.write(s1, 0, s1.length)
} catch {
  case _ => println("Exception thrown during file writing")
} finally {
  out1.close()
}

Import Java libraries: IO and NIO
Create a Path object with your chosen file name
Convert your text that you want to insert into a file into a byte array
Get your file as a stream: OutputStream
Pass your byte array into your output stream's write function
Close the stream
Answer: Similar to this answer, here is an example with fs2 (version 1.0.4):
import cats.effect._

import fs2._
import fs2.io

import java.nio.file._

import scala.concurrent.ExecutionContext
import scala.language.higherKinds
import cats.syntax.functor._

object ScalaApp extends IOApp {

  def write[T[_]](p: Path, s: String)
                 (implicit F: ConcurrentEffect[T], cs: ContextShift[T]): T[Unit] = {
    Stream(s)
      .covary[T]
      .through(text.utf8Encode)
      .through(
        io.file.writeAll(
          p,
          scala.concurrent.ExecutionContext.global,
          Seq(StandardOpenOption.CREATE)
        )
      )
      .compile
      .drain
  }

  def run(args: List[String]): IO[ExitCode] = {

    implicit val executionContext: ExecutionContext =
      scala.concurrent.ExecutionContext.Implicits.global

    implicit val contextShift: ContextShift[IO] =
      IO.contextShift(executionContext)

    val outputFile: Path = Paths.get("output.txt")

    write[IO](outputFile, "Hello world\n").as(ExitCode.Success)

  }
}

Answer: import java.io.File
import java.io.PrintWriter

val file = new File("tmp/cloudwatch/metric.json")
val writer = new PrintWriter(file);
writer.write(stream);
writer.close();

Worked for me
Answer: This line helps to write a file from an Array or String.
 new PrintWriter(outputPath) { write(ArrayName.mkString("")); close }

Answer: If you are anyways having Akka Streams in your project, it provides a one-liner:
def writeToFile(p: Path, s: String)(implicit mat: Materializer): Unit = {
  Source.single(ByteString(s)).runWith(FileIO.toPath(p))
}

Akka docs > Streaming File IO

How to write to a file in Scala?


Unable to use PSSH on Ubuntu

Question: Hi I just installed PSSH on my Ubuntu machine and Iä'm trying to use it to execute commands across multiple machines but I keep getting errors. Here's some sample output to show what's going on.
root@int:~# pssh -h hosts.lst -l mridang -A yakkayakka --print --verbose hostname
Warning: do not enter your password if anyone else has superuser
privileges or access to your account.
Password:
[1] 22:04:21 [FAILURE] XXX.XXX.XXX.XX Exited with error code 255

My hosts file looks like this:
root@int:~# cat hosts.lst
XXX.XXX.XXX.XX

The host exists and I'm able to SSH to it I don't believe it's an SSH issue. My PSSH version is 2.2.2.
(I've edited out the IPs for this post.)
Any ideas?
Thanks.
Answer: I had the same problem just re-installed python-setuptools package and then again pssh.
Seems rare but after that it worked ok.

Unable to use PSSH on Ubuntu


What's the difference between the Video object and the FLVPlayback component?

Question: What is the differences in use of these two objects?
Which one should be used for a "Youtube-like" video player with a custom skin and playlist?
Answer: "Component" really is the key word here, Video is the base object, the FLVPlayback Component is a UI wrapper that uses the Video object internally. It provides a simple interface for developers to add video content, with user controls, to their applications.
Answer: FLVPlayback is a component that already has the controls - scrollbar, play/pause button...etc. Video object is an object that only has the video area.
If you want to do something like the YouTube player, you will need to start with the FLVPlayback component and skin it (Example). But you will have to build a playlist by yourself or use the List/DataGrid components in flash.
Answer: FLVPlayback component is a controller for the Video class, and it implements some UI logic.
Not only does it add a skinnable UI, it also implements something called "ActionScript cue points", which you can add at run time.  It's probably a very simple mechanism that peeks at the playback time at preset intervals and executes any overdue cue points in order.  I implemented something similar for having external cue points for SWF files.  As mentioned in the link, this method of dispatching cued events is probably less accurate than embedding cue points in the video (claiming it can be off by as much as a tenth of a second), but I think it's more flexible, and I wouldn't expect the margin of error to be any greater than the frame delay (e.g. ~16ms at 60fps) if you just implemented this simple feature yourself.
For a YouTube-like player, I'd use the Video class, because I'd have complete control over UI, which is very simple anyway (involves calling methods like play, pause, resume, seek, and listening for a few events).  You wouldn't be tied into the existing skinning system, and it would also give you more control accessing frames of the NetStream for generating frame previews when seeking.


Acceptable # Lines of Code for Projects to be Presented to Interviewer?

Question: I'm going to graduate soon and I've been thinking. I have a few really small projects/scripts (~100-200 LOC) that I made on my free time and I have them on Github. I was wondering if they are "worthy" enough to be presented to future employers? Or should I only include those that are big (~1000 LOC)?
Comment: Employers don't even like a resume/cv over one page; doubt they'll read 1000+ lines of code
Answer: When we interview, we ask for this on the final interview. I will start by saying that size doesn't matter and then qualify a little (isn't that always the way).
If I ask someone to submit a piece of code they feel proud of and want to stamp their name to and they send me a single file then I'm going to lose confidence. In one case, I received a long ASCX code-behind file and there is nothing I can read into that except "boy does he like his code in the UI layer".
In other cases, I've received entire sizable projects. On one hand, that makes me more confident, but it also gives me a lot to pick holes in without digging very deep.
But here's the secret: the code itself doesn't matter that much. I can pick holes in anything you give me. What matters is how you react. Don't be argumentative for the sake of it, but also don't agree with me for the sake of it. I may not actually believe what I'm saying, and even if I do I will respect you for backing your code in a constructive way.
Comment: What if it was a really, really good single file? One of things i've done recently that i'm most proud of is a one-line awk program!
Comment: @Tom, hey, I have some of those too (mostly C++), but I wouldn't submit them for an interview. I'm going to go ahead and assume they want readable code if I'm going to work in a team.
Answer: It's not the size of the project.  It's the quality.  Take the time to do it right so that it is worthy of being a portfolio piece.  So long as the project is sufficiently large enough to demonstrate the knowledge you want to convey, only quality will matter.
Comment: Completely agree!  The purpose of presenting something to an employer (though this approach may not be applicable to all jobs) is to show that you have a talent that they want/need... Honestly an employer isn't always going to want to dig through a whole bunch of code to consider you for a position.  But if you have a piece of code that in condensed and extremely well thought out and helpful and you can explain why and how it is helpful and a good representation of your skills then use it!
Comment: Not just the quality - the *value*. Something high-quality in 100LOC, 1000LOC, 1000000LOC doesn't matter if no one cares about it and it doesn't solve an interesting problem. Regardless of what field you are in, you are always a more attractive prospect if you can advertise yourself as someone that can independently find good problems to solve and create value in doing so.
Answer: I think the question depends on how and when you are planning to present them to a future employer. Are they going to a line item on your resume or are employers asking you to give short descriptions of something you have done during an interview?
For a line item on the resume, I would lean toward just bigger projects. On the other hand, a smaller script is something you could describe to an interviewer in not much time and the full content could be grasped.
In the end, it depends more on how interesting the thing you are mentioning is. If the script does something that novel and happened to not take much code to do, there is weight to that.
Answer:
"Judge me by my size, do you?" - Yoda

What completely matters is the quality. An impressive project is determined by the amount of things it can do, and the complexity of the things it can do, and that's all that matters as far as the end results are concerned.
If your project has 1,000 lines, of which the same 100 lines of code feature has been copied 10 times with slight modifications each time, then you're going to look like a bad programmer. You're going to look like a bad programmer because you would have failed to create something well. You'd have failed to keep your project maintainable, readable, manageable and scalable.
Just create things really great things well. There's no need to even consider length.
Answer: I personally do not thing the #LOC should be the determining factor. Instead I think it should be the creativity, complexity, and problem the project solves that should determine the code samples you submit. Most employers do not want to pour through lines of code just to find a snippet that proves to them that you understand complex algorithms and the like. If you are able to produce projects that display your skills without much to sift through I think that ultimately is a more impressive quality than sheer amount of code lines. That being said, having the link to a large project is useful if they were able to just compile the project and make sure that it is working. However all this really shows is your ability to write a program that appropriately separates concerns.
Answer: Size doesn't matter (as in LOC) really. It is (almost) in direct correlation with the language (more vs less lines for the same thing), so it would be unfair to judge anything on that basis.
I would more rate project as big or small, based on their number of features, personal interest to me, and the number of users it helped solve a problem (this should've been the first in the list).
Answer: Coding is like sculpting - it's not about writing more, it's about taking away what's not necessary.
A programmer's job is not to produce lines of code; the job is, instead, to figure out, from all the masses of junk code that could possibly be written, what's the smallest, cleanest set that will solve a particular problem.
If one of your projects shows the smallest possible, simplest, cleanest solution to a problem, use it as a reference. If it doesn't, don't.
Answer: I was never asked to provide code samples to an interviewer. Usually companies who want to make sure you know how to think and code give you an exam then in the technical interview you may be asked to write a little algorithm but most of the technical interviews I made for developers or made for me where discussions.
Comment: I suggest bringing a portfolio of code with you to the interview, even if it hasn't been requested.  There's no better way to show that you're actually able to write code.


What's the difference between the 'magic' and 'spells' tags?

Question: This question got me thinking: any question tagged spells can also be tagged magic, and they seem to serve a similar purpose. What's the difference between the magic and spells tags, or are they similar enough for one to be synonymed into the other, or for them to be replaced with a new tag?
Comment: There's also [tag:spellcasting], currently [suggested for a synonym of the spells tag](http://rpg.stackexchange.com/tags/spells/synonyms).
Answer: Speaking from a D&D point of view, the two things are pretty different. Spells is only one of the possible manifestations of magic along with spell-like abilities (most "spellcaster" monsters and prestige classes), supernatural abilities (most other sort of magical monsters and classes), invocations (dragonfire adepts and warlocks), powers (psions, but it might as well be a completely different thing than magic under different optional rules), mysteries (shadow magic), enchantments (items) and magic effects not replicable by anything in the rules.
So, spells is specific and magic is generic.
I'm perfectly aware this only apply to D&D 3.x, previous D&D editions and Next (D&D 4e has a different concept of spells that is more fluff-related but still has spells as a subset of magic), but a distinction it is.
In the question you linked, Detct Magic is a spell that can detect any form of magic.
Comment: +1, as this is the correct answer. The terms are non-synonymous in a number of systems, as well as in the fiction  those systems represent and draw on. While there is some overlap, they definitely reflect different areas of potential interest and expertise.
Comment: Re 3rd paragraph: in this regard 3.x is no different from earlier editions, 4e, or 5e: magic is the general metaphysics and spells are one possible kind of manifestation/technique.
Answer: I'd say that "spells" are specific, codified, mechanical effects, and "magic" is the in-fiction structure that makes "spells" work.
Comment: Yes. So "How much damage does my 7th-level wizard's *magic missile* do" is [dnd-5e][spells], while "What exactly is the Weave?" is [dnd-5e][magic]. (Making no claim about whether those would be *good* questions, though.)
Comment: And that is meaningful use of a tag why?
Answer: Quite frankly it's sometimes a semantic issue.  Magic is not always an active thing.  In L5R there's something called Kiho which are magical effects, but ultimately these are not spells.  There abilities that are channeled through things like Shadowlands Taint and The Nothing that are magical in nature (as in supernatural) but are not spells.  What does count as spell use is the traditional magic forms used by shugenja that quite literally derive from written scrolls, spoken and sometimes performed in a specific fashion so that there is any result at all let alone the desired effect.
In essence, magic can exist in many passive forms, sometimes even active ones but a spell almost always between the systems I have personal experience with relates to something that requires exact and almost ritualistic execution.
Answer: The difference is only meaningful within a game system, so I think we should synonym spells->magic. Who's an expert in "spells" and not "magic" within a game?  No one...
Comment: Well... they're very different, in that not all magic is in the form of spells. As a result, `spells` says something different than `magic` about the content of a question. (Still ambivalent towards the synonym, but it's still worth noting.)
Comment: That might be true, but the opposite is not. Who's an expert in "magic" but not "spells"?


When changing airlines on different tickets, do I have to go through customs in Oslo?

Question: I'm taking a flight (Delta Airlines) from the United States, landing in OSL (Oslo, Norway), getting on a flight with a different airline (British Airways), which will take me to my final destination in the UK. I have no checked bags. I know I will have to go through customs in the UK, but will I have to go through customs and security in OSL to get to my other flight, or will I be able to stay in the terminal and switch gates?
Comment: Are you worried about Immigration, Customs, Security, or all three? (They're different things!)
Comment: updated question to specify  Oslo in title, as it varies for different airports.
Comment: I guess I would be concerned about any of them. I'm traveling for a vacation so I don't think Immigration would apply to me, but I asked this question because I want to know what to expect in Oslo.
Answer: Since you have no bags, no customs. Passports can be bypassed but it usually doesn't save any time.
All non-Schengen aircraft park at the far end of the international pier. That includes your flight and your onward BA flight.
The easiest way, if you have a U.S. or EU passport, is to go through passports into the Schengen zone, follow the corridor to transits, go through security again and then passport exit control (again) back into the non-Schengen pier.
Now at the first passport control there is a little door that takes you straight back into the departures security without any passport control. If you have a passport that is going to cause a lot of problems, you should use it. You ring the intercom and explain you are doing a non-Schengen to non-Schengen and eventually an agent comes along and opens the door. But if all the passport agents are busy processing passports it might take a while before they have the time to let you through. So for an EU passport holder it can be quicker to go through passports.
What you're talking about can be done in three minutes if you are at the front of the U.S. inbound aircraft with an EU passport. If you are at the back behind everyone else it might take twenty minutes.
You should obtain your BA boarding pass on the BA App on your phone to save time. Otherwise go to the BA gate ASAP and explain that you transferred and do not have a boarding pass.
Answer: Here's the instructions for OSL https://avinor.no/en/airport/oslo-airport/plan-your-trip/transfer/

Contact the border control for help to get to the non-Schengen transit area.


(Simple?) applications of Class Field Theory?

Question: Does anyone know any simple/nice applications of class field theory?
I would really like to find one related to diophantine equations, but anything you got would be good.
Thanks
Comment: I am told that Cox's _Primes of the form $x^2 + ny^2$_ is a good resource for this. Class field theory can help answer the question of, well, which primes can be represented in the form $x^2 + ny^2$ for fixed $n$.
Comment: Cox's book is great, I was wondering if there was any other examples, like x2+ny2, where class field theory helps.
Answer: You might like Class Field Theory and the First Case of Fermat's Last Theorem by Lenstra and Stevenhagen. The first case of FLT is that we cannot have
$$x^p+y^p+z^p=0 \ \mathrm{and} \ xyz \not\equiv 0 \mod p.$$
Lenstra and Stevenhagen use computations with $p$-power reciprocity laws in $\mathbb{Q}(\zeta_p)$ to show that, if the first case of FLT were solvable, than $p$ would have many special properties such as:
$$2^{p-1} \equiv 1 \mod p^2$$
$$3^{p-1} \equiv 1 \mod p^2$$
$$2p+1, 4p+1, 8p+1, 10p+1 \ \mbox{are all composite}$$
Using these conditions and ones like them, one can rule out all primes under $10^{18}$. These conditions were already known by other methods; the contribution of this article is to provide very short and uniform proofs from Class Field Theory.
This isn't an easy article -- following all of the details involves understanding Class Field Theory very well. But I think it is as well written as possible, given the subject matter.
Comment: If I recall it correctly,  the first statement follows simply by applying Eisenstein's reciprocity law, as Furtwängler has shown.
Answer: In my very first research paper, I needed extensions of $\mathbb{Q}$ with dihedral Galois group and with lots of ramified primes of a particular kind. Even though these are non-abelian extensions, their existence can be shown using class field theory.
I used this to say something about growth of Selmer groups of elliptic curves, which are Diophantine equations in two variables of degree 3. Not sure if that qualifies for you as applications to Diophantine equations.
Answer: If you have studied global class field theory then there are many uses. Firstly the Cebotarev density theorem appears as a generalisation of Dirichlet's theorem...and it is a nice little exercise to see how Dirichlet's theorem falls out if you explicitly use the cyclotomic extension $\mathbb{Q}(\zeta_n)/\mathbb{Q}$.
Also the Artin reciprocity law explains all previously known reciprocity laws and provides a more general setting for them...it gives a reciprocity law for every single abelian extension! For example, quadratic reciprocity follows from it. Read Cox to find out how.
Cox also is a master of the subject of primes of the form $x^2 + ny^2$. Suffice to say it is easy to see that this is really the same question as determining which primes split into nice ideals in the order $\mathbb{Z}[\sqrt{-n}]$ of $\mathbb{Q}(\sqrt{-n})$. Depending on what $n$ is you can find major uses for the Hilbert class fields and the ring class fields in getting congruence conditions for such a prime to have the above form! Which path you use depends on whether $\mathbb{Z}[\sqrt{-n}]$ is the full ring of integers.
Answer: Artin reciprocity:
Let $K$ be an abelian field extension of the number field $F$, then the Dedekind zeta function of $K$ factors into a product of Hecke L functions of $F$ (associated to one dimensional representation of the Galois group).
Comment: Two corrections to a generally good answer: (1) You mean the Dedekind zeta function of $K$, not $F$. (2) The fact that $\zeta_K$ is a product of $L(\chi, s)$ for $\chi$ one dimensional characters of the Galois group is "just" formal manipulation. The fact which uses CFT is that these $L$-series can be written down explicitly using Grossencharacters.
Comment: Matthew might like to look at my answer http://math.stackexchange.com/questions/80265/splitting-of-primes-in-an-s-3-extension/80280#80280 , where I describe how to write down the splitting of primes in the splitting field of $x^3-x-1$, using that this is a cyclic extension of $\mathbb{Q}(\sqrt{-23})$.


Editing Grammar

Question: I often fix grammar on questions, including capitalization errors, misspellings, etc. I've been doing this for a while, maybe two weeks or so. No one has really said anything about my edits until today. A user asked me to "stop proposing minor edits". Lots of my edits do happen to be minor, but I don't purposely do small edits just for reputation. So the question is should I keep fixing grammatical issues/spelling even if it is a minor edit? I think editing these issues helps with readability, but I'd like to hear what other users think.
Comment: I personally think it's okay, however most people are not going to agree.

Remember other people are going to need to review the edits, is your edit worth the time of up to three other people?

Just make sure that you fix all the issues with the post and not just correct a couple of things.

If there are lots of minor spelling/grammar mistakes then it will be probably okay.
Comment: I love those kind of questions on meta's sites, always good to see new people wanting to know how things work here.
Comment: @JonathanDrapeau Thanks Mr. Drapeau. I think it would be helpful if this info was given while edting or something. Since I am fairly new, I'm sure plenty of other n00bs don't know this kind of stuff. :P
Comment: @TheUnicornMaster I think you need to start looking at how you're approaching edits. What I see you doing is adding filler to meet the character requirement and not actually improving the post, like removing pharses like "Thanks, please help, please", and focus on getting to the point.
Comment: @oamlyya I removed stuff like this because I thought it wasn't needed. I did not intend to add filler, but I will keep this in mind in the future
Answer: I believe the user you're referring to is me. I've been noticing a lot of edits from you lately that seem to hit the minimum character limit of suggested edits. Specifically, this edit is what spurred me to comment. On the face of things, the only improvement is adding an apostrophe into, "I'm". The rest of the change is superfluous, and adds no value. From my view, it was done to hit the six character minimum for edits. In cases like that, even with the improvement at the beginning, I'd judge the edit as no improvement.
While it would technically be an improvement, its so minor that we shouldn't encourage, nor reward, single character edits.
This isn't to discourage you from suggesting edits; its just that you should make them count. Two people have to review your edit, so if you're going to take up their time, let's not waste it on minor apostrophe edits, please.
Comment: For what it's worth, I think the main issue is the fact that these minor edits end up in the review queue and thus cost other users time to review. Once you get enough rep to edit without review, such changes aren't bad (as long as you don't do 20 at once and spam the front page with edits).
Comment: This is silly - the review queue is almost non existent. If it is an improvement (which you yourself admitted) why not just let him do it? I'd rather have properly spelled and grammatically correct posts.
Comment: If a post only needs minor improvement, committing a major change just so you can say you left your mark on it seems like abuse.  Also, there's an 'improve edit' button in the review queue for a reason; if you see something that somebody missed during their edit, you can help them out and top it off!  Collaborate!
Comment: @TheUnicornMaster when you have more than 2,000 rep, you can edit posts without having it reviewed, but until then - 2 people (with 2000+ rep) have to review your edit.
Comment: Thank you for your answer. You were the user I was referring to and I've looked over a lot of my recent edits and noticed they were pretty poor. I didn't know that two people ave to review an edit. I will be sure to keep this in mind. thanks again!
Comment: I'm not sure about this site, but over on stackoverflow they tend to allow more leeway on minor edits if the question is new (maybe within 12 hours?).  Fixing grammar in old questions is generally frowned upon (specifically if your edit needs to be approved).
Comment: @Chippie I'm learning a lot today XD thanks
Comment: @CamelCase I sure am not giving any leeway on SO or here for newer questions/answers. Edits must be worth my time to review, regardless of the age of the edited content.
Comment: @walrushelmet If a user is making superflous edits to hit the minimum character limit, that tells me the edit is too minor.  As it was, it was a wash.
Answer: I don't see why any edit that objectively improves a post should be declined. Even if all an edit does is add an apostrophe to contractions, that makes the post more proper and more readable, and is an objective improvement. If I saw such an edit, I would click approve.
I don't think it's worth the approver's time to consider whether something is enough of an improvement. Just consider whether there is improvement at all. Any improvement is better than none. Incremental improvement is still improvement.
Of course, if you're going to suggest edits, then do make an effort to improve the post as much as you can at that point in time. But if you see something blatantly formatted wrong, and all you have time to fix is the obvious formatting before you have to rush off to whatever plans you have, I think it's worth taking the time to suggest something rather than nothing, rather than worrying that "something" isn't "enough".
tl;dr: Objective improvements should be approved, even if they're small, and even if there are still more improvements to be made.
Comment: The other thing to consider is that there's already a automated mechanism in place that stops edits that are 'too minor': Users suggesting edits can't suggest them unless they change more than a certain amount (it's been so long I can't remember how much haha). Thus rejecting as 'too minor' seems like a waste of everyone's time.
Comment: Part of the reason minor improvements were highly frowned upon before is that at a certain number of edits, a post would automatically become community wiki. This is no longer the case. Therefore, "no improvement whatsoever" should absolutely not be read as "too minor".
Comment: I strongly agree. If only I could accept two answers.
Answer: The idea that we should hold suggested edits to a higher standard than regular edits is patently absurd. If anyone should be held to a higher standard, it should be reviewers.
We should encourage edits that make a positive improvement to posts, not selfishly discourage them to keep the suggested edit queue at zero all the time. Discouraging edits that make positive improvements to a post, even if they aren't big changes, and even if they don't get everything (this is what "improve edit" exists for) is actively harmful to the mission of the site.
So, absolutely keep suggesting grammar edits. You are making the site a better place for it.

Editing Grammar


Which Currency can I use in Georgia?

Question: Which currency is generally used in Georgia? Will I be able to use Euro or US dollars?
And if no, how much will I be allowed to exchange at Tbilisi airport?
Comment: Are you aware of the fact that Georgia has its own currency?
Comment: Avoid paying with EUR/USD in places that accept them. It's occasionally possible to pay in these currencies, but the exchange rates amount to robbery.
Answer: According to Lonely Planet:

Georgia's currency is the lari (GEL). It has been fairly stable since    it was introduced in 1995. One lari is divided into 100
  tetri.
Banknotes come in denominations of one, two, five, 10, 20, 50, 100    and 200 lari; coins run from one tetri to two lari.
ATMs, generally accepting MasterCard, Visa, Cirrus and Maestro cards,    are plentiful in cities and towns.
There are also plenty of banks and small money-exchange offices in    most towns and cities, where you can exchange US dollars, euros and
  sometimes sterling and the currencies of Georgia's neighbouring
  countries.
You can make purchases with credit cards at some hotels, restaurants    and shops, though less frequently outside Tbilisi.
Common tipping practice in restaurants is just to round up the bill    to the next round number.

As for exchanging money at the airport, there are 5 different banks and 6 ATMs that you could exchange money or withdraw money from. Each bank has it's own policy on the maximum amount of currency to exchange.
Answer: I was in Georgia a month ago and I have never seen any price in a currency different than Lari or a announcement that any other currency is accepted.
There are many exchange offices in Tbilisi and a couple in the airport. Exchange rate in the airport is not worse than in the city in general (and even better than in some places).
It seems that there is no maximum amount that you can exchange (I have exchanged up to 300€ without any problem). Be prepared to present your pass or other ID.
Comment: I hope a Portuguese National ID card will be enough to get me around. Thanks for the info

Which Currency can I use in Georgia?


Can my mother apply for a UK spouse visa while she's on vacation in the UK?

Question: My mother currently holds a tourist visa to the UK. She's now in Manchester with my  step father. She wanted to know if it was possible for her to apply for the spouse visa while she is there or does she have to wait to get back to the Philippines (in July) before she can?
Comment: She needs to go back to Philippines in order to process her application with all supportive evidences
Comment: ^ This is true. But her visiting your step father is good evidence towards the relationship. Make sure she gets some pictures with him there, you can send photo's together with your application.
Answer: She'll need to leave the UK to apply for a family visa if she has permission to be in the UK as a visitor.  Applying to switch to a family visa as a visitor in the UK is only possible if you have either a 6-month family visa as a fiancé, fiancée or proposed civil partner, or permission to stay in the UK for the outcome of a family court case or divorce
https://www.gov.uk/uk-family-visa
If she lives in the Philippines she has to go back there to apply for this category of visa (see paragraph 28 https://www.gov.uk/guidance/immigration-rules/immigration-rules-part-1-leave-to-enter-or-stay-in-the-uk) and to gather the required information https://www.gov.uk/uk-family-visa/provide-information
Comment: @phoog it refers back to the previous sentence which relates to her being in the U.K. as a visitor. I'll update if if you think it's unclear
Comment: About the "only" list in the first paragraph: is it truly exhaustive?  What about people on work visas, for example?
Comment: That makes sense.  Thanks for clarifying.