Was Antarctica a factor in the Falklands war?

Question: Were Argentina's and the UK's Antarctic territorial claims significant in the Falklands War?
Comment: I do not believe so but lack any clear sources.  Although finding such sources could be hard if it is not a factor ^_~  Do you have a reference that claims that it *was* a factor?
Comment: One has to consider that the countries involved, and still involved, want to get their hands n the Richness of Antarctica. Chile, Argentina and GB claims the territoies south of their countries. The situation in the Arctis is the same, but there is no treaty signed 1959. However, if that treaty should loose it´s significance, Chile, Argentina and GB would "invade" Antartica economically. But the US would not let that happend without having ensured that they got a major part of the profits, in one or another way. This since the us needs oil and minerals. and that the US has paid a high price fo
Comment: Welcome to History:SE. Could you edit your question to clarify what you've looked into already, complete with links and references, and context if applicable? In particular, please let us know what you find missing or unclear about the Wikipedia entry on the topic, if one exists. This allows those who might want to answer to do so without needing to redo the work you've already done. You might find it helpful to review the site tour and Help Centre and, in particular, How to Ask.
Answer: It was not a factor - both the UK and Argentina had signed the Antarctic Treaty, placing all territorial claims south of 60 degrees in abeyance indefinitely.
The full text of the original treaty
I am not aware of either nation having expressed a wish to go back on that treaty, and it was signed over 20 years before the Falklands War.
Answer: Although various countries have laid "claims" to various portions of Antarctica, those claims are basically unenforceable, because it is basically uninhabited, except for the occasional visitor, scientist, etc. It's hard to imagine this being worth fighting for.
The Falklands (Malvinas) on the other hand, are a different story. They have some 3,000 people (and something like five times as many sheep). They are also a major port of call for fishermen and cruise tourists from the outside. As a result, the islands have an economy that does about $100 million a year of both import and export trade, an amount way out of proportion to the population. Hence they were reasonably a causus belli.
Comment: This is an invalid point. Antarctica's permanent population is about 1000 and non-permanent is about 4000-5000.  But this does not matter because Antarctica has much greater scientific importance, area and potential resources. The lack of significant economy in Antarctica is because most economic activities there are prohibited, including mining any resources, building nuclear facilities, hunting and fishing, building radars and military installations and so on.
Comment: It didn't hurt Margaret Thatchers political career either.
Comment: The Falklands sit on what is expected to be major oil and gas fields, possession of which was a major reason for the Argentine government to invade (diverting attention from internal trouble to a nice foreign war for nationalist reasons made for a great propaganda reason and helped determine the timeline).\
Answer: Argentina, Chile, and the U.K. have overlapping claims on the Antarctic Peninsula, but the Falkands War was limited to the Falklands, South Georgia, and the South Sandwich Islands.
Comment: Yes, although if Argentina had seized and permanently held the Falklands,  and the other islands they claimed in that area held by Britain, South Georgia and the South Sandwich and South Shetland Islands, Argentina's long-term claim to the slice of Antarctica lying to the south of those islands would surely have been strengthened as against the British and Chilean claims,
Answer: There are usually some people who get a feeling of superiority from taking the cynical line, so in this case someone may well say "Of course all the talk of justice, patriotism, standing up to aggressors etc. was phony, it was really all about control of Antarctica's untapped oil reserves."
However, while that might be about 1% of it so far as the UK and Argentine governments were concerned, I doubt it  was important as:

Wikipedia will confirm that the argument over the Falklands goes back to the eighteenth century. Britain. Spain and France all had claims to them, which Spain asserted by force in the 1770s and Britain reversed, again by force, in the 1830s. Thereafter Spain's successor Argentina kept up a theoretical claim but probably did not dare to start a war over them while Britain was a much the stronger world power in the Nineteenth and early to mid Twentieth Century. For most of this period no one knew or cared whether there was oil or other minerals buried inaccessibly under Antartica. The argument was genuinely about the islands themselves.
In the 34 years since the Falklands War neither Britain nor Argentina has seriously attempted to exploit its Antarctic territory commercially, suggesting that any hope of being able to do so was a very remote one and hardly worth the risk of a war on either side.
It proved a disastrous gamble to the then military Junta ruling Argentina, who brought about their own disgrace and downfall by starting and then losing the war.
I was later told by someone in our Ministry of Defence that at the beginning they did not really think Britain could succeed in recapturing the islands, yet the Thatcher government took the risk, knowing it must be their political ruin if they lost. Surely neither government would have gambled their existence over the very distant prospect of possibly one day being able to get something of value out of Antarctica.

I am British and was aged 18 or 19 at the time Argentina invaded with very little warning and temporarily seized the Falklands by surprise. Most people subsequently followed the news of the dispatch of a British naval and military task force to the South Atlantic and their eventual victory. The War did divide people, but most in Britain who I spoke to who supported the war did so because they saw it as standing up to aggression and/or hurt national pride.
I remember trying to explain to a puzzled New Zealander why we had fought for remote islands that previously most people in Britain had scarcely known existed. I said he would probably understand why many of us were angry at the surprise Argentinian invasion if he ever woke up to learn that a foreign country had seized by force some equally obscure islands far out in the Pacific over which New Zealand claimed sovereignty.
Whereas the people I encountered in Britain who opposed fighting to recover the Falklands seemed to be of two types: the type of committed 'leftie' to whom their own country is automatically always in the wrong, plus at least some of those  old enough to have lived through the World Wars and remember what is was like when their own family or families they knew lost people killed. What I do not remember is anyone caring much about the Antarctic territories.
Answer: Antarctic Peninsula was no factor at all -short term. But it´s the major factor in the long term perspective.
But the question itself demands a broad discussion.
Let´s go on with that - it would be thrilling!
The outcome of the war was a British victory, back status quo, since US wanted it so, even if the task force had got stuck in a long attrition fighting before winning.
The pure actual military fighting shows that Argentina had no plans or resources for winning with strong claims after that on the Antarctic Peninsula, if GB (US) responded military. The military Junta did gamble on a British diplomatic solution -which was perfectly logical, but who could foresee such a bold British response?
Comment: Unfortunately, History SE is not a discussion forum, so 'answers' that introduce further questions are not acceptable.


How to abort a Crystal Report

Question: I have a report params aspx page where I am populating all the parameters that i will later use generatig the report.
When the user hits the "Show Report" button I open another aspx page where I have a ReportDocument repDoc object to generate the report. To render the report i use the following code:

repDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "Report Name");

There are reports that take time and some users prefer to close the page, but still the report is being generated on the server. How can I abort the report after I have called the ExportToHttpResponse method in order to avoid rendering reports that nobody will see/use?
Answer: use Response.End(). It will abort the response.

How to abort a Crystal Report


How does the portability of PureMVC benefit the application developer?

Question: One of the stated goals of the PureMVC framework is to avoid platform dependencies in order to be portable. Considering that because of language and API differences application code will always be heavily dependent on the platform, and that avoiding platform dependencies makes the framework reinvent the wheel and/or only provide a least-common-denominator feature set, in what way does the portability of the framework benefit me as an application developer?
Answer: I've worked with PureMVC. They're trying to implement their stuff in quite a lot of languages. You may be right about the least common denominator, but overall, it's not a bad framework, and I've seen a really nice AS3 app in PureMVC.
I don't think they're talking about portability in terms of porting actual code. The idea there is more that you're using a generalized MVC architecture, which you could apply to other projects and other languages.
They're trying to say that if you become familiar with the PureMVC pattern, you could potentially come into a new PureMVC codebase, even if it's another language, and you would already know the lay of the land.
You might also say that developers who develop good PureMVC skills are likely to develop good habits which will translate as they go from language to language.  But then again, maybe not.. for the reasons you mentioned.
Answer: We've been using PureMVC on two projects now and in my opinion the attempted language-independence is quite a burden.
The promise of jumping straight in a project because the framework is already know does not seem relevant to me if the languages are not already pretty similar (C# to java would make sense, as3 to php not) -- I agree that it is useful to have known ways of solving things, but for that the 'plain' patterns are good enough.
However, I also don't really agree with the usage of the various patterns the project uses, so our choice to not use it on the next project might be related to both issues, and not just the attempt at language/platform independence.
Comment: "so our choice to not use it on the next project might be related to both issues..". What are you guys going to use instead? Have to apply a framework in my next project, deciding what to go for.
Comment: The current choice is to not use a 'master' framework to build an app but just code according to some internal and per-project conventions. We do separate code into modules and along MVC conventions most of the time but not in a way that is enforced by a framework. (Auto)-wiring solutions don't have the same benefits as those used in Java projects, so I just wire up my components by hand/code.
Answer: PureMVC's portability will help you when you migrate to or reimplement in another language.
I can't count the number of platforms and languages I've written code for that are now extinct and for which, even if I still had the source code it would be mostly worthless and have to be rewritten from the ground up today, since the code was usually 100% platform specific.
But all application code need not be heavily dependent upon the platform. View components and services (the boundaries of your application) will necessarily be, but your application logic which is sandwiched between the boundaries need not be.
The scope of PureMVC is really quite narrow; merely to help you split your code into the three tiers proscribed by the MVC meta-pattern. There is no reason why this code has to be tied deeply to your platform in order to be optimal.
When it comes time to migrate, you'll appreciate that the framework actors and their roles, responsibilities and collaborations remain the same. This leaves you to deal with syntactic differences of the language, recreating the view components and services. At least you won't have to completely re-architect.
And for the case of reimplementing in a different language, imagine you're trying to capture a significant part of the mobile market with your app. The market is so fractured, you'll have to implement the same program on 2 or more of Windows Mobile, iPhone, Flash, and Java. Sure you'll probably have separate teams in charge of the apps, but why have a totally different architecture? With PureMVC, you could have a single architecture for all versions of your application.
-=Cliff>
Comment: What I said was "But all application code need not be heavily dependent upon the platform." - the operative word being ALL.

Its like the wiring harness in a car that carries the data from the sensors to the dashboard. The thing that will be different from one car to another is sensors and dials (like services and views). The wire in between just has to carry electrons from one end to another. It doesn't have to be specially made for that specific sensor or dial in order for the sensor and dial to communicate effectively.
Comment: To say "there is no reason why [application] code has to be tied deeply to your platform in order to be optimal" strikes me as naive. What do you even mean by that? Of course my application code will be tied to the platform, it's written for that platform, and designed to make full use of it's benefits. Should I need to change platform I would want to use all of the power of the new one, not trying to fit into some kind of lowest common denominator.
Answer: PureMVC is the only real option for Flash Platform developers who choose not to use the Flex Framework. For certain projects the size cost of Flex is too expensive (it happens!).
I like to prototype in Flex and then rip it out and replace my views with custom components when the application is near completion. PureMVC makes this really easy to do with it's Mediator pattern. I'm not sure there is any other framework that would allow me this workflow.
Personally, I think PureMVC went too far with it's portability goals: I enjoy that fact that it works with Flash AND Flex (for the reasons mentioned above), but feel that it should have stopped there, and made use of the native Flash Player event architecture.
Answer: Are there examples of people using PureMVC to build and port applications across multiple platforms?
My company is building a Flex application that we may need to port to other platforms:

Silverlight (likely)
Mobile (maybe)
Desktop (maybe -- not just AIR!)
TV sets (maybe eventually)

I am considering PureMVC as a framework if it can ease porting and maintenance.  I am curious to know if other people have ported a PureMVC app to a different platform and what their experience was with porting and then having development proceed in parallel for the app on multiple platforms.
Cheers,
Karthik
Answer: PureMVC does not rely on a platform for its internal workings (Flash Events etc).
So, while it does not make porting any easier per-say, it can assist simply by showing us its friendly and familiar face wherever we may choose to go ;-)


How much money can be transferred from India (from friend) to USA citizen | Any regulations?

Question: I am a USA citizen. One of my close family friend (not a relative) can send money as a gift to me (up to 100k). Please let me know the procedure and forms that I/He have to submit with IRS/Tax departments.
Answer: There is nothing to do for you.
In the US, the gift giver has tax responsibility, and you said he is not in the US (and I assume not a US citizen).
However, the bank will report this to the IRS, and if they decide to investigate, you need to be able to prove the money was not illegally acquired. Chances are small - this amount is peanuts for them - but it could happen.


What did Danae want?

Question: It's well known the story of Acrisius and Danae; Acrisius wants male children, and the oracle says he won't have any, but he'll have a grandson who kills him. So he locks Danae up in a prison, and Zeus impregnates her with a golden shower. Apollodorus 2.4.1:

When Acrisius inquired of the oracle how he should get male children, the god said that his daughter would give birth to a son who would kill him.49 Fearing that, Acrisius built a brazen chamber under ground and there guarded Danae.50 However, she was seduced, as some say, by Proetus, whence arose the quarrel between them51; but some say that Zeus had intercourse with her in the shape of a stream of gold which poured through the roof into Danae's lap. When Acrisius afterwards learned that she had got a child Perseus, he would not believe that she had been seduced by Zeus, and putting his daughter with the child in a chest, he cast it into the sea. The chest was washed ashore on Seriphus, and Dictys took up the boy and reared him.

But my question is, what did Danae want? Did she want to mate with Zeus, or was she raped? Did she go in her prison willingly or voluntarily?
Answer: I do realise this may be more about history / sociology than about mythology per se...
I'm not really sure there is an actual answer to this, as a girl was subject to what her father (or later in life her husband) decided and her job was to comply.
Rape was not so much a crime against a woman as it was against her father or husband. In many of the myths, the author is utterly unconcerned with what the female characters want, feel or desire.
A notable exception is made when it comes to goddesses.
Comment: found this about rape and greek/roman times http://www.stoa.org/diotima/essays/rape_harris.shtml
Answer:
But my question is, what did Danae want? Did she want to mate with Zeus, or was she raped? Did she go in her prison willingly or voluntarily

It is a myth, within a culture where a woman was subordinate to the man, if not property of the man. Creating a personality for Danae means giving her an age. She was probably incarcerated at the signs of puberty. Would a child of 12 voluntarily go to prison, or decide to be pregnant?
Now if golden rain is rape its another story. If the rain passing through the cracks became a man, who knows? the poor child might be so happy to see a face that she would fall in love.
Comment: @durron597  The renaissance happened thousand of years after the society that created this myth was extinct. Girls were married off once they could bear children, 14 or so. If the prophesy came after puberty it would be  too late, because she would belong to a husband and the story would be different.
Comment: Do you even have a citation that Acrisius received the prophecy before Danae entered puberty? I always assumed it was well after.
Comment: @durron597 You have to think of the culture at those times. "The culmination of a young woman's socialization was her marriage , which usually took place at the age of fourteen or fifteen" http://www.metmuseum.org/toah/hd/wmna/hd_wmna.htm
Comment: @durron597 The picture is the imagination of the artist.  anyway the 12 I used because a child of less age cannot become pregnant so could be free to roam the house.
Comment: There's no evidence she was that young. Most art from the Renaissance of this scene has her much older.
Comment: [Danae doesn't look 12 in this picture](http://www.theoi.com/GalleryO1.html)
Comment: I am amused by the negative votes without a comment in what they disagree :)
Comment: They probably agree with me, I'd guess.
Answer: Distracted by the Shine
Starting at least in the 1st century BC, a standard interpretation of this story has been that Danae granted Zeus her favours in exchange for gold, i.e. she was seduced by the offer of money.
Recorded in the Greek Anthology, Parmenion might be earliest example of an author who contrasts the possibility of rape with the idea that it was a consensual trade when he says, addressing Zeus in AP 5.33 = GPh 1:

You flew like gold rain to Danae, Olympian, so that the girl
  would be won over by the gift, and not tremble before Cronides ["Cronus'
  Son"].

Some four centuries later a Latin writer, namely Fulgentius, corroborates Parmenion's statement, saying of Danae in Mythologies 1.19 that:

the god Jove [i.e. Jupiter, the Roman Zeus] showed her wealth and tricked with gold one he had been
  unable to trick by force.

Fast-forward to the 1500s AD, about a millennium later, and the Italian poet Giovanni Andrea dell' Anguillara provides the first instance I have been able to find of Danae's emotional state upon meeting Zeus. According to Cathy Santore's 1991 article "Danaë: The Renaissance Courtesan's Alter Ego,"1

When Anguillara retells Ovid's Metamorphoses he takes the liberty of embellishing
  the tale to suit his fancy. He puts Danaë first in a garden then a
  loggia and finally in her room where Jove appears in bodily form. Her
  first reaction is to flee, but the god sweet talks her and shows her
  so much gold that he finally got what he wanted...

Violence on Stage?
Several tragedies and comedies entitled Danae were written in ancient times, featuring the character in question. All of them are now either completely lost or survive only in fragmentary form. Certain scholars seem to think that the remains of these plays might reveal a version of the tale in which Danae suffers an assault by Zeus.
In the 300s BC, Eubulus wrote a comedy entitled Danae. Maria Kanellou says2 that in Fragment 22 K-A of this play:

it is most probably Danae who complains, after her rape, of Zeus'
  merciless brutality (ὅς με κλάουσαν τότε | οὐκ ἠλέησεν, 'who did
  not show mercy to me when I was crying').

According to Ioanna Karamanou the "fragment presents Danae as complaining of being a victim of cruelty" and that:

It has been widely supposed that the incident to which Danae is
  referring is her rape by Zeus. I think that such an interpretation is
  plausible, considering that it is Zeus whom she blames for her
  misfortune in fr. 47a. 783-4 R. of the Dictyulci... and who is also
  the addressee of her plea in Simonides' poem.3

This would be more conclusive except for the fact that we do not actually know for sure who is speaking here or what s\he might be referring to, nor even the precise context thereof.
The Dictyulci ("Net-Haulers") to which Karamanou refers is yet another fragmentary comedy, this one a satyr-play by Aeschylus. We have a much better idea of what is going in it than in Eubulus' Danae (since its fragments are bigger).
In the referenced passage, Danae and her little son Perseus have landed on the island of Seriphos and are being harassed by the god Seilenus and his gang of Satyrs. Terrified, Danae prays to Zeus for help, "for you were guilty of the greater fault, but it is I who have paid the full penalty. I call upon you to set things right!"
Ancient Visual Arts Considerations
Rather less regarding forcefulness or precious metal, Daniel Ogden goes more into the question of Danae's actual feelings in his 2008 book Perseus (Routledge: Taylor & Francis Group, London & New York). On p. 18 he notes that Pherecydes of Athens

is the earliest source to describe Zeus' access to Danae in any
  detail. He implies that Zeus... transformed himself into golden rain
  merely for the purpose of getting through the skylight, but then
  reverted to humanoid form in order to have sex with the girl
  (Pherecydes FGH 3 fr. 26 = fr. 10 Fowler)... But the remainder
  of the literary sources imply that Zeus retained the form of golden
  rain to flow directly into Danae's loins, as a sort of golden sperm...
  And this indeed is the way artists liked to portray the scene, with a
  shower of golden rain heading straight for Danae's lap (LIMC Danae
  nos. 1-39, the earliest of which dates from ca. 490 BC). But for all
  that he impregnated her in the form of pure seed, Danae was evidently
  not denied sexual pleasure in the congress. In many images, from the
  mid-fifth century onwards, she actively welcomes the seed into her lap
  by holding her dress out of the way to receive it (LIMC Danae nos.
  7, 8, 9,✭ 19, 26, 33) or alternatively uses the folds of her dress to
  collect it (LIMC Danae nos. 5, 10, 12, 31). In some her head is
  actually thrown back in ecstasy (note especially the
  mid-fourth-century BC chalcedony intaglio, LIMC Danae no. 11).✭✭

✭ Ogden inserts a reference here to a drawing of this vase (above), appearing on p. 14 of his book.

✭✭ The 4th-century BC intaglio mentioned by Ogden (© The State Hermitage Museum, St. Petersburg)

Sophocles' Danae
Ogden also, however, briefly considers (on p. 15 of his book) the sole significant scrap of Sophocles' tragedy Danae which has survived the ravages of time: Fragment 165.

Amongst the fragments of the Danae we may find Acrisius' voice in
  the phrase, 'I don't know about the rape. But one thing I do know is
  that I am done for if this child lives'...

Quoting the text in its original Greek, Karamanou comments4 that:

(οὐκ οἶδα τὴν σὴν πεῖραν· ἓν δ᾽ ἐπίσταμαι·/ τοῦ παιδὸς ὄντος τοῦδ᾽ ἐγώ
  διόλλυμαι)... was evidently spoken by Acrisius rejecting Danae's
  possible allegation that she was the victim of forcible usage.

Odgen is rather loosely paraphrasing when he uses the word "rape", though, which is how he has translated πεῖραν (peîran), which simply means "attempt" or "trial", such as in Hugh Lloyd-Jones' translation: "I do not know what you mean by an 'attempt'".5
From the narrative context, it seems very reasonable, as Ogden and Karamanou both say, that it is most likely Acrisius here speaking about the young boy Perseus. As for the matter of the πεῖραν, however, it is certainly speculative to conclude that this "attempt" must mean "rape." It perhaps is what Sophocles meant by it, but we have nothing apart from that conjecture to lean on in this case.
The Imprisonment Itself
As to whether Danae would have gone into her sequestration willingly or otherwise, the ancient sources leave us with even less material than we have for the subject of choices in her encounter with Zeus. In other words, they say pretty much nothing on the issue, and we are left to speculate based on whatever our own sentiments about this might be.
I would guess that Danae was none too enthusiastic about being locked up. Moreover, with the heavy emphasis—throughout the story's coverage since ancient times up until the Renaissance—upon the idea that Zeus paid Danae in gold currency in order to obtain his desire, one might wonder what a prisoner like Danae could need money for.
The only answer I could come up with is that she wished to attempt an escape using these funds. And as it so happens, this is the same conclusion arrived at by the earliest source I have come across for an answer to this part of your inquiry, namely Giovanni Boccaccio's Genealogy of the Gods of the Gentiles (whose first version was completed in 1360 AD). In Book 2, Ch. 33 of this work, Boccaccio cites a certain Theodontius, saying that, according to him:

Danaë, being loved by Jove, and knowing that out of fear her father
  had condemned her to perpetual imprisonment, in order to escape and
  secretly take flight, made a bargain with Jove at the price of
  intercourse with him.6

According to Wikipedia, Boccaccio's Genealogy quotes this Theodontius extensively but he "is otherwise almost unknown... Some authorities think Boccaccio invented him.  Carlo Landi argued... that Boccaccio's Theodontius was a Campanian philosopher, from between the 9th and 11th centuries."

Notes
1. In the Zeitschrift für Kunstgeschichte 54. Bd., H. 3, pp. 412-427. (The dell' Anguillara quotation is taken from p. 417.)
2. The quote is taken from p. 264 of Greek Epigram from the Hellenistic to the Early Byzantine Era, Edited by Maria Kanellou, Ivana Petrovic, & Chris Carey (2019), Oxford University Press, United Kingdom.
        The relevant section is Ch. 15 of this book (pp. 249-271), written by Kanellou, and entitled "Mythological Burlesque and Satire in Greek Epigram—A Case Study: Zeus' Seduction of Danae."
3. From p. 19 of her January 2005 Doctoral Thesis "A Commentary on Euripides' Danae and Dictys" in University College London's Department of Greek and Latin, Published by ProQuest LLC, 2013, Ann Arbor, MI.
4. On p. 12 of her book Euripides - Danae and Dictys: Introduction, Text and Commentary (2012), De Gruyter, Leipzig.
5. From p. 67 of his Loeb Classical Library book Sophocles: Fragments (2003), Cambridge, Massachusetts & London, England.
6. Translation taken from a quotation by Madlyn Millner Kahr in her article "Danaë: Virtuous, Voluptuous, Venal Woman" in The Art Bulletin Vol. 60, No. 1 (Mar., 1978), pp. 43-55 (specifically p. 44).

What did Danae want?


Would I be violating copyright by transcribing music that was written over 100 years ago, but published in 1992?

Question: A particular set of piano rolls were recorded before 1913, but to my knowledge were not published until 1989. The recordings are piano transcriptions of symphonic works, performed by their composer/arranger. The symphonic works in question were published well before 1910 and are currently in public domain. I am interested in transcribing the rolls to study the arrangement techniques of the composer. I would be using this information to reconstruct his arrangements of other works, and am interested in publishing my findings as it's for a thesis project. If I were to refrain from publishing the direct transcriptions, and considering that the symphonic works are in public domain, would I be violating copyright by transcribing the rolls for study? Is it possible that the rolls could be considered public domain as they are arrangements of public domain works published postmortem?
Answer: First:  the real answer to your questions is "consult your academic library staff."  If this is for a thesis project, then you're presumably affiliated with a college or university, and the librarians at such institutions are used to helping sort out copyright claims and helping researchers obtain the necessary clearances.

There are two questions you're asking, really.
Are these works in the public domain?
Possibly, but not for the reasons you think.  In the US, copyright in unpublished works lasts for the life of the creator + 70 years.  After that, they pass into the public domain.  This means that if the composer/arranger died before 1919, then the works passed into the public domain before the formal publication in 1989, and they are still in the public domain now.  However, if the creator died after 1919, then their 1989 publication effectively "resets the clock" on the copyright, and they will not come into the public domain until (according to the above link) 70 years after the death of the creator or 2048, whichever comes later.
What doesn't matter is that the original symphonic works were in the public domain.  Even if the 1812 Overture is in the public domain, I could write an arrangement of it for accordion quintet and I would have the exclusive right to publish it and profit from that arrangement for the standard term.  In your case, if the work really is a straight transcription, it might not have a copyright;  but if the work required some amount of creativity and artistic decision-making (which a piano transcription of a symphony certainly would) then the arrangement gets its own copyright when it's published.
Can I make transcriptions of them if I don't publish them?
Probably, but you should really consult your librarians.  It's entirely possible that your proposed copying would fall under "fair use";  it would be for scholarship & research and you're not planning to include the transcriptions in your final published work.  On the other hand, you're talking about effectively copying a substantial portion of a creative work that is still in print, which argues against fair use.  Fair use rules are notoriously flexible/vague, and so it would be worthwhile to consult with an expert on the subject (i.e., your school's library staff.)
Comment: @rj_26417: Be aware that ownership of the rolls and ownership of the copyright are not necessarily linked.  Mind you, they often match up in the case of ownership transfer via inheritance.
Comment: @rj_26417:  My understanding of copyright law is that you'd be OK to release your transcriptions, which you derived from the original piano rolls, if they were in the public domain.  But copyright law is murky and people do get cease-and-desist orders even when they follow the rules, so I'd encourage you to get a second or third opinion on that.
Comment: He died well before 1919, so it looks like my chances are good then! The information about copyright in unpublished works/arrangement copyright is very helpful, and I'll be sure to consult one of our librarians as soon as I get the chance. My copying would only be in terms of imitating his stylistic choices when arranging for piano, so hopefully I'll be clear there as well. Thank you for your input!!
Comment: Also, in the case that the rolls are public domain, would I be able to release the transcriptions? Nobody else has transcribed them which is part of why I'm doing this project.
Comment: I actually just managed to get someone to put me in contact with the owner of the rolls, so I'll know for sure soon. Thank you so much again for your help!


IIS 7 500 Error Handling situation

Question: I am on IIS 7 with a Classic ASP application using Server.GetLastError() and i added this script that writes the error details to a database as a custom '500.100' error in IIS to execute this URL.  So far it's been working on most situations when there is an error in the application.  However, I am noticing in the IIS log that many people are getting ASP_0147 | Internal Server Error with a 500 error and no further explanation.
I am trying to catch this error showing up in the IIS Log using the method explained above, however, these errors are not being caught (written to database) using the application i made, whereas other types of errors are being caught, but the only errors that are being caught using the script/database i made, already show up with the entire error details in the IIS log.
So the question is, how can i catch the errors still happening in the IIS Log in the database using custom errors? because the method i'm using obviously isn't catching all the errors that show in the IIS Log, only the ones with an explanation being displayed in the log.  Or, if I change the Error 'Feature Settings' to 'Detailed Errors' (because now its set on, Detailed only for Local Requests) will it show up in the IIS log, etc?  Why am i only seeing 500 error in the IIS Log on certain things, but not on others? Thanks.
Answer: This could be an application stall.
If the server gets a lot of requests on the same time, causing the server to "get busy", it stalls some of the requests and possibly denying them. This could give a false-positive 500 error with the error-description (0x0).

IIS 7 500 Error Handling situation


Can intelligent species evolve to consume and emit ionizing radiation?

Question: Is it possible to have a multi-cellular complex organism capable of emitting ionizing radiation and I am not talking about banana I meant intelligent lifeforms that can develop tools also on top of that these species must consume radioactive substances in large quantity without suffering from any side effects and I am not talking about gorilla... and what kind of traits should my species have so that they cannot be harmed by their craving for exotic foods?
Answer: Radioactive isotopes generally have the same chemistry as the non-radioactive ones, so all the usual biological processes should be able to work in a world where only radioactive isotopes are available, at least briefly.
To be able to survive with all that internal radiation, start with deinococcus radiodurans — it's only a bacterium, but it has the ability to repair its DNA. That same mechanism could probably work in the cells of a larger creature. You'd also want a fairly fast metabolism to deal with things like replacing all the iron in the blood faster than it turns into cobalt.
So far, this is just a creature that can survive a high radiation environment, but it could easily evolve to depend on the radiation - for example it might require a highly efficient cooling system to handle the heat of radioactive decay, but the same system would cause hypothermia if that heat source was no longer available.
Comment: There were some species of fungus detected in the Chernobyl area that thrived on beta radiation.


In QTP, can we only use shared object repository and disable local repository?

Question: I just started to use QTP to test a java monitor we have. I think it will be cleaner that if put all the objects in shared repository and do not use local repository at all. Is there any down side that of doing that?
Answer: No. Well, it depends.
There is no reason to disable the local repo. There is not even a way to do that! But yes, you can simply avoid using it.
I usually have a rule active in the team that reads "whatever is in the local repo should be gone upon check-in". I even have a check in the library initialization code that looks if there is stuff in the local repository and yields a warning if so.
But it depends on the AUT if this is useful, and on your workflow:
The repo that a test is actually using is the combination of the associated (shared, central) repository, "overlaid" by what is in the local repo. So you can not only add, but also modify the shared repo entries by using the local one. This is a quite powerful feature which allows you to define the "norm" case in the shared, and the exceptional cases in the local repository.
If you AUT has well-defined GUI objects which are easily re-identify-able in various contexts, fine. But if not, this feature comes handy.
I agree that this "overlaying" mechanism easily leads to "bugs" (or let´s say: playback problems) that are hard to track down. Usually, as Murphy suggests, the local repo is the last idea that comes to mind when you are diagnosing strange playback symptoms.
It is, however, quite some clickwork to open the central repo through the object repo manager, check it out, make it writeable, etc. for every small change. So the local repo is a good "buffer" for updates.
Consequently, especially if you are using QC as a central storage point, and possibly have enabled version control there, you will love the ability to add new stuff into the local repo first and move them over to the central repo in one load just before checking in the change. (By the way, other team members would kill you if you´d checkout the central repo file for more than 5 minutes, effectively putting a write-lock upon it.)


What was the advantage of a 64-bit processor in the N64?

Question: The Nintendo 64 debuted in 1996 and featured a 64-bit MIPS processor. My understanding is that PCs didn't start appearing with 64-bit CPUs until 2003. What was the advantage of using a 64-bit CPU in 1996? Presumably, back then addressing more than 4GB of memory would not have been an issue for a consumer electronics device.
Answer: This is mostly content-free marketing hype.  Yes, the processor may have been "64 bit" (however that is really defined), but that by itself means little.  As you say, it is unlikely that addressing more than 4 Gb would have been of any use in 1996.
Presumably, a "64 bit" processor can do arithmetic manipulation on 64 bit quantities as a whole, and that could have speeded up certain operations.  However, there are many other architectural choices that result in various cost versus speed tradeoffs that would have had a much larger impact on the result than whether the processor was 64 bit or 32 bit or something else.  The fact that at least parts of the processor were 64 bit is therefore pretty meaningless when looked at in isolation.  What really matters is the resulting performance and what price you have to pay to get it.
This is somewhat like making a big deal about whether the engine in a car has a overhead cam or dual exhaust valves, for example.  That by itself tells you very little since the many other tradeoffs in the design of the car and its engine swamp the effects of that one design choice on the resulting performance and price.  Just like "64 bit", these are mostly just hype because marketing thinks it sounds cool and that you're dumb enough to think it matters.  Unfortunately for most consumers, marketing is right.
Answer: The use of "64 bits" was probably as much a marketing term as anything, but not entirely without meaning.  On many machines of that era, any time the display controller spent fetching data from RAM was time the CPU or other chips couldn't access that same RAM.  The less time the display controller spent on RAM access, the more time the RAM would be available for other purposes.  If at a particular display resolution and RAM speed, a 16-bit bus would be 90% consumed by the graphics controller's display-data fetches, other chips would only be allowed to access the bus 10% of the time.  Moving to a 32-bit bus would drop the display controller's overhead by half (to 45%), meaning other devices could access the bus 55% of the time.  Even if the other chips could only perform 16-bit accesses, they'd still see a 5.5x speed improvement.  Pushing the bus to 64 bits would cut the display controller's share in half again (to 22.5%), leaving 77.5% available for other stuff--another 40% improvement.  Not as huge an improvement as going from 16 bits to 32 bits, but significant nonetheless.
Note that if one were using a higher color mode, it's possible that 16-bit bus utilization would have been over 100% (meaning a 16-bit bus simply couldn't handle such a mode), and 32-bit utilization might be over 50%.  Under that sort of scenario, the improvements going from a 32-bit bus to a 64-bit bus would be more significant (again, even if no chips other than the display controller can exploit 64-bit accesses).  Of course, if some other chips (e.g. ones that are designed for copying large chunks of display data) can exploit 64-bit accesses, those chips would receive even further benefit.
Comment: Is this true? Pjc50's answer claims that the memory bus was only 9 bits wide.
Comment: @Dakkaron: If the coprocessor was able to render four 16-bit pixels per cycle under any circumstance, even just with solid-color rectangles--that would imply use of a 64-bit bus for the main display buffer.  Some of the internal portions of the graphics coprocessor might conceivably have used a nine-bit bus which was separate from the main 64-bit bus, but a nine-bit memory bus would have at best been able to do only one pixel every two cycles, as opposed to four pixels per cycle.
Answer: https://en.wikipedia.org/wiki/Nintendo_64_technical_specifications#Central_processing_unit claims that the 64 bitness of the processor wasn't used that much, which makes me suspect that it was mostly a marketing effort.
The graphics co-processor may have had a SIMD-like behaviour (ie do 8 lots of 8 bit operations at once, or 4 16-bit operations), although I can't find a handy reference that confirms this. The nearest is this N64 manual, which says "At maximum speed (usually only attained with rectangles), two 32-bit pixels or four 16-bit pixels are written per cycle."
(The memory bus was apparently only 9 bits wide, which may have been a major limitation on polygon fill rate!)
Answer: From any practical point of view I can imagine it was mainly a marketing trick.
From today's point of view it is hard to even define what does "64bit CPU" mean. We can look at standard x86 family of CPU's. They are known as "32bit", although the latest models like Pentium 4 have got 36bit address bus and 128bit data bus. They contain several 128bit wide data registres, 128bit instructions, and can directly access 64 GB of memory.
The real main reason why we use x64 platform today is that Microsoft was too lazy to implement correctly the support for 36bit memory addressing into Windows XP. 64bit opearting systems eats a lot more memory, because you actually need to have both 32bit and 64bit versions of the system, also 64bit programs are bigger, because instructions are longer, all address are longer, etc. This means that a faster bus is needed.
Another point is that since their beginnings, gaming systems always used many special graphic acceleration chips so they were often successfully implemented with just an 8bit CPU without any significant degradation in quality of graphics etc.
Answer: If nothing else, copying portions of memory ought to go twice as fast on a 64-bit processor with a 64-bit bus than on a 32-bit processor with a 32-bit bus given similar clocks speeds.  If implemented through a single opcode, this could be true regardless of what mode the processor is in.  How much of this happened on a regular basis would probably depend on the game being played, though.


Does sealer need to be removed from soapstone counters before applying mineral oil?

Question: I just had a soapstone counter installed and they sealed it before they left.  From what I've read, soapstone is oiled or waxed, not sealed.  Does the sealer need to be removed if I want to use mineral oil to get an even patina?
Comment: Our soapstone counter top has no sealer and my wife says the installing company did not offer that as an alternative. We use mineral oil when we feel like it which is not often. Personally I would leave the sealer alone and see how it wears unless you find out that it is significantly easier to remove now rather than later.
Comment: We have soapstone and oil it fairly regularly (after a couple of years there's enough of a buildup that you don't need to add much). I wouldn't expect a sealer to actually adhere to soapstone. Try wiping it off and then oiling, or leave it for a while and if it becomes a problem, scrub it off and then oil.
Answer: A sealer might have been used because there are several types on the market. However, the sealer will dry in a few days. If you want to be sure of what you have just start all over by removing the finish. Most manufacturers recommend using #80 grit sandpaper to finish soapstone. I would use a random-orbit sander. You don't want to use an aluminum oxide sanding disc because it will not cut into the soapstone very well. I use the DuraDisc on hard surfaces because they work really well and last a very long time. You can finish the counter top with a 120 grit paper by hand in order to get closer to the faucet and other tight areas you might have. A lot of people use mineral wax to finish a soapstone counter top. I use Van's Beeswax instead. It seems to last a little longer and the sheen is not a wet glossy look.
Answer: I know this post is rather old, but I thought I would add a few points as well.
Soapstone does not need to be sealed.  Soapstone is, for all intents and purposes, chemically inert.  This is the reason why laboratory benches historically used soapstone.  Installers usually recommend a finish from #80 to #120, followed by an optional coat of mineral oil, walnut oil or some type of oil/wax mixture.  You don't need to necessarily stop at #80. I've gone to #220 and it gives it a very silky smooth feel.  I've heard of people going higher.  The downside to this is that if all you use is mineral oil, you may have to coat it more.
You also don't need any coating at all.  It's completely aesthetic.  Lately, a new thing I have been trying is cleaning the surfaces with barkeepers friend.  Since it's an abrasive, it removes the oils and waxes and smoothes out the countertop even more.  Once dried it leave the counter smooth with a flat sheen.
** EDIT **
I have recently learned that certain distributers are currently selling other products marketed as soapstone.  Knowing this, I would be very concerned if the installer insists on sealing the soapstone.  Do your homework and make sure you are actually buying
soapstone.
Comment: That update seems especially pertinent!


Handling high number of concurrent GSM device connections

Question: How do telcos manage high concurrent GSM dial ins or dial outs? We are deploying thousands of remote, GSM enabled utility meters and have to manage too many GSM modems that the meters will dial in to. What is the better way of handling this?
Comment: Removed off-topic request for product/resource recommendations.
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
Comment: We are still evaluating a few solutions at the moment. For the sake of accuracy I will only accept solution that will solve major parts of the problem
Comment: That's fine. We are simply trying to clean things up, and people sometimes forget. If you come up with a solution, please post an answer here.
Answer: Standard BTS (with 3 cells) can handle around 9 erlangs which is enough to support circa 1500 subscribers, but everything depends. All station are built to suit terrain and people density on given area. Is very difficult to say as you have not specified if those modems are 3G, GRPS or LTE.
For example LTE with 2x20Mhz wide, 4x4Mimo and 64QAM could reach as much as Download ~300Mbps and ~80Mbps uplink. Not all modems have active connction all the time. Some connected send data some are in RRC-Idle. As well if there is mutliple devices they would share channel/bandwitch (stat-mux).
Edit:
So you are using modems as gateway for each meter to dial in?
I'm pretty suprised as this solution is not scalable. I would say that much better would be to access destination servers over IP from GSM provider network, rather than dial-in into dedicated gateways.
Comment: Unfortunately we cannot go with the GSM provider network route as our calculation indicates that the recurring cost is going to to be untenable with regards to our profitability. We are rolling out our own telco infra for our utility meters network.
Comment: Most of the modems are 3G and GPRS. The meters are to dial in and report the measured electricity usage for the premise.


Path around bitmap image's visible part?

Question: I found this tool a while back but can't seem to remember how it's done. Basically, I remember there being a tool in Inkscape where you select a bitmap image that has transparency, and it will create a path around the visible part of the image. I know for certain it's not in the Trace Bitmap option, but I can't remember where it is. I also remember the smoothness of the path being relative to how zoomed in/out you were for some reason. Here's an example of what it outputs:
Comment: What is the end goal that you want to achieve with this? Maybe you  want to add additional stroke around the image?
Answer: Try the bucket fill tool. Set the threshold level to something high, say 10 or above to smoothen the trace.
Comment: You, my good sir or madam, have found that mystery tool I've been searching for (and it was in an obvious spot too)! Thank you so much!
Answer: I don't know a a specific tool but you could accomplish this by:
Trace Bitmap at a setting that makes everything one color. Now you have a shape that matches the non-transparent portion of the bmp. Set that shape to no fill with a colored stroke.


QGIS Processing Progress

Question: I have been developing a python plugin that uses Processing algorithm for raster calculations. I want to support the gui with progress bar. How can i connect Processing job to progress bar? I found little description in here but no success.
Answer: Here is a way to set a primitive progress bar. Design is based on example you can found within the PyQgis Dev. Cookbook (see section 11.2)
Example is designed to work with features of a QgsVectorLayer but it shows the main steps you could adapt for your process algo.
The key to your problem is to find a way to evaluate the progression of your algo within itself.
1.Progress Bar is created outside of your processing function
2.Progress Bar is updated inside your processing function
I pass it to the iface.messageBar() to make it easy

import time

#clear the message bar
qgis.utils.iface.messageBar().clearWidgets()
#set a new message bar
progressMessageBar = qgis.utils.iface.messageBar()

######################################
# Prepare your progress Bar
######################################
progress = QProgressBar()
#Maximum is set to 100, making it easy to work with percentage of completion
progress.setMaximum(100)
#pass the progress bar to the message Bar
progressMessageBar.pushWidget(progress)

#get a vector layer
vlayer = QgsMapLayerRegistry.instance().mapLayer("your layer")
vlayer.selectAll()

#Count all selected feature
count = vlayer.selectedFeatureCount()
#set a counter to reference the progress
i = 0

#start your processing loop
for feature in vlayer.selectedFeatures():
    ######################################
    #Update the progress bar
    ######################################
    i = i + 1
    percent = (i/float(count)) * 100
    progress.setValue(percent)
    #optionnal, make your processing longer to enjoy your process bar :)
    time.sleep(1)

    ######################################
    #Do your processing stuff
    ######################################

qgis.utils.iface.messageBar().clearWidgets()

Comment: Peter - nicely commented and useful code - good framework for others to use, wish we had more examples like this in the documentation! @MSBilgin, did this work for you?
Answer: If you would like to connect a Processing job to a progress bar, you can supply the progress bar using the progress parameter:
buff_res = processing.runalg("qgis:fixeddistancebuffer",
                             self.inpvl, 10, 10, True, None,
                             progress=myprogress)

See also: https://gis.stackexchange.com/a/237282
Comment: This is for older QGIS, the modern QGIS 3 API does not have a `progress` parameter anymore.

QGIS Processing Progress


How did lambda expressions get their name?

Question: I may be showing my ignorance here, but why are lambda expressions called lambda expressions. I understand how to use them, but I'm curious if there is any significance to the term "lambda".
Comment: I disagree with closing of this question; this is easy to understand meaningful and relevant inquiry. Etymology facilitates insight into (involved) concepts encapsulated within (single) words. Words are empty pointers. Context gives them substance. Knowing where words come from - how they came to be, what they pointed to in the past, in other domains - helps developing (a robust) comprehension. More so when a specter as abstruse and seemingly solitarily eccentric as `lambda` appears. Our mind is associative; reject that as your choice and let those who are willing to work with it proceed.
Comment: For the record, I do not approve the edit, this question was not intended to be language specific and I thought the approved answer was adequate. But others approved it so.. Yay stackoverflow.
Comment: http://en.wikipedia.org/wiki/Anonymous_function
Comment: i edited the question - and want it to be reopened. I don't get the exact correlation between lambda and lambda-expressions in java8 either. We discussed this in class - but couldn't get the destinct connection.

Refering to the Lambda-Calculus is not an adequate answer. What does this relation mean?
Comment: @ConditionRacer Think about this in a wikipedia context. The question was closed because it was to unspecific. I read alot about lambda-expressions today - and i could answer it  better. Also there are no similar questions. Java is just an example. its your question, feel free to edit it. My sole intention was to give someone googling the same question a better understanding.
Answer: The term derived from mathematical key word only.
Wiki info : Lambda calculus
check this : http://dictionary.reference.com/browse/lambda+expression
Comment: this is not an answer, its a reference.
Answer: Because they come from Church's lambda calculus.


Half Sibling DNA not matching?

Question: My half-sister and I recently completed DNA tests with myHeritage.com. The results don't show us having matching DNA. We share the same father.
Is it possible that we are half siblings even though there is no DNA match?
Answer: If you are really half-sibling, and you took the test from correct people,
you WILL have a shared DNA.
A half-siblings share ~25% of DNA between each other. Or 1300-2300 cM.
The chances that the examples were accidentally mixed in laboratory are very small.
Answer: In a prior answer it was stated that you would share between 1200 and 2300 cM of DNA.  This is the primary way to validate if you are true half-siblings.
But, you might also want to compare your close matches with the matches that your tested half-sibling shares.  Do both of you have matches that are the same DNA donors?  If so, you might want to pursue those matches and see how you are related to them (who are your common ancestors).  If you don't share any similar matches then it's even more probable that you are not half-siblings.
Answer: Yes it's possible - assuming you are both female you will share an entire x chromosone which ancestry and my heritage do not test for - but gedmatch.com does.  It's possible to not share any autosomal DNA with a half sibling as hereditary of the same chromosones from a a parent varies even with full siblings.  Upload your DNA data on gedmatch if you are sisters and compare you x DNA...of course won't work between male/female siblings.  I am curious though if you went that route what did you learn?  Are you siblings (I'm going through this right now too)
Comment: You are completely wrong about this. To quote from the correct answer "half-siblings share ~25% of DNA between each other. Or 1300-2300 cM."
Answer: I have read an article from a DNA scientist that said there is a 1 in 10,000,000 chance for FULL SIBLINGS to NOT MATCH at ALL on Autosomal DNA. No known case has been known to exist, as would be very hard to detect anyway, as would need both parents DNA in first place to confirm. How could this occur in theory, by each sibling having the exact OPPOSITE DAD/MOM section of the DNA-for all regions of the DNA.
I would imagine the ODDS for Half Siblings are less than the 1 in 10,000,000.
For cousins-ever lower-but again-pretty much impossible to ever identify or confirm.
Someday, with all the DNA now on file, a known case may someday surface-but will be super rare-like winning lotto-but some do win.
All this being said, it is HIGHLY unlikely to be anyone's answer to a non match. One would need both parents DNA to test, then both Siblings. So, I'm not suggesting this is someones answer, but just to point out, just when you think you know all the answers there may be some rare exceptions.
Also, chimerism can cause some odd DNA readings as well as 'Double Cousin".
Comment: Hi, Welcome to G&FH.SE!  I have down-voted your answer because it is low quality. First of all, suppose someone wanted to read the article you cited. Your reference to the article is too vague to be of use.  Your answer could be improved by 1) putting your statement that the answer contains edge cases at the very top and 2) including a concise list of cases with links to relevant articles.  Your answer could also be improved by less use of upper case.

Half Sibling DNA not matching?


Generating Matrix-Gamma distributed random variables

Question: Is there an established algorithm for sampling from the Matrix-Gamma distribution (https://en.wikipedia.org/wiki/Matrix_gamma_distribution)? I suspect the procedure would be similar to generating from a Wishart distribution (i.e. https://www.math.wustl.edu/~sawyer/hmhandouts/Wishart.pdf), except using gamma distributed random variables rather than $\chi^2$ random variables on the diagonal. I cannot find a reference, however.
Answer: The matrix Gamma distribution (as defined in Wikipedia) $MG_p(\alpha,\beta,\Sigma)$ is nothing but the Wishart distribution $W_p\left(2\alpha, \frac{\beta}{2}\Sigma\right)$.


Slurp standard-input into a buffer

Question: How do I read the entire contents of stdin into an Emacs buffer in #! /usr/bin/env emacs --script mode? Stdin may not be a regular file.
Comment: See also: https://superuser.com/questions/31404/how-to-make-emacs-read-buffer-from-stdin-on-start
Answer: After a bit of research, apparently this is the best we can do right now:
#! /usr/bin/env emacs --script

(defun slurp-stdin ()
  (condition-case nil (while t (insert (read-from-minibuffer "") "\n"))
    (error)))

(with-temp-buffer
  (slurp-stdin)
  (princ (buffer-string)))

It abuses a gimmick of read-from-minibuffer that causes that function to read a line from stdin when Emacs is in batch mode.
There's no fundamental reason to read a line at a time instead of chunk-at-a-time, but I can't find a chunk-at-a-time read function in Emacs.
It cannot distinguish between different kinds of newlines (CR or CR/LF) and cannot differentiate between the presence or lack of a final newline at the end of stdin. I'm not sure what kind of newline conversion (if any) is done.
It cannot distinguish between end-of-file and other errors. Emacs has an end-of-file condition type that is used for that purpose by read, but read-from-minibuffer does not use it.
On the bright side, it works fine with pipes and sockets.
Answer: Read /dev/stdin, e.g.,
$ date -u | emacs --batch --eval '(insert-file-contents "/dev/stdin")' --eval '(princ (buffer-string))'
Thu Nov 28 19:12:02 UTC 2019

Not sure about Windows though.

Slurp standard-input into a buffer


Will Littering in Private Property be covered under Tort Laws?

Question: Say a person A litters at Private property of person B (maybe his Home) with things that B may find distressful (maybe Cigarette covers or anything similar).
So will person A be legally accountable/liable under "Tort Laws". If not tort law then what else? Does this vary from Country to Country (Assuming all the countries we are talking about have Tort Law)
[I'm new here, anyone reading this, please do edit the tags if necessary]
Thank you.
Findings/Efforts so far: It looks like Littering in public place is covered with a weak penalty.
Answer: Yes
Specifically, the tort of trespass.
Comment: Any idea on where I may Read up more on Tort of Trespass?


Updating map after zoom change

Question: I'm building a map that uses a conditional statement to determine what data to load based on the zoom level. However, the conditional statement is only fired when the map first loads, as opposed to every time the zoom level changes. Is there a way to change the code to run on zoom load (i.e. to update every time the user zooms in or out) rather than the initial page load?
Comment: What library are you using to create map?
Comment: I'm using JavaScript
Comment: I meant name of the library. There are different libraries for creating an interactive map.
Comment: My apologies, I'm relatively new to programming. I'm using Carto VL to build my map
Answer: All map libraries have events which help you to find out when map zoomed, clicked and panned. For example, if you're using Leaflet.js, map object has following listener for zoom:
var initCenter = [42.444508, -76.499491];
var initZoom = 4;

var map = L.map('map').setView(initCenter, initZoom);

map.on('zoomend', function() {
    currentZoomLevel = map.getZoom();
    // Do your job
});

On the other hand, you can find map events for CARTO here.
map.on('move', {
    currentZoomLevel = map.getZoom();
    // Do your job
});

Updating map after zoom change


Qtile does not start on my Arch linux (VM)

Question: Hi guys I would like some guide with this problem that I just faced. JFYI I am beginner Arch user and I had in mind that in addition to learn how to install Arch linux, learn about how to install and setup my first tilling window manager as well. So, that said I followed all instructions and step from the documentation about how to use Qtile on Arch (I mean, I have already installed qtile package and create the config file
config.py under the following path ~/.config/qtile/). Nevertheless, when I tried to run Qtile using: qtile start. I got some errors like these following:

I have already tried to investigate that error on Google, but there is no a specific solution for this (apparently) and most of the case there has been any solution for this one. So, I would like the support for any Arch linux guru user that can be willing to give a hand to this noobie Arch user. Thank in advance.
Please let me know if you need more information to debug correctly this issue.
Answer: Use this command: startx /usr/bin/qtile start. According to the wiki page, you need to run command with xinit.


Error in namespaceExport(ns, exports) : undefined exports: ... Error: package or namespace load failed

Question: I recently updated R to the latest version (R version 3.1.1) and now I can´t run load packages. In the case of ggplot2, the error message after running library("ggplot2") is
    *Error in namespaceExport(ns, exports) :
  undefined exports: ContinuousRange, DiscreteRange, abs_area, alpha, area_pal, as.trans, asn_trans, atanh_trans, boxcox_trans, brewer_pal, cbreaks, censor, col2hcl, comma, comma_format, cscale, date_breaks, date_format, date_trans, dichromat_pal, discard, div_gradient_pal, dollar, dollar_format, dscale, exp_trans, expand_range, extended_breaks, format_format, fullseq, gradient_n_pal, grey_pal, hue_pal, identity_pal, identity_trans, is.trans, linetype_pal, log10_trans, log1p_trans, log2_trans, log_breaks, log_trans, logit_trans, manual_pal, math_format, muted, parse_format, percent, percent_format, pretty_breaks, probability_trans, probit_trans, reciprocal_trans, rescale, rescale_max, rescale_mid, rescale_none, rescale_pal, reverse_trans, scientific, scientific_format, seq_gradient_pal, shape_pal, show_col, sqrt_trans, squish, squish_infinite, time_trans, trans_breaks, trans_format, trans_new, trans_range, zero_range

Además: Mensajes de aviso perdidos
S3 methods 'fullseq.Date', 'fullseq.POSIXt', 'fullseq.numeric', 'print.trans' were declared in NAMESPACE but not found
Error: package or namespace load failed for 'ggplot2'*

For package BiodiversityR, the error message ends with
*Error: package or namespace load failed for 'BiodiversityR'*

I've tried several tricks like re-installing, updating, loading in previous R versions, including 32-bit versions.
sessionInfo:
R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=Spanish_Mexico.1252  LC_CTYPE=Spanish_Mexico.1252
[3] LC_MONETARY=Spanish_Mexico.1252 LC_NUMERIC=C
[5] LC_TIME=Spanish_Mexico.1252

attached base packages:
[1] tcltk     stats     graphics  grDevices utils     datasets  methods
[8] base

other attached packages:
[1] xtable_1.7-3 reshape2_1.4 nlme_3.1-117 plyr_1.8.1

loaded via a namespace (and not attached):
 [1] colorspace_1.2-4 digest_0.6.4     grid_3.1.1       gtable_0.1.2
 [5] lattice_0.20-29  munsell_0.4.2    proto_0.3-10     Rcpp_0.11.1
 [9] stringr_0.6.2    tools_3.1.1

    packageVersion("ggplot2")
[1] '1.0.0'

Comment: Could you delete the `ggplot2` folder and other packages that it depends on and then reinstall it and report if this works?
Answer: Indeed, one or more of the dependend packages had to be updated.
I created a new empty library directory where I re-installed all packages and this solved the problem. Thanks!
My error was updating only ggplot2 update.packages("ggplot2") while I should have ran update.packages().
Answer: I often find simply retrying with require() works for some reason:
require(BiodiversityR)


Is computer science worth double majoring in for an aspiring Data Scientist?

Question: I'm currently a computational Statistics major at UC Davis and have my eyes set on becoming a data scientist. I like both fields of stats and computer science, but not sure if I want to put in the effort to double with computer science, since my only career goal is to become a Data Scientist. How important are the set of skills taught in comp science and not in statistics to Data Scientists? Is it worth the double major effort?
Comment: This question is likely to be closed because the answer depends substantially on your personal preferences.  You could rephrase the question to be more general by asking about what academic background data scientists should have, but that would still not be an appropriate question for academia.stackexchange since it isn't a question about academic careers.
Comment: @BrianBorchers: I suppose this question is still answerable within the guidelines of Academia.SE. The OP has mentioned "*set of skills taught in comp science and not in statistics to Data Scientists*". That part of the question is direct and not too general or opinionated and hence can be answered with relevant experience.
Answer: If becoming a Data Scientist is your only ambition, I doubt you require to complete an entire major on computer science.
In a computer science major you will learn a lot more ranging from programming languages, semantics of both software and hardware design, data structure, computer architecture and organization, signal processing, AI among many others. Most of which is not even directly connected to data science. In fact a standard computer science graduation course that I've been through (both my undergraduate and graduate) did not have any element of data science in it -- no data mining, machine learning or inferential statistics. Well, most of these subjects are included as part of the current generation syllabus. But the main point is that you would learn a whole lot more than what is needed to become a data scientist if you were to take a computer science major.
Computational statistics encompasses a major part of data science, one that a computer science major would cover is lesser proportions. I suppose you would cover a considerable portion of data science just by following your current major. I've resorted to online courses and practising the skills myself to learn data science. I find this more helpful. Also, bear in mind that not all successful data scientists are computer scientists.


Can we use AutoEncoder for Sparse Sensing?

Question: Is there a way to introduce sparsity constraint on an autoencoder to achieve compressions in the Cosine/Fourier domain? I want to use the encoder part of the Auto encoder as the feature extractor from the STL-10 dataset.
https://www.kaggle.com/residentmario/autoencoders
The features learned should be more optimized than the compression algorithms like JPEG.
Comment: you're stating a conflicting demand: you want your encoder to produce sparse data, but you want that data to be highly compressed. That is in conflict; or did I misunderstand what is supposed to be sparse in your model?
Comment: I want the encoder to highly compress the data like in the JPEG and then using the data to decode back the original image. The weights learn should be similar to the DFT basis.
Comment: yeah. so, that's what you basically always do when designing an autoencoder, you've got data->encoder->penalty->decoder, where "penalty" is typically a low-dimensional vector, and potentially a function applied to that. That's the most classical autoencoder thing I can think of!
Comment: Ya. That is exactly what I want to do. I am trying to replicate the compressions with some learned basis like DFT/others. Do you have any good idea on enforcing the weights of the encoder to some good basis?
Comment: Do the machine learning thing and initialize them randomly. If that doesn't work, you can put expert knowledge in it.
Comment: @Yvon, Could you please review my answer?
Answer: When we train Auto Encoder we usually apply the loss function on the result obtained from the decoder and not the encoder.
Hence the obvious step, adding a sparsity promoting regularization to the loss function, won't do what we're after.
What you may do is adding to the loss function the $ {L}_{1} $ norm, or any other differential regularization which fits you model (Maybe the KL Divergence), based on the output of the encoder.
Adding this penalty will promote sparsity at the output of the encoder.
Comment: Have you ever implemented something like that?
Comment: It shouldn't be hard to do. If you have separate backbones for the encoder and decoder, all needed is to hook the encoder output to the loss.


Must an annuity provider payout a lump sum on an inherited annuity without charging fees?

Question: I inherited 1/3 of an annuity account. Is it required for companies, if requested to payout lump sum on inherited annuity account and not charge fees?
Comment: Presumably their cash value would be best but you can get a fair market quote from another unrelated finance company for a lump sum payment in exchange for the annuity stream, to keep them honest.
Answer: It depends on the contact which set up the annuity, but this is almost certainly NOT something they are required to do -- and if they do it you're subject to their determination of what the balance would be.
An annuity is an insurance product.  When it was purchased, a specific agreement was made that included analyzing the probable rates of return the money could get, the expected duration of payments,  the cost of managing this account and profit for the company. To cancel that agreement I expect you'd at least need to give them a reasonable profit, and possibly pay a penalty, and quite possibly make good any excess payments they made based on the expectation of later income from investment. And even if some form of cancellation is permitted, it may be an all-or-nothing deal rather than letting you cancel just 1/3.
Get a copy of the annuity policy. Read it. If in doubt ask the company; if you don't like their answer ask a lawyer to review it. Good luck.


CORS No Access Control Allow Origin

Question: I have a GP service that generates a PDF report in reportlab based on a country clicked on a web map. I've placed the HTML/Javascript document on our web server for testing, and it's working (although we can only generate one report at a time, but that is a separate issue). I've tried to place this code in an HTML widget on our website and test it, and I keep getting the "XMLHttpRequest cannot load  No 'Access-Control-Allow-Origin' header is present on the requested resource." I've tried to follow every thread I've found on this (there are dozens) and added "add name="Access-Control-Allow-Origin" value="*" to the web config files on our proxy server and the arcgis web config in the wwwroot. I'm still getting this error when I run the tool. We have two other pages on our website that use a GP tool to generate charts and these pages do not throw up this error. I'm not sure how to get this working.
Answer: Try to add this to the config:
<code><add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="*" />
<add name="Access-Control-Allow-Methods" value="*" />
</code>
Comment: Thanks. Which config file? The one in the wwwroot folder?
Comment: web.config file
Comment: Right, there are two web config files, one on our proxy server and one in the wwwroot folder.
Comment: Actually there are three web config files in our wwwroot folder. Two for DotNet and one for the Arcgis web adapter. I still can't get it to work.
Answer: Just found this public CORS solution. I dropped this into the JavaScript and it works.
<code> (function() {
var cors_api_host = 'cors-anywhere.herokuapp.com';
var cors_api_url = 'https://' + cors_api_host + '/';
var slice = [].slice;
var origin = window.location.protocol + '//' + window.location.host;
var open = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function() {
var args = slice.call(arguments);
var targetOrigin = /^https?:\/\/([^\/]+)/i.exec(args[1]);
if (targetOrigin && targetOrigin[0].toLowerCase() !== origin &&
targetOrigin[1] !== cors_api_host) {
args[1] = cors_api_url + args[1];
}
return open.apply(this, args);
};
})();
</code>

CORS No Access Control Allow Origin


Erratic behaviour of Android customised buttons within fragments controlled by one activity, where they exhibit a repeating pattern

Question: I have a repeating pattern of behaviour (or mis behaviour!) by my customised buttons, when the user  navigates from a choice fragment, (deciding between new and existing records) where the choice taken is for Existing records, which leads to a fragment with a populated spinner with a drop down list of existing records, with a retrieve button. The action being to select the record from the drop down list and then click the retrieve button.

Fig 1 (patientNotesFg)

Fig 2 (findPatientRecordFg)

Fig 3 record detail display
The retrieve button click,  should then lead to the record details fragment, which is a whole selection of edit text fields which display the existing record, and significantly have a number of further customised buttons at the bottom of the fragment (back, update, analysis, etc). The back button is currently the only one with code behind it which takes the user back to the  New/Existing record choice fragment.  So we have a cycle of ,

chose existing record, (Fig 1)
chose from spinner list, (Fig 2)
click retrieve button, (Fig 2)
see record in display fragment (Fig 3), and
click back button, to return to New/Existing record choice fragment. (Fig 1)

For simplicity I have been using records 1,2 & 3,  entitled Record 1, Record 2, Record 3, to select and try and display in the detail display fragment (4.  above)  sequentially.  I think I've established that its not the record content which  causes the 'misbehaviour'  more the code behaviour around the record handling which I cannot de-bug.
The erratic button behaviour  is the number of times the button has to be clicked before it does what its supposed to do, and with in the cycle, what the result is.
On starting we get to fig 1, chose Existing and get to fig 2 the spinner. Chose Record 1 & hit retrieve. This displays record 1, which is fine. Now we hit back button,  this requires 2 presses/clicks before it actions and takes you back to fig 1.
Chose Existing records, and in the spinner, chose Record 2, click retrieve, and record 2 is displayed, which is fine.  Hit back button, 1 click takes you back to the 'top' fragment  - Fig 1 .
Now chose Existing records again, and at the spinner chose Record 3 and click retrieve. Now this requires 2 clicks to action, but here's the next problem, the record displayed is Record 2.
Now hit back button, requires only 1 click and it takes you back to the Fig 1  top fragment.
Again chose existing,  chose Record 3, click retrieve, 1 click only required, and Record 3 is displayed. Click back button, single click required, & you're back at the top fragment as  Fig 1.
To summarise this cycle I've created a small spreadsheet of the results to show the pattern that's emerged !!

All the buttons have an OnClick line in their layout xml file, which leads back to an associated method in the main activity  'MainActivity'.
The patient details back button's layout xml is as follows :-
<com.example.martin.ph_program_test3.ButtonPlus
    android:id="@+id/Patient_Details_Back"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    style="@style/CustomButton"
    android:text="@string/Back"
    android:layout_marginTop="20dp"
    android:layout_below="@id/Notes"
    android:layout_alignStart="@id/Notes"
    android:onClick="patient_Details_Back"
    />

And the ButtonPlus java file is as follows :-
package com.example.martin.ph_program_test3;

import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.widget.Button;

/**
 * Created   on 09/09/2015.
 */
public class ButtonPlus extends Button {
public ButtonPlus(Context context) {
    super(context);
}

public ButtonPlus(Context context, AttributeSet attrs) {
    super(context, attrs);
 }

public ButtonPlus(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
 }

   public void setTypeface(Typeface tf, int style){
     if(style == Typeface.BOLD){
         super.setTypeface(Typeface.createFromAsset(getContext().getAssets(), "TahomaBold.ttf") );
     }else
     if (style == Typeface.NORMAL){

       super.setTypeface(Typeface.createFromAsset(getContext().getAssets(), "Plain Germanica.ttf"));
     }else
     if (style == Typeface.ITALIC){
         super.setTypeface(Typeface.createFromAsset(getContext().getAssets(), "Tahoma Faux Italic.ttf"));
     }
    }
}

The OnClick method within MainActivity  which deals with the 'Back' button click from the detailed  record display  'patient_Details_Back' is as follows :-
public void patient_Details_Back(View view) {

Log.d(DEBUGTAG, " ---->>>>>>>  inside patient details back  L 345  ");

patientID = 0;

    if (patientNotesFg != null) {
        Log.d(DEBUGTAG, " ---->>>>>>>  patientNotesFg  NOT null L 391  ");

        trans = getFragmentManager().beginTransaction();
        trans.replace(R.id.fragment_container, patientNotesFg);
        trans.addToBackStack(null);
        Log.d(DEBUGTAG, " ---->>>>>>>  patientNotesFg  NOT null L 396  ");
        trans.commit();
        Log.d(DEBUGTAG, " ---->>>>>>>  patientNotesFg  NOT null L 398  ");
    } else if (patientNotesFg == null) {
        Log.d(DEBUGTAG, " ---->>>>>>>  patientNotesFg  ==  null  L 400  ");
        patientNotesFg = new PatientNotesFg();
        trans = getFragmentManager().beginTransaction();
        trans.add(R.id.fragment_container, patientNotesFg);
        trans.addToBackStack(null);
        trans.commit();
}
}

I have placed a whole bunch of displays  to track the execution, and where this  button requires 2 clicks to work,  displays on lines 391-398 occur twice, but only action the code on the second run through!
On a similar vein  where the retrieve button requires 2 clicks to work, I have similarly placed displays in the code to track the execution and I get the same double display of the debug tags as per lines 716, 727, 729 but nothing happens on the first run through, only after the second click do I get the display of the record.
The code for the retrieve  onClick method is as follows :-
public void retrievePatientRecord(View view) {

        Toast.makeText(this,"  ******   INSIDE RETRIEVE PATIENT RECORD  - BUTTON PRESS   *****  ", Toast.LENGTH_LONG).show();
//   the patient has been chosen, now get the patient-ID from  findPatientRecordFg
        this.patientID = findPatientRecordFg.patientID;

//  clear down the current values in this class, & the controller class
    clearDownCurrentStringValues();
    runClearDownControllerSetters();

   Log.d(DEBUGTAG, " ---->>>>> retrieve this record L 664 with ID =  " + findPatientRecordFg.patientID);

// call to controller for (DB query for) existing patient's records
        controller.retrievePatientRecords(patientID);

// populate patientDetails fragment fields and re-display patient details fragment.

      if (existingPatientFg != null) {
      Log.d(DEBUGTAG, " ---->>>>> NOT NULL existingPatientFg  @  L 716   ID =  " + existingPatientFg);
            populatePatientDetails_fgWithCurrentValues();
// clear down the bundle's existing arguments
            existingPatientFg.getArguments().clear();
// refresh the bundle with the new arguments
            addStringsToArguments(bundle);

// do the fragment replace, & display
            trans = getFragmentManager().beginTransaction();
            trans.replace(R.id.fragment_container, existingPatientFg);
            trans.addToBackStack(null);
            Log.d(DEBUGTAG, " ---->>>>> NOT NULL existingPatientFg  @  L 727 ");
            trans.commit();
            Log.d(DEBUGTAG, " ---->>>>> NOT NULL existingPatientFg  @  L 729 ");
        }else
        if (existingPatientFg == null){

            existingPatientFg = new ExistingPatientFg();
            Log.d(DEBUGTAG, " ---->>>>> existingPatientFg  @  L 734   ID =  " + existingPatientFg);
            populatePatientDetails_fgWithCurrentValues();
            bundle = new Bundle();
            addStringsToArguments(bundle);
            existingPatientFg.setArguments(bundle);
            trans = getFragmentManager().beginTransaction();
            trans.add(R.id.fragment_container, existingPatientFg);
            trans.addToBackStack(null);
            trans.commit();

        }
    }

As to what is happening where  the retrieve button requires 2 clicks and then displays the last record not the one being requested, that's a mystery to me at the moment, I'm looking into see if that's a DB query problem,  but since it only happens with the double click event, I'm not so sure it's a DB issue!
I've seen one S/O question where the  particular parent theme was implicated in some buttons behaviour (I haven't been able to find this one again so can't post the link) , but I do remember it was a different theme to the one I'm using, here's my style.xml file :-
<resources>

</resources>

So after this rather large exposition of information I'm hoping this may be sufficient to allow someone more knowledgeable in the ways of android to be able to help me solve this problem, which has really got me beat at the moment!
Thanks in advance !
Comment: `Thanks in advance !` ?  No. No. We want explicit thank after you have been helped. Dont run away like that.
Comment: I have no intention of 'running away' like anything...., I'm indicating  my gratitude of anyone taking the time to read through my problem in order to be able to help me!
Comment: FYI, I've tested this logic with bog standard buttons and get the exact same result, so its very probably not a button issue, more likely the inter-relationship between Activities, fragments and how the onClick() method works. I am still stuck, needing help though!
Comment: This is much too much ĉode to deep in. Sorry but if you cannor post much less code that misbehaves the same way  think that nobody will take the effort to read that all. Cannot you make an example app with say one activity and two fragments which demonstrates your issue?
Comment: It is unclear what we see in Fig 1, 2 and three. Activity? A fragment? Can you add it to the description in the post? Why is fig 3 so much bigger?
Comment: 'Now we hit back button, this requires 2 presses/clicks before it actions and takes you back to fig 1. '. Is this intentionally?
Comment: hi greenapps, Figs, 1,2, & 3 are all fragments, they are all the same size, I just only screen captured the buttons in the centre of the fragments to show their presence. Your other comment, - Clicking a back button (or any button) should only need 1 click, my problem is I'm needing 2 to get an effect, which is the symptom of my problem.
Comment: What changes after one click? Really no effect?
Comment: on the offending buttons, I've put several log cat displays, and the code falls through these displays fine putting a message out onto the log cat, but doesn't do any of the code its supposed to do, until you hit the button a second time.
Answer: In order to try and find a solution to this problem, I wrote a program going back to the very basics, which emulated the essential navigation logic of this program.  I re-created this double button click problem, but noticed it also involved the rather peculiar display of the patient details fragment as shown in Fig 3  when the double click happened. It occurred to me that maybe the fragment_container   was  getting confused about what it was  trying to display because there was more than one  existingPatientFg  (which inflates the patient details fragment -  as in fig 3)  within it at certain times.  So I inserted this next piece of code where ever the existingPatientFg  was being dispensed with by  for example, a navigation button click to another fragment.
if (existingPatientFg != null){
    trans = getFragmentManager().beginTransaction();
    trans.remove( existingPatientFg);
    trans.commit();
}

and this solved the problem and the double button click disappeared.
My explanation of the problem may be wrong, even though my solution works & after quite some testing, just to make sure.
My additional conclusion is that you also have to be quite careful about which command you use to effect the different display of  a fragment as in …
trans.replace(R.id.fragment_container, patientNotesFg);

or
trans.add(R.id.fragment_container, patientNotesFg);

while they seemingly give the same result, 'adding' to the container appears to possibly create a cumulative type problem, which may require an active 'clearing out' approach ie some removals, to avoid the kind of problem I stumbled on and which had defeated me for some months!


TypeError: unsupported operand type(s) for +=: 'int' and 'str'

Question: I'm getting this error when reading from a file:
line 70 in main: score += points
TypeError: unsupported operand type(s) for +=: 'int' and 'str'

I'm taking an integer in the file and adding it to the variable score. The reading from the file is done in the next_line function which is then called in the next_block function.
I have tried converting both score and points to an integer which doesn't seem to work.
Here's the program code:
# Trivia Challenge
# Trivia game that reads a plain text file

import sys

def open_file(file_name, mode):
    """Open a file."""
    try:
        the_file = open(file_name, mode)
    except IOError as e:
        print("Unable to open the file", file_name, "Ending program.\n",e)
        input("\n\nPress the enter key to exit.")
        sys.exit()
    else:
        return the_file

def next_line(the_file):
    """Return next line from the trivia file, formatted."""
    line = the_file.readline()
    line = line.replace("/", "\n")
    return line

def next_block(the_file):
    """Return the next block of data from the trivia file."""
    category = next_line(the_file)

    question = next_line(the_file)

    answers = []
    for i in range(4):
        answers.append(next_line(the_file))

    correct = next_line(the_file)
    if correct:
        correct = correct[0]

    explanation = next_line(the_file)

    points = next_line(the_file)

    return category, question, answers, correct, explanation, points

def welcome(title):
    """Welcome the player and get his/her name."""
    print("\t\tWelcome to Trivia Challenge!\n")
    print("\t\t", title, "\n")

def main():
    trivia_file = open_file("trivia.txt", "r")
    title = next_line(trivia_file)
    welcome(title)
    score = 0

    # get first block
    category, question, answers, correct, explanation, points = next_block(trivia_file)
    while category:
        # ask a question
        print(category)
        print(question)
        for i in range(4):
            print("\t", i + 1, "-", answers[i])

        # get answer
        answer = input("What's your answer?: ")

        # check answer
        if answer == correct:
            print("\nRight!", end= " ")
            score += points
        else:
            print("\nWrong.", end= " ")
        print(explanation)
        print("Score:", score, "\n\n")

        # get next block
        category, question, answers, correct, explanation, points = next_block(trivia_file)

    trivia_file.close()

    print("That was the last question!")
    print("Your final score is", score)

main()
input("\n\nPress the enter key to exit.")

Answer: points is a string, because you read this from the file:
points = next_line(the_file)

but score is an integer:
score = 0

You can't add a string to an integer. If the value you read from the file represents an integer number, you need to convert it first, using int():
score += int(points)

Comment: Thanks, this worked. I was trying to convert the function call to an integer which is why it wouldn't work
Answer: When receiving an error message, it can often reveal useful information about a problem...
TypeError: unsupported operand type(s) for +=: 'int' and 'str' is basically saying that one can't use the += operator (which can be simplified to +) with the two different types of objects it received (string and integer, in your case).
Your points object is of type integer, whilst your score is a string (since it was read from a file).
To correct this, you must convert the string to an integer, allowing you to sum it with the other integer, this can be done using the int() function.
tl;dr: type(1)!=type('1')
Comment: Thank you for your explanation, it makes sense now :)
Answer: you are trying to add int and str
score = int(score)
score += points


Is there an easy way to see a log of SCP activity on a server (ala /var/log/secure for ssh login)?

Question: On Linux systems, /var/log/secure  (or similar, depending on distro) shows all SSH login activity.  Is there a similar log for SCP?  If not, what's a good approach to enabling logging of scp activity on my servers?  Is it SELinux through /var/log/audit/audit.log?
Answer: You need to adjust your sshd logging level to DEBUG in order to see scp client connections.
Look at the /etc/ssh/sshd_config for the "LogLevel" directive.
LogLevel DEBUG

Or the scp -o LogLevel for testing.
Answer: SCP uses SSH connections to transfer files, so SCP logins should appear in the same logs alongside SSH logins. From the man pages:

scp copies files between hosts on a network.  It uses ssh(1) for data
       transfer, and uses the same authentication and provides the same security
       as ssh(1).
Comment: I know it uses SSH and I thought logs would also go to the same place, but it actually doesn't show up in /var/log/secure nor /var/log/messages.  The only evidence of SCP is when I have SELinux and auditd running... in which case it gets logged in /var/log/audit/audit.log.
Answer: scp -o LogLevel=DEBUG <rest of parameters>

eg:
$ scp -o LogLevel=DEBUG origfile.txt userfoo@serverbar:/home/userfoo/

Comment: This is already in the top-voted answer. Note that this does *not* show you the scp activity for the server but the log for that connection. Please make sure that you document your code/commands instead of just posting raw syntax without explanation.


Using WhatsApp without current SIM

Question: Next week I will go on holiday to a foreign country and for this, I bought a prepaid SIM card because with my phone's current plan, I have little to no data in Roaming. My problem is that I will be using my phone with this new card, but I would still like to use my current WhatsApp account.
The only solution I have come up with is changing my number in my Whatsapp account's settings, but I wouldn't really want to do that because it notifies all my active conversations.
So, is there anything else I can do so that I should be able to still use my WhatsApp with this prepaid SIM card?
Answer: Yes, you are actually in the right direction. WhatsApp requires a SIM for installation and activation. But once activated, it doesn't matter if the SIM stays in the same phone or is tossed to a different phone, or even lost. Sure, in cases of lost SIM, re-installing WhatsApp with the same phone number will be impossible.
WhatsApp will keep on working on your phone, provided you have a data connection (no matter which SIM it comes from) or WiFi access.
So, yep, just toss in your prepaid SIM, turn on data connection and continue to use your old (current) WhatsApp. You do not have to make any changes in WhatsApp. Changing the number is also absolutely NOT NEEDED. It is only used when you are officially switching to a different number and would like to carry your chats along.

Using WhatsApp without current SIM


Do other blockchain have gas concepts?

Question: I understand that Ethereum have gas mechanism to avoid infinite loop and network abuse, but I was wondering whether other blockchain platforms also have gas concepts? Say Cardano, Hyperledger,...
Comment: Gas and transaction fees are universal concepts. For more complex fee model, check EOS which has different prices for network bandwidth, CPU and storage.
Answer: There are two crucial aspects of using gas or transaction fees in public, permissionless networks.

Every transaction published into the blockchain imposes on the network the cost of needing to download and verify it. People who run a node spend time, money and effort to do this for which they are compensated. Transaction fees are rewarded to miners (validators) for these services.
To help prevent accidental or hostile infinite loops, e.g. denial of service ('DDoS') attacks. In a DDoS attack, an attacker tries to flood the network with empty transactions. Doing this for an extended period of time, with transaction fees, make these attacks to become expensive. Additionally, for smart contract platforms, it avoids computational wastage in code, by setting a limit to how many computational steps of code execution it can perform within a transaction.

Most public blockchains denominate these transaction fees in their native currency, incl. Cardano and most other blockchain- and smart contract platform.
Hyperledger Fabric is used in private, permissioned set-ups, meaning that you know the other peers in the network. There is typically already some level of trust between these parties. This makes it easy to detect a malicious peer and revoke its access. These networks typically do not have a native currency in the protocol either.
Ethereum can be run in a permissioned setting as well, making the native currency obsolete and transactions free.

Do other blockchain have gas concepts?