Does Google Play balance expire?

Question: I have a credit on Google Play that is from a gift card and not a promotion. Do I have to use it by a certain date?
Answer: From the Google Play Gift Card Terms of Service:

No Fees or Expiration. No fees or expiration dates apply to this Gift Card. Any refunded Google Play amounts, if applicable, will be
  credited back to your Google Play balance for future use under the
  same terms, unless otherwise required by law.

This is partially because of laws around gift cards:

In 2009, Congress passed the Credit Card Accountability Responsibility
  and Disclosure (CARD) Act, which set consumer protections for gift
  cards based on many state laws. The law provides that gift cards
  cannot expire within five years from the date they were activated and
  generally limits inactivity fee on gift cards except in certain
  circumstances, such as if there has been no transaction for at least
  12 months. The federal law creates a floor for regulation and leaves
  room for state regulation on redeeming gift cards for cash and
  unclaimed property provisions.
Answer: I upvoted Ryan Conrad's answer because it is correct, and also provides some interesting additional information. However, it is correct for the United States.
Here in Australia, Google Play cards have this clause (unfortunately):

3. Expiration Period; No Fees. Gift Card value expires 2 years following the date of (1) card issuance, or (2) last activity on Google Play stored value account into which the card is redeemed, whichever is later. No fees apply to the Gift Card. If required under applicable law, any refunds will be credited back to your Google Play balance for future use under these terms of service, unless otherwise required.

I actually found a card that I had completely forgotten about. Thankfully it still worked!
Answer: The answer regarding US cards is false.  Despite the wording on the cards themselves saying there is no expiration date, they still expire after 2 years. If you call and complain, Google will tell you deal with the store that issued them, which is usually impossible.

Does Google Play balance expire?


What's the smoothest airport to enter the US for passport control out of Newark, Boston or Philadelphia?

Question: I'm travelling with a student VISA to Pittsburgh. I'm flying from Lisbon and the flight connections are to Newark, Boston or Philadelphia.
I would like to know if there's an "ideal" option between these.
In order to avoid delays getting stuck in long lines and missing the next flight.
Comment: From the title alone it was quite subjective and broad (there area  lot of international airports). The content clarified this, but not everyone may have spotted that. I've updated the title in the hope that helps.
Comment: Why the close votes?  This seems a legit question to me, although knowing the arrival times would be handy.
Comment: I went through customs and immigration in 5 minutes at Seattle Tacoma on a Saturday afternoon.
Comment: Of which country are you a national? Portugal? and is your country of birth also Portugal? And is this the first time you're traveling on that student visa?
Answer: I'd go with Boston of those three options, but it is hugely dependent on time of day, and what other flights arrive before/after your arrival, but for your connections, the most important thing is layover time. I'd try to maximize layover time, so while Boston has less traffic (only slightly from PHL) (significantly from Newark), if you can get an extra 20 minutes on your Philadelphia layover, I'd take that. Also, just reading the tripadvisor forums, people generally report 40 mins to get through customs in Boston, a little under an hour in Philly, a dab over an hour at Newark, at peak times.
Source for preference: professional experience
Answer: I would also go with Boston, as years ago, I got through immigration pretty quickly. However, it may be more important to determine whether you will have to change terminals, and/or whether you can check through your baggage.
In any case, give sufficient time for the transfer; depending on the connecting flight and airline, give even a bit more, or you may be stranded for the day (if bad comes to worse).


Is there a specific term to refer to a word associated with specific part of speech?

Question: I'm looking for a term I can use to refer to words tagged with a specific part of speech. Let's say the word run may be used as a verb and as a noun. So, run (n) and run (v) are ... of word run. Is there a term I can use to fill in the gap?
Comment: "Functions" of the word?
Comment: @JamesRandom I was thinking about it, but usually by term `word function` we mean function of the word in a sentence i.e. subject, object, modifier etc.
Answer: In looking at several sources, they all use the phrase parts of speech, so that seems to be a common term.
After that, more of them than not use the single word function. But both category and class are also used.
Note, too, that while most sources list eight parts of speech, and give common names to them, others will use a different number—and sometimes different names.
So, you're not going to find any universal authoritative source on terminology (or even classification). When writing about parts of speech, you're going to have to simply choose your own terminology and remain consistent.

According to Practical Grammar: A Canadian Writer's Resource, by Maxine Ruvinsky:

Every word in a sentence can be categorized as one of eight parts of speech depending on its function—what it does—in that sentence. The following are the eight parts of speech:

She goes on to mention nouns, pronouns, verbs, adjectives, adverbs, prepositions, conjunctions, and interjections.

Part of Speech says:

In the English language, words can be considered as the smallest elements that have distinctive meanings. Based on their use and functions, words are categorized into several types or parts of speech. This article will offer definitions and examples for the 8 major parts of speech in English grammar:  noun, pronoun, verb, adverb, adjective, conjunction, preposition, and interjection.

Butte College says:

There are eight parts of speech in the English language: noun, pronoun, verb, adjective, adverb, preposition, conjunction, and interjection. The part of speech indicates how the word functions in meaning as well as grammatically within the sentence. An individual word can function as more than one part of speech when used in different circumstances. Understanding parts of speech is essential for determining the correct definition of a word when using the dictionary.

ThoughtCo says:

A part of speech is a term used in traditional grammar for one of the nine main categories into which words are classified according to their functions in sentences, such as nouns or verbs. Also known as word classes, these are the building blocks of grammar.

It further says:

The parts of speech are commonly divided into open classes (nouns, verbs, adjectives, and adverbs) and closed classes (pronouns, prepositions, conjunctions, articles/determiners, and interjections). Although we can add to the open classes of words as language develops, those in the closed classes are pretty much set in stone.

Note the addition of articles/determiners as a ninth part of speech.

Oxford Dictionaries says:

All words belong to categories called word classes (or parts of speech) according to the part they play in a sentence. The main word classes in English are listed below.

It lists noun, verb, adjective, adverb, pronoun, preposition, conjunction, determiner, and exclamation. Like ThoughtCo, this includes a ninth part of speech (determiner)—and Oxford renames interjection to exclamation.


Transfer precipitation forecast in mm to expected snowfall in cm

Question: What conversion functions exist to transfer precipitation forecast in mm to expected snowfall in cm? Simple rules of thumbs as well as more advanced methods would be of interest.
Comment: Hello from Athens Greece! We are about to face here in Athens tomorrow morning till midnight a heavy snowstorm of approximately 76.2 - 127mm of snowfall in less than 24h with low temperatures at 26.6F rising up to 35.6F along with moderate winds of 8.70-16.78mph, so I want to ask the amount of the accumulated snow that are expected.
Comment: @ArisKolovos usually snowfall forecasts will be the amount of snow (not the water equivalent liquid precipitation amount as this question asks about), and your values sound too large to be water equivalent.  So you don't need this question.  How much will accumulate will depend on ground temperature, wind, sunlight, etc.
Answer: The snow density, which is the "conversion function" you are looking for, of fresh fallen snow varies with atmospheric conditions, vapour saturation and temperature since these parameters determine the snow grain morphology (See this figure from SnowCrystals.com; I leave it as a link for copyright reasons). Densities can vary from as low as < 100 kg m-3 for cold conditions to maybe > 400 kg m-3 for wet snow. This essentially cover the spectrum for a normal snow pack. If you, by your question, are thinking about weather services reporting how much snow will come from a snow fall it is by no means a an easy thing to predict since you may "know" the amount of precipitation from a model, but you will have more difficulties knowing the density of the fallen snow unless you devise a classification based on the atmospheric conditions during snow fall (based on snow crystal structure as in the figure). Hence for many purposes, the snow pack thickness is of little value and most will want the water equivalent of that snow, i.e. how much liquid precipitation it corresponds to.
If snow is falling during drifting conditions, the density may become higher than the falling snow itself would have resulted in. This is because with wind drifting, snow crystals are reduced in size by crushing and can hence be more densely packed.
With time the snow pack will densify due to metamorphic processes. This will cause the snow to decrease in thickness with time. But that is perhaps a different question since yours were about fresh snow.
Answer: @Peter Jansson provides a much more thorough answer, but for a quick conversion of expected liquid water equivalent to expected snow depth:
1 inch liquid water = 10 inches snow for warm storms
1 inch liquid water = 20 inches snow for cold storms
or
25 mm = 25 cm for warm storms
25 mm = 50 cm for cold storms
Often a certain climatology will trend one way in these numbers, e.g. maritime winter climates such as in California tend to get warmer storms so you generally get between 10 and 15 in/in  and in Utah/Colorado which have continental climates you generally expect 15-20 in/in unless it's late spring.


Is there any consensus among philosophers on ethical systems?

Question: It seems that in modern philosophy, there has been less discussion about ethical philosophy and more discussion about linguistics, philosophy of math, etc. Is this because there's some sort of consensus on which ethical system is right, if any at all? I'd appreciate your thoughts.
Comment: Personally I think this phenomenon may appear due to science's popularity nowadays. It may give people the idea that ethics is something we can't say much about because we can't logically prove moral rules. I am a layman though.
Comment: To the op, I think that just depends greatly on your instructors and the sorts of conversations you are in (whether academic or lay). There's probably more articles on ethics produced in a day than I can read in a year.
Comment: @virmaior You think so? Where are you finding these articles?
Comment: You could start with the journal *Ethics* (http://www.press.uchicago.edu/ucp/journals/journal/et.html). And then work your way around other similar journals.
Answer:
there has been less discussion about ethical philosophy and more discussion about linguistics, philosophy of math

While there has been more focus on linguistically motivated issues in the 20th century, ethics has never fallen by the wayside. And while normative ethical questions (such as which ethical system is correct) are still discussed, ethics has taken a closer look at its metaphysical basis (metaethics), as well as the problems associated with putting particular normative ethical theories to work (practical/applied ethics).
As far as your question goes, you may find the survey here useful. Roughly 26% of contemporary philosophers are deontologists, 24% are consequentialists, 18% are virtue ethicists, and 32% are none of these; they may be moral particularists, nihilists, or something else entirely. So there is nothing even close to a consensus about which ethical theory is the correct one. Especially since there is major dispute about whether the notion of correctness applies to ethical theories in the first place!
Comment: There is even those who deny that morals even exist. Which confuses the matter further.
Answer: I think its the opposite.  Its not that there is a consensus on which ethical system is right, but rather that we are finding that the ethical systems are more bound by the language used to describe them than anything else.  We're finding two problems:

ethical systems defined in natural language inherent the limitations of natural language and its tendency to be ambiguous or imprecise.
ethical systems defined in mathematically precise languages inherent the raw difficulty of describing some profound concepts which many people intuitively want to see in an ethical system.

As an example, consider debating the ethics of killing.  One ethical system may say it is unethical to kill humans, another may say that it is unethical to kill any sentient creature.  We could compare them and contrast them until the cows come home, but consider:

We need a philosophically meaningful boundary between human and not-human.
We need a philosophically meaningful boundary between sentient and non-sentient
We need a definition of "kill" for each of them.

By corollary, we need to define "life" for each of them.

Those linguistic definitions turn out to be remarkably harder, given modern scientific understanding, than they were a few hundred years ago.  Modern medicine on its own has rewritten what it means for a human to be alive.  In fact, it has done so much that there are now conflicting definitions such as "brain dead" "clinically dead, " or even "beating heart cadaver" appear.  Cryogenics has started adding a new definition, "information theoretic death."
Most philosophy builds from premises to conclusions.  If two individuals linguistically disagree on the meaning of a word, no conclusion can be reached.  The linguistic issues dominate.
Once agreement on a word is arrived at, then the discussion of ethical systems can take place.


Ubuntu 16.04 LTS does not see Windows 10 partitions

Question: I installed Ubuntu 16.04 LTS on the external hard disk (1 TB size). I have a laptop with Windows 10. Windows 10 is set on the 512 GB disk. After entering Ubuntu, I can't see (access) the Windows 10 partitions. Somewhere on the Internet someone wrote that the possible solution is turning off quick start of Windows. I turned off quick start in BIOS and also in Windows power settings but it didn't help. In Ubuntu, I opened "disks" tool, and it shows me the Windows disk with partitions but there is no information (it writes "Unknown") about file system of two partitions (partition 3 and partition 4) which correspond to "C" (system files) and "D" (data). I attach the prtscr of "disks" window. Please advise me what I can do to solve this problem.
Comment: Disable Fast startup in Windows and Secure Boot in BIOS
Comment: have you ever manipulated your partitions within windows? - if yes, [this answer](https://unix.stackexchange.com/a/296447/93768) may match.
Comment: I disabled Fast startup in Windows and Secure Boot in BIOS however the problem isn't solved - Windows partitions aren't seen within Ubuntu. And one more problem appeared after installing Ubuntu. Now when I try to start Windows 10, it requires the BitLocker key, and every time when I want to enter Windows, I need to go to the official site (using my mobile phone) where I can get the BitLocker key (my laptop is Lenovo Thinkpad X1 Carbon). So should I decrypt Windows disks now? May the encryption cause the problem with access to Windows partitions within Ubuntu?
Comment: I haven't manipulated my partitions within Windows.
Answer: Eventually I coped with two problems by disabling the BitLocker encryption in Windows. So now I can enter Windows without any BitLocker recovery key and I can see Windows partitions within Ubuntu (in the launcher). I attach the prtscr of "disks" tool in Ubuntu - the information about Windows partitions appeared (file system NTFS is recognized).
But one more problem occured (I don't know when this chain of problems finishes). From time to time, when shutting down (or restarting) either Windows or Ubuntu, my laptop doesn't shut down, it suspends (or may be "hangs" will be more correct to say), the screen becomes black and nothing happens. In this case, I have to push and hold power button in order to turn off computer. What can cause such a trouble? May it be somewhat related to USB connection by which the external hard disk is connected to the laptop?


Can I refight Ring Fit Adventure's final boss?

Question: I beat the final boss recently. It was a fun and intense workout, and I'd like to be able to play it again in the future. Is there a way to refight it without starting the game over, or is it a one-time event?
Answer: It seems you cannot, according to dafipp on Reddit:

I wasn't sure so I just went back and checked...No, the original Dragaux fights do not open back up after completing the first run thru of the game.

There is however an option to

 start a New Game+ or New Game++, and you will encounter him there again
Answer: It seems that that the answer from Mathias is no longer correct. You definitely can refight the final boss again (I've tested it myself).
Since it seems that not everybody can I have the following 3 hypotheses.

You need to complete all stages for each of the 23 worlds.
You need to complete all stages and secondary missions for each of the 23 worlds.
You need to get the most recent update.

I remember that when I finish the game the first time I saw the exclamation flag on the final boss when I got back. That leads me to think that the first hypothesis is the correct one.
Comment: I have finished my second run and I haven't even completed and I can re-fight the final boss which lead me to think that it was just a matter of updating the game
Comment: Sadly it appears you can't skip dialogs, credits, and summary, which alltogether take more time tgan boss fight. .


Farewell, bullets in unordered list

Question: Google Chrome 64.0.3282.137 (Google Play), Android 7.1.1
Answer: A fix for this will go live in the next build out of Stack Overflow. We moved some things around in our CSS reset, and unordered lists for mobile seem to have gotten lost in the shuffle. Thanks for reporting this!
Comment: @ɪʙᴜɢ there is special "employee" status for a user behind the scenes, which grants some moderator privileges,  but not all of them. The ability to add moderator tags is one of them, however editing is not. It's a mess, so if one need to do that on regular basis they usually get a diamond. (e.g. Joe Friend)
Comment: Hey, how can the red tag be suggested instead of applied directly?
Comment: hmm. are there any really good reasons for it? Feels like it belongs in a meta post ;p
Comment: Because he doesn't have a diamond, but just employee status.

Farewell, bullets in unordered list


Categories of aircraft (A,B,C,D): Is it possible for an airplane to move into a different category?

Question: Categories are defined for the Vat (Speed at threshold) which is Vso multiplied by 1.3, or Vsldg multiplied by 1.23 .
Since these speeds are related to the weight of the aircraft is it possible for an aircraft to start the flight in one category but then move into another one?
Answer: The FAA's Instrument Procedures Handbook, Chapter 4 has a good explanation of this (emphasis mine):

An airplane is certified in only one approach category, and although a
  faster approach may require higher category minimums to be used, an
  airplane cannot be flown to the minimums of a slower approach
  category. The certified approach category is permanent and independent
  of the changing conditions of day-to-day operations.

And:

A pilot must use the minima corresponding to the category determined
  during certification or higher. Helicopters may use Category A minima.
  If it is necessary to operate at a speed in excess of the upper limit
  of the speed range for an aircraft's category, the minimums for the
  higher category must be used. For example, an airplane that fits into
  Category B, but is circling to land at a speed of 145 knots, must use
  the approach Category D minimums. As an additional example, a Category
  A aircraft that is operating at 130 knots on a straight-in approach
  must use the approach Category C minimums.

In other words, the aircraft's "certified approach category" never changes. However, for operational reasons a pilot may use a higher category's minimums for an approach, but never a lower category's. One possible scenario would be if the flaps are inoperative and the pilot can't slow the aircraft to its normal approach speed.
Comment: Does anyone know how the certificated approach category would be affected by variable maximum takeoff weight? Presumably the certificated approach category is based off maximum takeoff weight, but could it be reduced for one day if the maximum placard weight was reduced by engineering on that day?
Answer: Here is the wording (emphasis mine) adopted by ICAO (Doc 8168, Vol1, Section4, 1.3 - Categories of aircraft):

The criterion taken into consideration for the classification of aeroplanes by categories is the indicated airspeed at threshold (Vat), which is equal to the stall speed Vso multiplied by 1.3, or stall speed Vs1g multiplied by 1.23 in the landing configuration at the maximum certificated landing mass. If both Vso and Vs1g are available, the higher resulting Vat shall be applied.

So the category of a given aircraft doesn't depend on its current weight but on its maximum certificated landing mass, which is constant.


What does the 'Field' selection do in QGIS report composer?

Question: In QGIS 3.4 report composer, when making a field group section, there is a selection under 'layer' labelled 'field'. Here, one seems to be able to select from all the fields in the layer. But as far as I can tell, this selection doesn't actually do anything. The report produces one map zoomed to each feature in the layer regardless of what field is selected here. Tables filtered by atlas id still produce one result per feature and there's no @layout_id variable. I can't fathom what the 'field' option is doing here.
Answer: So I just tested this with the states of Australia (ordered by name) to make sure I was correct.
There are three different outcomes you can achieve with this feature:

Don't use it: the pages will be ordered in the same order as the original data table / dbf file.
Select a field: the pages will be ordered by that field in descending order.
Select a field and specify "ascending order" in the checkbox below: I'll let you figure that one out.

That's all there is to it.
Comment: There is also the possibility for creating a Field Group Section inside a Field Group Section. For this to work, you have to choose the Field that is present in both Layers. For a detailed explanation look here: https://docs.qgis.org/3.4/en/docs/user_manual/print_composer/create_reports.html


ASWebAuthenticationSession on macOS 12.4 do not work properly

Question: I'm using ASWebAuthenticationSession authorization for my application.
It works fine before macOS12.4, but occur unresponse's issue.
After "session.start success", Click Cancel or Continue and there is no response.

        var session = ASWebAuthenticationSession.init(url: url, callbackURLScheme: "http", completionHandler: completionHandler)

        guard let provider = NSApplication.shared.keyWindow!.contentViewController as? FlutterViewController else {
            result(FlutterError(code: "FAILED", message: "Failed to aquire root FlutterViewController" , details: nil))
            return
        }

        session.presentationContextProvider = provider

        if(!session.start()) {
            NSLog("session.start  fail");
        } else {
            NSLog("session.start success");
        }

Answer: Edit: I just noticed I did not read correctly and missed the fact that this question was for macOS, not iOS. I still hope one of those answers might lead to a solution.
I have noticed 2 things that seem incorrect to me.

The first one is that you need a strong reference for your session. This limitation is only valid for iOS version < 13.0.
This means, the session variable must "outlive" the invoked method it was started in, e.g. setting a session attribute for the whole class.
I cannot see something similar in the code snippet you provided, it looks like a scoped variable to me.
From Apples documentation for this feature:

For iOS apps with a deployment target earlier than iOS 13, your app
must keep a strong reference to the session to prevent the system from
deallocating the session while waiting for authentication to complete.

The second thing is your callback URL scheme seems to be set to https.
The scheme should match your apps bundle ID.
It must be configured in your Info.plist file. Here's an example how to achieve this. It should actually be something like com.company.myappname instead of http. Your authentication provider would also need to redirect to com.company.myappname://someurl to make this work. Please note the :// must not be part of the callback URL scheme, only the part before that.


Consuming ASP.NET Web API in C#

Question: ASP.NET Web API seems to lack the service contract / data contract features of WCF web services which would have generated a wsdl that could be used to generate proxy classes. I'm wondering whether Web API is intended for consumption in a service-oriented architecture or if it's meant simply for Ajax consumption.
Answer: Web API (as far as I know) does not support WSDL generation. If you absolutely require a WSDL, WCF REST might be an option, though no longer supported.
Service-oriented architecture does not require the use of SOAP or reliance on a WSDL and RESTful services aren't restricted to being useful only for AJAX requests. There are quite a few RESTful web service client libraries available from nuget that makes interacting with these services easier. Though it might not be as simple as using code-gen, creating a library of POCO classes you can share with other C# clients also makes things easier. Hope that helps.
Comment: Thanks. My research is leaning toward the idea that the API ought not be too restrictive if using REST vs. SOAP. Consider, e.g., "hackable" urls vs a SOAP service that throws an error if one field is improperly formatted or missing.

Consuming ASP.NET Web API in C#


Play Music app is activated by Words With Friends

Question: Let me just say that I have used both apps independently for a couple of years.  I have a Galaxy S III.  Recently I replace it with same due to battery issues.  I don't know if the replacement is new or used.  I play Play Music and I also play Words With Friends.  Recently I have had strange occurrences with the phone.  When I play Words With Friends the last song I listened to on Play Music will start playing.  The App is NOT running until I start playing WWF.  I think this is probably a unique situation and I'll just wait until the phone is eligible for an upgrade next month.
Answer: Go to Applications Manager > Play Music and clear defaults.


Confidence Interval Application to a time series

Question: So I'm not sure if I 100% grasp confidence intervals. Say I have a huge data set of a bond prices from 1996 to present in MINUTES. Suppose I separate each data by day. If I were to use a Dickey Fuller Test (or any other t-test), on a particular day (thus a sample is drawn based on all points in one day) and the value I got rejected the null hypothesis, would it be conceptually right for me to conclude that because based on my sample I was able to reject the null, I am able to make a conclusion about the whole dataset (population)? In other words, would picking one day and not randomly picking datapoints throughout matter?
Answer: Yes, it matters. And no, you cannot generalize, unless the parameter you are testing is some structural parameter, in which case you are really just using a lower-powered sample to test your time series model parameter.


How do you apply SMOTE on text classification?

Question: Synthetic Minority Oversampling Technique (SMOTE) is an oversampling technique used in an imbalanced dataset problem. So far I have an idea how to apply it on generic, structured data. But is it possible to apply it on text classification problem? Which part of the data do you need to oversample? There is already another question about it, but it doesn't have an answer. Where can I possibly learn to get started with this?
Answer: Actually NLP is one of the most common areas in which resampling of data is needed as there are many text classification tasks dealing with imbalanced problem (think of spam filtering, insulting comment detection, article classification, etc.). But SMOTE seem to be problematic here for some reasons:

SMOTE works in feature space. It means that the output of SMOTE is not a synthetic data which is a real representative of a text inside its feature space.
On one side SMOTE works with KNN and on the other hand, feature spaces for NLP problem are dramatically huge. KNN will easily fail in those huge dimensions.

So I can propose you two approaches:

Do not care about the real text representation of new synthetic samples which I assume should be fine. You need to balance the distribution for your classifier not for a reader of text data. So apply SMOTE as traditional (however I usually use the solution 2 bellow so I do not gaurantee the result!) with some Dimensionality Reduction step.

1) Lets assume you want to make your data samples from minor class double using 3-NN. Ignore the major class(es) and keep only minor class samples.
2) For each sample point in feature space choose 5 nearest neighbors. Then choose 3 of them randomly (isn't it unnecessary complicated? if I didn't want to explain the original algorithm I would say just choose 3 neighbors!)
3) For each dimension calculate the distance between sample and neighbors and multiply it in a random number between 0-1 and add it to the original value of sample in that dimension. (this complicated paragraph simply means for each dimension choose a random value between the original sample and that neighbor!)

But I usually do another oversampling which is on the text (so more intuitive) and is kind of SMOTE.

1) Ignore the major class. Get a length distribution of all documents in minor class so that we generate new samples according the the true document length (number of words/phrases). We assume we want to make the size of class triple (so producing $k=2$ synthetic documents per original document)
2) Generate a sequence of $n$ random integers according to that distribution. It's used for determining the length of new synthetic document.
3) For each document: Choose one integer from random length sequence and $m$ random document whose length is close to the integer. Put tokens of all $m$ documents in a set and randomly choose $n$ tokens $k$ times. these are your $k$ new documents.
Comment: Thanks for the answer, but can SMOTE be applied for samples if they are represented using one-hot encoding? or they should be represented in another way?.
Comment: Hi Kasra, can you share some implementation related to the steps you mentioned
Answer: If you want to add more text/sentences traning data, you can use pre-trained word embeddings. Pretrained models like provides word vector representation of each and every dictionary word. It also provides 'most_smiliar' words.
You can simply use sample sentence and generate new samples by doing permutations of each and every word with its most TOP_N similar words.
e.g. if your sentence has 3 words, and if you choose 3 most similar for each words, you can upsample by 27 times.
Comment: Hi Yashodhan, how can we use this process if it is domain-specific? Thanks
Comment: Antonyms and various business/technical jargon might also have similar vector representations just because they appear in similar phrases (whereas they are different from that technical or business perspective). So, this will have an adversarial impact in practice.
Answer: I am having the same problem. I have multi-classification problem with imbalanced dataset over 10k for majority and 200 for minority.
Tired SMOTE but later have problem like Kasra Manshaei mention.
Text/Data augmentation is a method that I am trying. You basically take a sample(text) from dataset and replace some words with its synonym in the text to create a synthetic text. This way you have new synthetic text and after vectorisation the data still represent the original text.
Reference
nlpaug is a library that can handle text augmentation.


Finite Difference Methods for arbitrary elliptic PDE

Question: I am looking for textbook references that describe lattice numerical methods for arbitrary elliptic PDEs, particularly finite difference schemes and particularly in 2d. The few references that I have looked at only treat the laplacian or the heat equation, I would like the more general case when the differential operator does not have constant coefficients, ie
$$ Lu = A(x,y) u_{xx} + B(x,y) u_{xy} + C(x,y) u_{yy}. $$
Answer: I know this is a little late, but in the book "Linear and Quasilinear Equations of Parabolic Type" by Ladyzenskaja, Solonnikov and Ural'ceva, finite difference methods are shown for general enough parabolic equations (the elliptic case is subsumed in their explanation too).


How to respond to a reviewer request for "pictures of a real experiment" when my paper doesn't have experiments?

Question: One of my reviewers put a comment to my paper as "Show pictures of a real experimental test.". However, my paper describes a machine learning technique in electrical engineering.  I don't have any real experiments and I don't claim anything in the paper about that. I can not provide any result regarding the real experiment. The other comments are good and I worry about this comment. Could you help me to provide a response for that?
Comment: The comment reminds me of a story of mine.  First, my work is theoretical in nature.   In one of my papers, reviewers requested for an actual experiment.   I provided many arguments to justify that said such experiments will not change my conclusions.  My paper got rejected. :(   Good news is that the paper ended up in a higher impact journal.
Answer: There are two obvious possibilities here.

The review says only irrelevant things.  In that case, simply respond to the editor: "I was unable to determine the relationship between the comments of Reviewer 1 and the submitted manuscript.  Clarification would be appreciated."  The editor will conclude the referee did not read the paper and the review will be ignored.

The review is unclear due to sloppy writing or limited English skills.  In that case, I would interpret the comment as "Add a graph displaying evidence that the paper is correct."  The response would be "We have added a graph displaying y as a function of x, which supports our conclusion that ..."

Also, when you are a peer reviewer, try not to give vague feedback.
Comment: I really like this comment: *I was unable to determine the relationship between the comments of Reviewer 1 and the submitted manuscript. Clarification would be appreciated.*
Comment: I'm assuming here that your paper is not about pictures.
Answer: If you don't intend to do any real experiments any time soon, the best response is for you to be honest in your reply. Explain again that your work consists of a theoretical technique and that (if it's the case) it will be validated experimentally in future works. Maybe support it with a new graph (as Anonymous Physicist suggested), maybe change some paragraphs/sentences to make your point clearer.
Sometimes, reviewers don't really pay attention to details. It has happened to me to be questioned by reviewers about points that I had specifically explained in the text, as if the reviewer hadn't read that part of the article. So maybe he didn't understand your work is theoretical, or maybe there's a sentence that created some confusion.
By being honest, you'll either have your paper accepted (since you mentioned that the other comments are good) or rejected if the editor considers that experiments are necessary.  If it is rejected, it is not necessarily a bad thing: most of the times, a rejection is useful for you to improve your paper and resubmit, and you can even get accepted in a better journal/conference with the same work!
Comment: Thank you @Pseg
Answer: Something has generated this reviewer's request, and you need to try to figure out what that is.
Often, when people ask for an example, it is because something is less than clear when no example was provided.
I suggest coming up with an illustrative simulation to try to satisfy this reviewer.


Is there a way to make mobs invulnerable in Minecraft Console Edition?

Question: I've tried to find out how to make mobs invulnerable but nothing worked for me.. I'm wondering if it's possible?
Answer: Sorry, but no. You can do it on PC only via commands like <code>/summon <mob> ~ ~ ~ {Invulnerable:1,}</code>, and I'm pretty sure 4J Studios will never add commands into Console edition in the future.


Is there a close relative to citrus trees, which can grow in the northeast US?

Question: I am interested in knowing what is a known close relative to citrus, that is known to grow in the northeast US, such as western New York. Does anyone have any recommendations?
Comment: I'm guessing from your choice of tags that you intend to graft them/use them as a rootstock. Note that cold will still affect the scions, if you choose a sweet-fruited citrus scion.
Comment: correct 1 to see if I can 2 for the novelty of having such a tree in the yard.
Answer: The coldest area in western New York gets down to about -25° Fahrenheit, so no true citrus will survive. The closest you'll get is Trifoliate Orange, Poncirus trifoliata. This plant can inter-graft and hybridize with Citrus species, but is inedibly bitter. It is an extremely thorny plant. It's leaves are compound and deciduous. It is hardy to -22° Fahrenheit. They can get up to about 25 feet tall in warmer areas, up to 8-10 feet in the coldest parts of it's range.
Comment: Next question is when I get a root stock which way to graft is recommended? I'm not certain to how the graft should be done on this root stock.


ethers.js library version to use to learn Ethereum development

Question: Which version of the Ethers.js library, either v5 or v6, is recommended for me to learn and work with? I'm seeking advice on which version would be more beneficial for my current needs and future projects. Any insights or recommendations would be greatly appreciated.
Comment: Neither. I would recommend using [Viem](https://viem.sh/) instead.
Answer: For learning ethers.js, it would be better to learn the latest version, v6 currently.
v6 allows you to also learn built-in ES2020 BigInt.

One of the biggest changes in v6 is that the BigNumber class has been replaced with the built-in ES2020 BigInt offered by modern JavaScript environments.

Because v5 didn't use the built-in BigInt, it ended up using a library, where the chances of bugs are higher, such as https://github.com/ethers-io/ethers.js/issues/3017
Comment: I fully concur, but for the purposes of readers who find this in the future, I'll add that in general I would recommend always using the latest version unless there's a specific reason not too
Comment: @TheRenaissance Agree. Readers should also know that older versions are unlikely to get any more updates or bug fixes, if any.


How do I add a permission for write and read access and not remove the folder?

Question: I have Ubuntu 14.04 installed. I want to secure my folder. How can I add permissions to allow for write and read access and not removed the folder?
Comment: You might want to use Google Translate. I'm not really sure what you're asking.
Answer: Write and removed permission in the linux system is same . If you set your folder permissions to writable , it can be removed . To secure your folder from everyone , I suggest you to type this command :
Example folder is /home/drajat :

chmod 700 -R /home/drajat

If you want to set your folder only read for everyone type this command :

chmod 744 -R /home/drajat

Info :
number 7 = its code to sent the system to make my folder is accessible(read only) , writable, and executable only for the owner(you) .
number 4 = its code to make your folder read for everyone , but they can write/removed and executable all file in your folder.
number 0 = its code to make every user and group in your system can't access , read and executable your folder .
Answer: Why are you concerned with the removal of the folder?
Removing of a folder can only happen when it's empty. And when you give write access inside the folder, all files can be removed.
If you want a folder available at all times, you can make a script to recreate it, if it was deleted.
<code> [ ! -d *folder* ] && mkdir *folder*
</code>


What are the roles of the two Houses of Parliament in the UK?

Question: Why does the UK have two Houses of Parliament - the House of Commons and the House of Lords - and what are the main roles of each?
Answer: The two-House system used in the UK Parliament is designed to allow both the common people (in the Commons) to have their say on matters through Parliamentary representation, and for the decisions made to be reviewed by peers (in the Lords). In this way the two-chamber system acts as a check and balance for both Houses.
Common Features
Most Bills can be introduced to either House, and most Bills pass through both Houses (sometimes more than once, should the Houses disagree on the Bill) before they go on to gain Royal Assent. Either House can propose amendments to a Bill.
The Commons
Members of the House of Commons are publicly elected by way of General or By-Elections and their role is to represent the people of their constituency.
Members of the Commons (MPs) debate political issues and proposals for new laws. It is one of the key places where government ministers, like the Prime Minister and the Chancellor of the Exchequer, and the principal figures of the main political parties, work.
The Commons alone is responsible for making decisions on financial Bills, such as proposed new taxes. The Lords can consider these Bills but cannot block or amend them.
The Lords
Members of the House of Lords are mostly appointed. They include experts in many fields which are generally used to determine the feasibility of a Bill before them.
The House of Lords complements the work of the House of Commons. It makes laws, holds government to account and investigates policy issues.
The Lords used to have a veto to stop legislation from the Commons gaining Royal Assent. This was reduced by the Parliament Acts to the ability to delay a Bill by up to a year, although there are some types of Bills to which the Parliament Acts do not apply:

Bills prolonging the length of a Parliament beyond five years
Private Bills
Bills sent up to the Lords less than a month before the end of a session
Bills which start in the Lords

This enables the Commons to "force through" a Bill which has stalled by disagreements between the Houses.
There are three types of Lords:

Life Peers
Appointed for their lifetime only, these Lords' titles are not passed on to their children. The Queen formally appoints life Peers on the advice and recommendation of the Prime Minister.

Archbishops and bishops
A limited number of 26 Church of England archbishops and bishops sit in the House, passing their membership on to the next most senior bishop when they retire. The Archbishops of Canterbury and York traditionally get life peerages on retirement.

Elected hereditary Peers
The right of hereditary Peers to sit and vote in the House of Lords was ended in 1999 by the House of Lords Act but 92 Members were elected internally to remain until the next stage of the Lords reform process.

References
Various pages from the UK Parliament website
Comment: @UKB A few points - Lords can block Bills of certain types, my update addresses this more completely. Bye- was incorrect, but so is Bi-, it's actually By- (http://www.parliament.uk/mps-lords-and-offices/offices/commons/hcio/by-elections/). Bills *can* be introduced by the Lords (http://services.parliament.uk/bills/public.html - those tagged with [HL]). As for being deposed, I'm sure it would entirely depend on whether the people generally agreed with her! :)
Comment: @JonathanReez: It [already did](https://en.wikipedia.org/wiki/Rump_Parliament), on 7 February 1649 during the English Civil War era. The House of Lords was [restored](https://en.wikipedia.org/wiki/Restoration_(England)) in 1660, along with the monarchy.
Comment: Lords cannot block bills, only amend or delay them. If one house makes revisions it must be sent to the other to approve it or make further revisions until both houses agree on the final document. Bi (not Bye) elections are only held when an MP becomes unable to perform his/her duties. Otherwise it is a a general election when the entire country elects their MPs. The house of lords rarely (I don't think it can) introduces bills, that is done solely by the house of commons.
Comment: Royal assent is simply ceremonial. The queen theoretically has the power to block it but she would be deposed and as such she does not truly have this power. Principal figures of political parties - not nessisarily. They can sit in lords too. It is generally the leader of the party and the cabinet (or shadow cabinet for the opposition) chosen by the leader of the party that sit in commons. Other senior people in the party such as the chairman may sit in either house and they have whips etc. for the house of lords too.
Comment: Feel free to edit :) I meant to comment that it was only a first draft
Comment: Well, she would be essentially deposing of democracy and it would mean the houses had no true power. As for bills introduced by lords & Bi-, my mistake.
Comment: Worth mentioning: Life peers are divided between members of political parties (usually older and semi-retired from frontline politics); and so-called "crossbenchers" with no party affiliation, who include scientists, lawyers, and others with professional expertise.
Comment: Could the Parliament (in theory) pass a law that would completely eliminate the House of Lords?
Comment: The opening line, "to allow [...] the common people (in the [House of] Commons" implies that the House of Commons is so named because it's for 'the common people' (with all the pejorative connotations of that). I want to note that in Canada the House of Commons' official name in French is the *Chambre des communes*, which gives some suggestion as to a better translation/description of the House of Commons: it's not the House of "the common people" but, rather, the House of the *Communities*.


4-Way light system controled by just one dimmer

Question: On a 4-way light system can just one of the 3-way or 4-way switches be replaced with a 3-way or 4-way dimmer switch to dim the lights that will maintain the setting of dimness when the other switches are turned on? Just one master dimmer that maintains its setting regardless of which switch turn on the lights.
Answer: For standard switches, that is true.  Only one of the switches can be a dimmer (it needs to be a 3-way type) and the other switches are conventional on/off 3- way and 4-way switches. Each of the non-dimming switches turn the lights on at the level set by the dimmer switch. But to change level, you need to go to the dimmer.
There are more sophisticated systems that use a master and slaves. In these systems, each switch can turn on and off the lights at a preset level, or they can override that setting and each control brightness. These switches need to be a matched set, require neutral wires as well as hot, and cost a good bit more than conventional.


Which side should I place a TO-220 transistor on a heat sink?

Question:
On TO-220 heat sinks, there are usually two sides, on which the transistor fits easily. One side is more narrow, surrounding the transistor. The other side is more open. Which of these sides is thermodynamically best option to put transistor on?
Comment: The one on the right, you put your flat side against the board/mounting surface. The fins go in the air so I guess you would say you put the transistor on the "narrow side".

As for the other, my hunch is also the narrow side but I've never used one like that so others will need to chime in.
Comment: The one on the left will fit a number of devices, it's up to you how you fit it to the one you use. It will make little difference. If your pushing the edge of the devices thermal ratings I would go take a measurement. What ever you do. Make sure the tab is flat against the heatsink. I have seen 2 devices mounted together back to back but I would only do that if I needed thermal coupling.
Answer: The second one is often screwed flat on a PCB, with the transistor's legs at 90 degree angles, and then of course you put the transistor on the narrow side.
But otherwise it doesn't matter. The heatsink will receive its heat at the same place and the fins don't really care whether the heat entered from the left or the right.
Comment: Even when the second case is not screwed flat to the PCB, it's preferential to use the narrow side for the slight space savings.


TIN-Interpolation doesn't fit coordinates

Question: I am working on a project for the university and have to use TIN-Interpolation to analyse the raster. I have the issue that the raster doesn't fit to the points. I found a post that recommend to covert them into vector points but that also doesn't work out. Does someone have a tip what could cause this problem?
Comment: Thanks for you answer! Yes that's right, the Gray octagon is the output of the red dots with the TIN interpolation function. I also used the red dots layer as expansion Layer. The reference system is 5650. A reference System for Bavaria, Germany. I didn't found a scale option in the TIN function. When i select the red dots as expansion layer he sets the size automatically. I saw videos on youtube where this works perfect. But i get this strange result. I would guess that there is something wrong with the basic settings but i checked everything i could found in the internet so far.
Comment: Hi Philip, and welcome to Gis.Stackexchange!
Comment: Could you please specify if the gray octagon is the output raster of the interpolation process from the red dots? If so, there is a scale problem (I would estimate a 2x scale factor).
Could you also share some details about the reference system (CRS) of the point vector and of the output raster?
Answer: Check CRS coherence
This sounds like a CRS mismatch problem.
Probably your input dataset (the point vector file) has a CRS (EPGS:5650) while your project has a different one.
Start out by making sure they are both on the same CRS:

Edit the CRS of the project:
Menu Project->Properties, select CRS, set it to EPGS:5650

Check/Set the layer's CRS:
Right click on the layer's name ->Layer CRS->Set Layer CRS..., then choose the same CRS (for example EPGS:5650)

Only then use the interpolator, taking care to set a proper pixel size:

and hopefully the output raster will be aligned with the input points layer.
Comment: I controlled it but it didn't work. So i tried something else. I was working on a mac using qgis 3.22. Now i installed version 3.16. and here its working fine even in an old file. So i guess there is something wrong with the mac Version. Thanks a lot for you help!


paypal not showing on woocommerce payments

Question:
Had install a fresh wordpress installation on localhost, and after install woocommerce plugin, the paypal default - payment isnt there on woocommerce tab "payments".  On the live website paypal continues working just fine.  Do I need a plugin now, anyone knows something about it
Comment: It should be enabled as long as [your store's currency is supported by PayPal](https://developer.paypal.com/docs/reports/reference/paypal-supported-currencies/). If that's not it there's probably somewhere it's enabled or disabled in the admin site.
Comment: I have € (euro) as currency. I cant find anyone with this error as well. Im trying to find now where at database we can see the payment methods active. maybe I can change that over there
Answer: Paypal standard is now hidden for new installs, possible to read about it in https://developer.woocommerce.com/2021/07/12/developer-advisory-paypal-standard-will-be-hidden-on-new-installs/
for those who want to use it copy paste this code on functions.php
<code>add_filter( 'woocommerce_should_load_paypal_standard', '__return_true' );
</code>
Since july 2021 woocommerce recommends users to use the recommended PayPal extension instead


Can a Hindu go to paradise on Judgement Day?

Question: Let's say that a Hindu has done a lot of good deeds, and barely any bad deeds after the ages of puberty, has he a chance of attaining paradise? (The hindu in particular has not committed any kufr, but has committed shirk.)
Comment: Does this answer your question? [If a non-Muslim is a great person, He fulfills everyone rights so still will he go to hell after dying as he is a non-Muslim?](https://islam.stackexchange.com/questions/50885/if-a-non-muslim-is-a-great-person-he-fulfills-everyone-rights-so-still-will-he) also see [Can a Hindu enter jannah?](https://islam.stackexchange.com/questions/53704/)
Answer: There is tradition in Islam that a quarter of a million prophets were sent to all the peoples of mankind before the final revelation of the Prophet (pbuh).
According to Zamakshari (12th century AD) the Qu'ran bears witness to the transcendental unity of all the revealed religions based upon the belief upon on One God, despite the differences between them 'in statutes and practises enjoined for the benefit of the various communities in accordance with their condition.'

There are, however, many believers within the community of Islam, as in other communities, who appear to derive profound satisfaction from the notion that they alone are on the right track and everyone else is astray. The conviction that theirs is the only true Faith, nourished by the human tendency to exclusiveness, finds support in the fact that the different religions must neccessarily have firm outlines if they are to be clearly to be distinguished.

I might add, this 'tendency to exclusiveness' is reflected also in the way that many men, believe that ideas and words are solely their possession and not to be shared; even when the words themselves, like words must, be shared; and likewise with ideas; this only goes to prove Eaton's argument that man is a possessive and grasping creature.
Given Eaton's argument and my own above, a Hindu, in their own way, may attain Jannat for Allah knows best.
One additional point here that ought to be taken into account is that the term 'Hindu' is a constructed term and not organic to India. For according to Bhimrao Ambedkar, the Dalit lawyer, convert to Buddhism and who helped draw up the constitution of India has said:

The first and foremost thing that must be recognised is that Hindu society is a myth. The name Hindu is itself a foreign name. It was given by the Mohommedans [sic] to the natives living east of the river Indus for the purposes of distinguishing themselves.

As Muslims we can see here directly what he means, since as Muslims we can see that  'Mohommedans' itself is not a native term to Islam. We call ourselves Muslims and not Mohommedans. The latter term was constructed by Christians modelled on how they named their own religion after its founder. Likewise, too, with Hindu and Hinduism ...
Finally, there is Gil Eaton says in his book, Islam and the Destiny of Man:

According to the great mujahid, the Emir Abdu'l-Qadir, 'our God and the God of all the communities opposed to ours are in truth One God ... despite the variety of His Manifestations ... He has manifested Himself to Muhammed's people beyond every form whilst manifesting himself in every form ... To Christians He has manifested Himself in the form of Christ ... and to the worshippers of whatever form it may be ... in the very form of this thing; for no worshipper of a finite object worships it for its own sake. What he worships is the epiphany in this form of the attributes of the true God ... Yet that which all the worshippers worship is one and the same. Their error consists only in the act of determining it in a limitative manner.

He quotes this from Mawqif 236 in the Mawaqif of Abdu'l Qadir (tr. by Chodkiewicz and published by Editions du Seuil, Paris, 1982). He goes on to say:

Abdu'l Qadir fought the Christians who invaded his land, Algeria because he was a Muslim. Exiled to Damascus, he protected the Christians against massacre by taking them into his own home because he understood. Those who would challenge him or accuse him of heresy should be prepared to face his sword and accept death from its blade since small men risk their necks when they challenge great ones.


vm fusion only allows 40gb drive for windows7, can I create another drive?

Question: When installing windows 7 on my mac book pro using VMware fusion fusion, it says I can set a 40gb maximum size for the virtual machine drive image.
Can I create another drive and link it to the vm, and change other settings such as memory allocation later?
Answer: If you have yet to complete the installation and are at the window where it shows the Virtual Machine Summary with the specifications you have listed, you should be able to change the VM disk size and allocated RAM by clicking the Customize Settings button.
Once clicked, you'll first need to choose a location for the new virtual machine, which defaults to the ~/Documents/Virtual Machines folder. After that, you can change all kinds of settings including disk size and RAM.


Does the Azure CLI use the Azure Rest API

Question: Does the Azure CLI SDK use the Azure Rest API internally? And if so any further details on how these relate to each other internally would be great.
Comment: This is off-topic, as it's really about documentation, and it's not a programming question. If you visit the CLI's github page, you can see every single API call being made. FYI any tool working against Azure is using the API (CLI, PowerShell, portal, etc).
Comment: you cannot really do anything without talking to the api. so the question is pretty pointless ;)
Answer: Yes, you are right. Azure CLI uses Azure Rest APi.
If you use --debug, you will find the API the command use. For example:
az vm list --debug

Yes, as Johan said, Azure Power Shell/CLI, SDK all call Azure Rest API. If you use debug mode, you could see the API. More information about Azure Rest API, you could check this link.
Comment: @DavidMakogon, why? I don't underestand your comment. I had the very same question, after landing here I learned about --debug option that is a big help for me. --debug applies to all recent version of Azure CLI.
Comment: This should really be a comment - the question itself is off-topic. Also, this answer applies specifically to one version of the CLI.
Answer: Each service in Azure exposes a set of APIs. For managing/creating/updating your resources (e.g. creating a Virtual Machine), these are REST calls. Note: Other services may use non-HTTP/REST APIs (e.g. AMQP for Azure Service Bus).
While you can use your favorite HTTP networking stack or utility (e.g. curl, postman etc.) to make HTTP/REST calls, Microsoft publishes a set of SDKs to make things easier to develop applicationsin various languages.
The Azure CLI happens to be implemented in python, and thus makes use of the Azure Python SDKs to get its work done.
There is no separate Azure CLI SDK, however.


Why does Lord Krishna wear peacock feather on His head?

Question:
Why does Lord Krishna wear peacock feather on His head?
What is the significance of playing Basuri/Flute by Lord Krishna?
Is there any reference that took place that made Lord Krishna to wear peacock feather on His head and Flute in His hand respectively?
Comment: Flute symbolizes the ultimate servant. The flute does absolutely nothing. it just allows the Lord to blow the wind through it, thereby producing music. Similarly the example of the flute is that we as human beings should allow the Lord to speak through us, to walk through us, the act through us, to think through us. Then a beautiful music of Sri Krishna will be produced by Him. All the best!!
Comment: The plume on Shri Krishna's crown is a mirror to many hard core realities exemplified through the feather. We all know that peacock is known for its beautiful multi-colored feathers. These feathers were used in decorative forms by the rural people in old days. Shri Krishna wore it to make it popular and at the same time to be accepted by the common masses.
Answer: The flute is symbolic of the spine which has apertures. On activation of all the chakras, the vayu blows through this spine in the sukshma sharira and enables the tapasvi to do sattvic karmas and other high class siddhis. Swami Sivananda had written that on reaching closer to the inner divine a tapasvi hears the sound of the flute and bell inside his head. (not like a hallucination).
Peacock feathers have crystals which enhance the powers of the pineal gland which too have similar crystals. The colours of the peacock feather are the same as that of the sun seen in NASA photos, and the surya bija mantra '"Om Hraam Hreem Hraum Sah Suryay Namah" activates shaktis as described in Ram and Krushna Leelas. Peacock is also vahan of Kartikeya who is metaphorical 'son' of Siva, or the divine powers produced by meditation on Siva.
Comment: That's great, thx for posting this comment !
Answer: It signifies Lord's askalitha brahmacharitva (means perfect/eternal celibate).
Lord wears it to signify that his a ajanma brahmachari/nitya brahmachari. It is proven when Lord revives the foetus of the womb of uttara.(who is none other than maharaja parikshit son of abhimanyu).
Peacock is the only species which doesn't reproduce through the samyoga of male and female reproductory organs, the peahen collects tears of peacock(which contain reproduction cells) and lay eggs.
If we dwell deep in to it, we can understand the eternal relationship of Lord with Gopis and his 16108 wives.
Comment: You should cite sources.
Comment: Its wrong assumption what others say. https://www.quora.com/Epics-of-India-Is-it-true-that-peacocks-dont-mate-physically
Comment: @KIRAN KUMAR please read this https://sciencing.com/peacocks-mate-4565678.html
Answer: Excerpts from talks by Sri Sri Ravi Shankar:

...Why does Krishna have the peacock feather on his head? A king is
  responsible for the whole society and that responsibility can become a
  burden, which sits on the head as the crown. But Krishna fulfills all
  his responsibility effortlessly, like a game. A mother never feels
  taking care of her children is a burden. Similarly, Krishna wears his
  responsibility lightly and plays his roles colorfully, just like the
  peacock feather on his crown.

http://srisriravishankar.org/the-deeper-meaning-of-janamashtami/

...In the presence of pure bliss, joy, all complaints vanish and life
  appears like a play. One can look at every trouble as a challenge or
  can spend it crying and complaining. You know, what you have in your
  hand indicates what you are inside. If you have a gun in your hand, it
  indicates fear or violence. If you have a flower in your hand, it
  indicates you are like a flower. If you have a flute in your hand, you
  are like a flute — hollow and empty.

http://talksbysrisriravishankar.blogspot.in/2013/04/the-philosophy-of-joy-talk-by-sri-sri.html


Exporting weight and bone elements to a text file

Question: I am sure this is a very simple thing to do. But because of my inexperience, I am having trouble with it. I havent gotten much from reading the blender python api. The answer was probably right in my face, but I just didnt know what to do. I just want to know how to make a script that exports weight values to a text file. As well as bone elements - like the rotation matrix (3x3 mat) the children of the bone and the offset of the bone. Oh and also the vertexGroups (like the vertices that each bone influences).
Comment: And if there is another 3d modelling software that can do this (without the use of scripting), you can suggest it to me. But i would rather stick to blender at the moment. I am to deep to abandon it. Plus recommending another 3d modelling software on a blender website would be quite disrespectful
Answer: While the answer is in Blender's API docs, the relationships aren't clearly spelt out so you need to "get" some of the relationships to know how it fits together.
An armature can get confusing, there are EditBones that define the armature that you see in edit mode. Then you have PoseBones that are used when posing the bones in an animation.
You access EditBones through bpy.data.armatures['Armature'].edit_bones or while the armature is in edit mode with object.data.edit_bones, while you will find PoseBones in object.pose.bones.
While an EditBone does have a matrix property that combines the location and rotation of the bone, it relies mostly on the head, tail and roll properties of each bone and doesn't keep any rotation properties. The PoseBones use the head as the origin and then the rotation_mode to determine whether the rotation_euler, rotation_axis_angle or the rotation_quaternion property is used.
Both EditBones and PoseBones have a children property to list any children the bone may have.
An object has a list of it's vertex_groups and each vertex group has an index number.
A mesh object's data includes a list of it's vertices and each of these vertices has a groups property that lists the groups that the vertex is associated with. This list contains the group index (which matches the vertex group index above) and the weight used for each group. The group weight is the same value you edit using weight painting.
When an armature deforms a mesh it finds vertices that use a group with the same name as the bone and uses the weight to define how much to influence the vertex.
So while looping through the armature bones, using the bone name you can get the vertex group index for the bone, then get the vertices it influences.
import bpy

arm = bpy.data.objects['Armature']
obj = bpy.data.objects['Cube']

obj_verts = obj.data.vertices
obj_group_names = [g.name for g in obj.vertex_groups]

for bone in arm.pose.bones:
    if bone.name not in obj_group_names:
        continue

    gidx = obj.vertex_groups[bone.name].index

    bone_verts = [v for v in obj_verts if gidx in [g.group for g in v.groups]]

    for v in bone_verts:
        w = v.groups[gidx].weight
        print('Vertex',v.index,'has a weight of',w,'for bone',bone.name)

Comment: A simple reverse of the loops as above would get similar times. While there are other things you can do that can change performance, you would expect extra memory use from generating all the data before you start exporting. This way can export the data as it finds it.
Comment: A question: is it more efficient to look for bone's vertices for each bone (like in your code here) or to loop for all vertices and check if each vertex correspond to one of the wanted bones names (or indexes)?
Comment: This is the same person who asked the question btw. How does one export the bone data as well. Like the offset, children, and rotation matrix.
Comment: The for loop is going through each bone, you can find the names of all the [properties here](https://docs.blender.org/api/blender_python_api_current/bpy.types.PoseBone.html). Add steps to export each bone data to the loop.
Answer: The sambler's answer worked to me, but I had to add a condition in the loop:
 for v in bone_verts:
    for g in v.groups:
       if g.group == gidx:
          w = g.weight
          print('Vertex',v.index,'has a weight of',w,'for bone',bone.name)

Because when you access to the items of v.groups, the indices are not the same as the gidx indices. The indices gidx are the indices bones without taking into account those bones that do not affect any vertex and the indices of v.groups start from 0 to 6-9 at most, the items of v.groups are the bones that affect to this vertex v. You go through the items of v.groups searching for the item that has the same index group (accessing for example through v.groups[0].groups to get the value of gidx)


Is this a fallacy: "You only X because you Y"

Question:
You only X because you Y. (with Y being true!)

Example:
Paul only defends the drug decriminalization because he has never been aggressed by a drug addict.
Is this a fallacy? If not, how can we refute it during a debate?
Comment: The example is a little vague but C.S. Lewis would call this "bulverism"
Answer: This question highlights an important point --that identifying a specific fallacy is really only important in as much as it helps craft a response. With that said, I would see this as both an ad hominem attack against Paul (he doesn't have such-and-such an experience, therefore his argument must be bad) and as an appeal to authority (the arguments of those who have had this experience must be correct).
It's important to realize that the attacks against you would not be fallacies in two specific cases --if you really have no other argument in favor of your position than just your positive personal experiences (then the argument against you is correct, not fallacious) or if the person who had the negative experience really is the correct authority AND would disagree with you (for instance, if it could be shown that having that negative experience is a common or reasonably expected result of your position).  Thus, your defense lies in debunking those two possibilities:

What do you think would change about what I have just said if I had that experience? (against the ad hominem)
What argument would a person who had that experience make against my position? (against the appeal to authority as directed against your position)
What makes the opinion of a person who has had that experience decisive? (directly against the appeal to authority)
Answer: I think this question has a context specific answer.  For example, you are arguing for decriminalization and state "X only because Y," regardless of the truth value of Y the statement is meant to be derogatory in order to support your claim.  Therefore it could be considered an ad hominem against Paul, or if Paul was to speak to the person you are stating "X only because of Y" to, then it could be considered "poisoning the well."
Regardless of being a fallacy in some cases, this is not good reasoning or logical justification for any argument, and is more along the lines of a debate tactic.
Answer: This seems to be more of an accusation, or suggestion of a hypothesis than a statement of fact.
There are three ways this can be untrue:
"you only X because you Y"
eg "you only rap because you're young".
can be false if ..
1) You're not young and yet you rap
2) There's no demonstrable link between rapping and being young
3) The word "Only" - You might rap, but it could be for other reasons - this overlaps with 2)  a bit though.
Note that the statement could be true if I don't rap. If I'm not young, then perhaps I don't rap, and that could be the reason why. [Actually: it's because I'm rubbish at it & prefer singing lol]
In everyday terms, accusations like this are used to establish a connection which raises questionable morals, such as a politician only voting for a particular act because they stand to profit. So they might refute this with:
1) I didn't vote that way.
2) I am objective enough to vote for the greater good without letting my own preferences get in the way. In this case, they aligned to the same thing, but may not next time.
3) I voted that way because I stand to make a profit, AND my wife told me to.


Arduino-like system-on-chip?

Question: Arduino is a microcontroller, so it won't help if you need complex tasks potentially involving standard hardware, like reading from an sd-card, or accessing ethernet/wifi. Is there a system-on-chip with the same amount of openness/documentation available ?
Comment: Arduino is a *development board*.  AVR is a microcontroller.
Comment: Borini, the AVR is the biggest black chip with the most pins, on your Arduino. Or to use a bad car analogy, Arduino is a car, with an AVR engine from the Atmel company.
Comment: @Nick : what's the difference ? Sorry, I'm a newb ;)
Comment: Many hardware options : [products for .NET Micro Framework ](http://www.helloapps.com/MF/HW/)
Answer: Well, an Ardunio can access ethernet and can read from an SD card.
That being said check out the BeagleBoard for a more powerful development board.  The current version doesn't have ethernet on board but works fine with several USB ethernet/wifi adapters, the new beagleboard-xM has ethernet on board.  They are both cortex-A8 based boards, with the xM being a bit faster and having more ram (600mhz vs 1ghz and 256MB vs 512MB).  Theres are also some other differences.  Both run linux among other operating system choices.
Comment: i don't use ardunios but a quick google turned up a FAT16/32 library: http://code.google.com/p/sdfatlib/
Comment: @Stefano - "Filesystem support" is a very high level concept.  You can interface with filesystems using nearly any microcontroller with enough memory to contain a library (Like Mark's link), but it lacks two key features which you'll want for heavy filesystem stuff: Direct Media Access[DMA] and a Memory Management Unit[MMU].  You can't point execution at a file on your SD card and have the AVR run it without first copying it into RAM on the AVR, but on a micro with DMA and an MMU you can tell it how to fetch the next instruction.
Comment: Two questions: 1) arduino can access sd cards, but I guess there's no filesystem support, am I right? 2) How does BeagleBoard compare with another similar object, Gumstix ? http://www.gumstix.com/
Comment: as for the gumstix, the overo series uses the same SoC that the beagleboard does, the OMAP 3530.  If the beagleboard has all the peripherals you need i'd go that way (its cheaper), if there is some peripheral you need thats only on one of the gumstix expansions boards, that may be the way to go.
Comment: I think ya mean low level :)
Answer: Arduino is not a microcontroller. Arduino is a piece of hardware which contains a microcontroller, which happens to be an Atmega328 (I believe - not very experienced in Arduino's). They use a simplified language to make it easy for beginners to get into it.
But that doesn't mean you can't read from a SD card. A SD card just has a SPI interface, so not much truoble there if you get it hooked up correctly and find/write a library for it. There are also ethernet and bluetooth modules/editions available for Arduino.
Althuogh shields are available, I think you're going to discover that such small proccesors lack any power for such operatings. Especially when computing >8 bit data it becomes tedious. Beagleboard is a much more expanded board with a very different architecture, and I think something that integrates into hardware it self less easily. The arduino is so simple that it doesn't take that much work to transfer the programmed code into a 'real' embedded environment.
Comment: Actually the "simplified language" is just C++ with yet another preprocessing step and some extra libraries (known as libWiring.a).
Answer: Most microcontrollers are as open as the AVR.  Granted Atmel does a better job than other companies, that doesnt make the others closed, their documents are just not done as well.  As far as that goes you can go with any of the Atmel ARM series and stick with atmel.  The sam7 series for example.  Olimex sells a nice little header board (sparkfun.com).  Also look for the armmite pro while at sparkfun. It is arduino like but arm based.  ARM based, microchip pic, mips, ti msp430, 8051, avr, etc.  All offer similar levels of open documentation.  ARM and the 8051 you are going to find a wider selection of in the sense that many vendors use these cores. (mips is open but not really found in this market other than the pic32)  The pic, msp430, avr are locked to one vendor.  If you want to try boards with sd, ethernet, usb, etc on board you can look at the ti stellaris eval boards, in the $50 to $100 range.
Comment: "Most microcontrollers are as open as the AVR"--which is to say "not at all".  While they have good documentation, that's not what's usually meant when people say "open" nowadays. :P
Comment: +1 for the Stellaris kits. [Here's a link](http://www.luminarymicro.com/products/lm3sxxx_development_kits.html) to their page.
Answer: If you need more power, but want to save your investment in Arduino shields, then take a look at the FEZ Domino.  (Edit: now deprecated, but there are lots of alternatives that also implement the .NET micro framework.
It is an affordable ARM board with the .NET Micro Framework, programmable in C# with Visual Studio Express and compatible with Arduino shields. There is even a simpler and cheaper version called FEZ Mini, but it doesn't take Arduino shields from the box.
Beware that .NET Micro Framework keeps developer a little away from the bare metal and abstracts it sometimes too much. You will hardly have real time analysis and generation of composite TV signal with that like you can have with just AVR, but after all that is not what it's made for.
Btw. There are plenty of Arduino shields for SD and Ethernet/Wifi. Just google around.

Arduino-like system-on-chip?


Can I insert images from file in Photoshop actions

Question: I want to include inserting images into Photoshop action files. Is this possible or do they have to include a stop to do this manually?
Answer: This can easily be accomplished using the "File" > "Place embedded" (or "File" > "Place Linked") commands. No need to stop.
Comment: It does have to be the same image each time though. And if you move or delete the image, the action will break. Also note that this creates a smart object.
Answer: Your question is kinda asking two different things, but if I deciphered it right, what you want can be done.
You can add user interaction to a specific action by checking the "dialog checkbox" I don't know if it has a proper name.

Expand the action in the Actions panel
Find the recorded Place action and click the empty box on the left.

With this the action will stop at the Place dialog and then continue when the dialog is closed, as long as you don't cancel.
Answer: I just had one new idea and sort of works. Start the script by loading the image which need to be placed and load them into a stack using the script for that. Save this image to you location and uncheck all layers but 1. Then place this image in you file and by using shortcuts edit the placed image and uncheck and check a lower layer in the file. For me this worked.
Though when each different image needs to have a different location, that a tough one.


Wide rims for rim brakes for gravel bike?

Question: I have a decent gravel bike that I put together from parts. It has cantilever rim brakes and 40c tires. The wheelset is an old Mavic Open road one which has narrow rims. I'd like to switch to a wider wheelset with rims at least 23 mm internal width, but keep the rim brakes. It seems like these must be available as 29er for older mountain bikes, but I'm having trouble finding anything. Can I buy an off-the-shelf set, or should I expect to have to have something built up?
Comment: Cyclocross bikes with cantilever brakes were still used not such a long time ago. Definitely more recently, than V-Brake MTBs. 29ers became popular only after V-brakes became unpopular. But 23 mm internally seems a lot. I am riding 19 mm internal on my gravel bike and it was originally sold with those. I am using 38c tubeless just fine.
Comment: Great points Vladimir. If I search on "cyclocross wheelset with rim brakes" I find some good choices such as Ritchey Zeta Comp (23 mm ext), and Hunt (19 mm int, 24 ext).
Answer: There are a handful of good options. A lot of what's out there in this category is heavy and more for hybrids, 29ers, and touring bikes. A 23mm internal width rim with a brake track basically means a 29er rim, and finding something not excessively heavy might be challenging. The HED Belgium R comes to mind as around the widest rim brake road rim I know of.
Canti cross bikes are limited for how wide the rims can be before the brake setup gets weird.  Typically the first thing to go wrong when you push this too far is you won't be able to get the face of the pad to contact the rim squarely. This depends on the post spacing of your frame/fork as well as the brakes chosen. Some cross bikes are more big-tire oriented than others and won't run into issues as easily. True cross race bikes with cantis typically won't play nice with something much wider than about 23mm external, but they also can't typically take a 40mm tire, so maybe you'll be in luck. There are some cross-oriented pads such as Kool Stop Thinlines that exist in part to mitigate these issues as best as possible. Brakes of the "no vertical adjustment" flavor such as the TRP Eurox are the most sensitive to this.
If the goal is to go as wide as possible, one approach you could take is simulate the brake setup with a rider rim by clipping or taping something on to the rim temporarily to bulk them up and see how wide of a rim your brakes can tolerate.
Comment: Thanks, I will check as you suggest. BTW the frame is an inexpensive aluminum one intended for gravel. I'm running 40c, and there's room for bigger tires, maybe up to 45c.


Set group owner to individual or another group?

Question: I am working on creating an intranet for a company where I have each project be a group and inside that group there are smaller groups that are more specific. The project group is owned by a project lead group that will also have control over the project subsite. My question is who should own the project lead group, another group that is composed of all the project leads or have the actual project lead be the owner?
Answer: If you use a Group it will be easier to add more users as well as remove users.
So I would prefer to use Group instead of a single user.
For example, Member group owner can be set to Owners group.
Comment: When does the hierarchy eventually end? It seems like there should always be a group owning another group, who will own the top most group then?
Comment: You can use Site Collection Administrator. Also I believe Top most site will have a Site Owners Group, you can also use that
Comment: Ahh that makes sense.


What is the difference between HttpHandler and a Web User Control and when to use each one?

Question: I've been using user controls extensively but never use a HttpHandler and was wondering if I am doing something suboptimal or wrong
Answer: Unfortunately your question is a little like "Should I use a sandwich or a cement mixer".  HttpHandlers and User controls are completely different things.
HttpHandlers are used to process HTTP requests.  For example, if you wanted to dynamically create an RSS feed, you could write an HTTP handler that handles all requests for ".rss" files, creates the output and sends it back to the user.
User controls are used within ASPX pages to encapsulate units of functionality that you want to re-use accross many pages.
Chances are, if you're using user controls successfully, you don't want to use HttpHandlers!
Answer: Basically a user control is a piece of server logic and UI. An HTTP Handler is only a piece of logic that is executed when a resource on your server is requested. For example you may decide to handle requests for images sent to your server through your own handler and serve images from a database instead of the file system. However, in this case there's no interface that the user sees and when he visits a URL on your server he would get the response you constructed in your own handler. Handlers are usually done for specific extensions and HTTP request types (POST, GET). Here's some more info on MSDN: http://msdn.microsoft.com/en-us/library/ms227675(VS.80).aspx
Answer: Even an Asp.Net page is an HttpHandler.
public class Page : TemplateControl, IHttpHandler

A user control actually resides within the asp.net aspx page.
Answer: Expect a better answer (probably before I finish typing this) but as a quick summary.
A user control is something that can be added to a page.
A HttpHandler can be used instead of a page.
Answer: Just to clarify the question. I was reading the Hanselman post
http://www.hanselman.com/blog/CompositingTwoImagesIntoOneFromTheASPNETServerSide.aspx
and thinking that I would never solved the problem with a HttpHandler, maybe with a simple page returning a binary content.
This led me to think that I should add HttpHandler to my developer tool belt.


Why can't chocolate be made caffeine free?

Question: I recently read this article which suggests that it's impossible to make caffeine free chocolate. Why would this be the case? If we can make caffeine free teas and coffees why can't we strip the caffeine out of chocolate too?
Comment: *Is* it possible to make caffeine-free coffee? Decaf generally has less caffeine, but it's nowhere near zero. Tea without caffeine tends to be a different type than tea with caffeine.
Answer: When taken literally, the article you cite is simply wrong. See https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5302282/ -that's scientific proof that decaffeinated cocoa does exist. I have no idea if someone is actually making chocolate bars out of it, but there seems to be no theoretical hurdle for it. There is some remote  possibility that the decaffeination may change the physical qualities of the cocoa powder, or that it is not well suited to other cocoa intermediate products such as cocoa butter, which could make producing a decaffeintated chocolate bar challenging - but even if that's the case, I would expect professional food technologists to be able to work around that.
I won't speculate on why the site supplied incorrect information. My personal opinion is that I don't trust sites that feel comfortable making broad health claims, and the site you cite is very much focused on doing exactly that.
Comment: As a chemist I'd agree that characterization of the extraction as *impossible* is an overstatement. I think the real characterization of the extraction would be to define it as *impractical.*
Answer: In theory the process of extracting caffeine (as in coffee beans) can be applied to cocoa as well.
I think the amount of caffeine is so low with regards to the consumed amounts, so decaf chocolate is probably not economically viable.


Smooth Curves of genus 3

Question: Let $X$ be a smooth projective curve of genus 3 over an algebraically closed field of characteristic 0. How do I show that any curve like this is hyperelliptic or a plane curve of degree 4? Why is $K(X)$ isomorphic to $k(t)[y]$ for $y^{2}=f$ with $f \in k[t]$?
Comment: Under your hypotheses, the Riemann–Roch theorem and the embedding theorem are applicable. If I recall correctly this theorem is a case bash involving the canonical divisor and the aforementioned theorems.
Answer: The canonical divisor has degree $4 = 2g-2$ and $3$ (the genus) linearly independent global sections. If the canonical divisor is very ample, then the imbedding it defines must land on a plane quartic. If not, then  the curve is hyperelliptic. (Recall that a curve is hyperelliptic if and only if the canonical bundle is not very ample.)
The second question is equivalent to asking whether the curve is a double cover of $\mathbb{P}^1$ (or equivalently, that the corresponding field is a degree two extension of $k(t)$), and that's the definition of hyperellipticity.

Smooth Curves of genus 3


Why does Pluto's orbit cross Neptune's orbit?

Question: Why does Pluto's orbit cross Neptune's orbit? Is this a fault in Newton's law of gravitation?
Comment: A crossing of orbits is in perfect agreement with all of Newton's laws.
Comment: Are you asking how it got that way, or why it's "ok" for it to be that way?
Answer: The simple answer to Why does the Pluto's orbit crosses the Neptune's orbit is to just say that's the way it is. For any object orbiting in a central inverse square law field, like the gravitational field of the Sun, the stable orbits are ellipses with the Sun at one focus. The ellipses can be almost circular like the Earth's orbit or wildly eccentric like the orbit of Halley's comet: both are stable orbits in Newtonian gravity. So Pluto could have any elliptical orbit and it would be a perfectly good solution to Newton's laws.
However there is more to it than this. Orbiting objects don't just feel the gravity of the Sun, they also feel the gravitational fields of all the planets and indeed all other massive bodies in the Solar System. In general if you put an object into some randomly chosen orbit that crosses other orbits it will eventually come close enough to one of the massive bodies to interact strongly and be ejected from the Solar System. If you have a play with a gravity simulator (My Solar System is one I like) and add a light body to a system with several planets you'll probably be surprised how unstable most orbits are.
The orbits of the planets we see today are stable because they're the ones that lasted 4.5 billion years, all other orbiting bodies having been ejected. Even so the orbits are less stable than you might think. For example the ellipticity of the Earth's orbit changes continually in a cycle of 96,600 years due to interactions with other planets (mostly Jupiter).
Anyhow, back to Pluto. We can't say why Pluto's orbit has exactly the shape it does. However Pluto's orbit is not randomly chosen - it has a resonance with the orbit of Neptune: for every two orbits that Pluto makes around the Sun, Neptune makes three. Without this resonance it's likely that Pluto would eventually come close enough to Neptune for it's orbit to be wildly perturbed and it could even be ejected from the Solar System. The point is that we can't say why Pluto crosses the orbit of Neptune, but Newton's laws tell us that if it does have a crossing orbit that orbit must be a special one or it wouldn't be stable.
Comment: +1 for the resonance, which is caused by Newton's law of gravitation but was which only explained by Laplace decades later.
Comment: The solar system is _not_ stable, as it demonstrates chaotic behaviour on time-scale of order of ten million years, as indicated by numerical simulations.  In particular, the probability of collision is ~1% before the Sun dies. See [this](http://arxiv.org/abs/1209.5996) for details.
Answer: Pluto's average distance from the Sun is larger than Neptune's but Pluto's orbit has a higher eccentricity – the elliptic orbit is more squeezed, less uniformly circular, and such ellipses simply do intersect each other.

The elliptical orbits with properties first identified by Kepler's laws do follow from Newton's laws of gravity. I stress that the orbits are general ellipses, not necessarily circles.
Answer: Short, no-math answer:
Objects in space can have any orbit they want to have. How long they stay in that orbit depends on what else is out there. Over the past 5+ billion years the various interactions have sorted themselves out and we see what's left.
There's no reason a planet could not be in a retrograde orbit, a perpendicular orbit, or a figure-eight loop between Jupiter and the Sun. I do not expect those orbits would be stable or survivable, so you won't see them during the 0.00001% of the solar system's existence we've been looking at it.
A stable figure-8 perpendicular orbit between a star and it's first gas giant would be really cool though.
Answer: All orbits are ellipses.
Ellipses can be perfect circles, but are always "stretched" to some extent.  The Sun (in this case) will be at one focus of the ellipse.

Thus a very stretched (more elliptical) orbit of one body (e.g. Pluto) can be sometimes be closer to the Sun than a less stretched (more circular), but closer to the sun orbit of another body (e.g. Neptune).


force reload screen on an event of a child component

Question: it is sort of too late to change things so I was wondering if there is a way to do it in my functional components. Basically, I have a main screen with a child component in it:
ScreenHome.js
<code>      <ChildComponent/>
</code>
ChildComponent does something and upon completion of the process, I want to reload the screen. ChildComponent is in all the screens so I need it to to reload the current screen. I have seen:
<code>     this.forceUpdate()
</code>
but I am using functional components only so that can't apply. How would I go reload the page?
Answer: You can define a state in your parent (screen) and pass the setter to your child.
E.g.
<code>const [getForceUpdate, setForceUpdate] = useState(false);

<Parent>
   <Child forceAnUpdate={() => setForceUpdate(!getForceUpdate)}/>
</Parent>
</code>
Call props.forceAnUpdate when your child process is done.
This will trigger a re-render in all your components.


How secure is google chrome's saved passwords?

Question: How secure is Google Chrome's password-saving functionality? I learned that it saves passwords to a file and a database in which all the passwords are encrypted. In particular, I would like to know if Chrome is the only application that can decrypt it, or if any person or application can grab the plaintext password once the encrypted password is stored on the computer.
Comment: How secure is the operating system and hardware on which Google chrome is running?
Answer: Is Chrome is the only application that can decrypt it's saved passwords?
No. There is a least one program that I know of that will display the passwords.
WebBrowserPassView by Nirsoft:

WebBrowserPassView is a password recovery tool that reveals the passwords stored by the following Web browsers: Internet Explorer (Version 4.0 - 11.0), Mozilla Firefox (All Versions), Google Chrome, Safari, and Opera. This tool can be used to recover your lost/forgotten password of any Website, including popular Web sites, like Facebook, Yahoo, Google, and GMail, as long as the password is stored by your Web Browser.

There are probably others.
Answer: The browser's password-saving mechanism is a weak and insecure tool,
for all browsers, although it's perhaps better than nothing.
It's better to use a cloud-based encrypted product that will be completely
secure, even in case of catastrophic failures like losing your hard disk,
and available on more than one device. Such products usually come
in both desktop and browser-extension formats.
One such free product is Bitwarden.
Another is LastPass, a freemium product.
Comment: Why would cloud-based be necessary for improved security?
Comment: Because: 1. You can't lose the passwords even if you lose the browser or the entire disk, 2. They are available on all your devices even your phone, 3. Even if your computer gets hacked, the passwords stay safe, 4. The passwords are encrypted and totally inaccessible except via a password that you keep safe (as in your head).
Comment: I think you're mixing things up here. 3 and 4 are based on encryption and are not because of any cloud storage. 2 is an advantage wrt convenience not security. 1 assumes that cloud storage can never fail which is not correct.
Comment: No mixing: Browsers are not that well encrypted. Cloud is safer than your computer.
Comment: At least Firefox offers the option to share configuration (including passwords) across devices.


Unlock android phone from PC

Question: I need to move some data from my HTC one m8 to a Samsung Galaxy S8. The only problem is that the HTC's touch screen does not work so I cannot unlock it (it's locked with a PIN). I don't have a keyboard adapter for this phones port so I cannot plug a keyboard or mouse into it. I can plug it into my laptop so can I unlock it from there?
Comment: That'll be a bit harder. I don't know which method works, but our [locked-out tag-wiki](/tags/locked-out/info) should be a good starter. Good luck!
Answer: I found a solution after all, you have to keep pressing the volume down button so that the phone does not lock itself and shut the screen off. This gives more time to mash the screen to enter the pin.
The screen barley works but sometimes if I press hard it registers it.
After it was unlocked I again used the volume down button in order to stop the phone locking after a few minutes of inactivity. I then plugged it into my laptop and moved the data from the phone to my desktop.
I could have disabled a pin or disabled auto screen lock in the settings but the screen was just too messed up so certain on screen buttons did not work.
I still need to somehow back up my scribble app notes. The back button in the app does not work and clicking the back button next to the home panel closes the app rather than closing the text editor and going back to the main screen where all my notes are.

Unlock android phone from PC