BBQ for Yom Hatzmaut

Question: What is the source for making barbecues on Yom Haatzmaut?
Comment: Are you seriously looking for a mesoira from previous gedolim for celebrating yom hatzmaut??
Comment: Is this a Purim Torah?
Answer: SimchasTorah pointed to a fascinating comment from Meshech Chochmah (Rabbi Meir Simcha of Dvinsk, c. 100 years ago), let translate the entire quote:

... therefore, the fact that the Jews would [celebrate Passover by] eating flame-roasted lamb would not raise any questions, not even for the wicked son; as it's perfectly appropriate to celebrate a national holiday and make a day of feasting and joy, a day on which they left the slavery of Egypt, gained their freedom, and became a great nation of distinction. But why this requirement to first apply blood to the altar [and the doorposts in Egypt counted as an altar because G-d's presence was felt there] before eating the meat? That makes people ask, "what's this worship of yours?" And you answer -- "this is a Passover sacrifice to G-d"; His presence and glory was revealed to us in Egypt -- that is a lofty spiritual matter that was unheard of in other nations.
Comment: I don't understand...
Answer: The Meshech CHochmah on Bo in the Pargragh starting Ushmartem 11 lines in it says that the proper way to celebrate is to eat roasted meat see it for yourself
http://www.hebrewbooks.org/pdfpager.aspx?req=14061&st=&pgnum=61
Comment: The proper way to celebrate *what*?
Comment: see shalom's answer, where the meshech chochmah is translated: http://judaism.stackexchange.com/a/7138/603
Answer: Adraba! There is no source. It is a natural expression of the inner yearning of Am Yisrael to reestablish our broken relationship with the Ha'Kadosh Baruch Hu with the Avoda of Korbanot in Beit Hamikdash.
Thanking Seth J for his comment below I'd like to clarify my original answer a bit.
It should be clear that BBQs on Yom Ha'atzmaut are not and should not be performed Zecher L'Korban. If done is such a manner it may even create a problem with eating the meat in terms of the prohibition of Bamot.
With that said, the setting of a BBQ is very similar to the setting when bringing and feasting on a Korban Toda. Therefore we could look at this modern day minhag as a (spiritually) natural development. Getting us prepared. The original question was about a source. My answer was that I don't see a need for a source. Even if a source is found it is most likely not what started the minhag. The minhag is already a few decades strong. And ... if you like juicy sizzling meat, it is a great minhag!
Comment: I was going to give you an upvote until the last clause in your second sentence. There are many things that can be symbolized with a BBQ, ranging from the Zeroa' and the Chagigah on the Seder plate (serving as a ZECHER for the Korbanoth) to La"G Ba'Omer bonfires.  But I am uncomfortable upvoting an answer that suggests (perhaps unintentionally) that it is alright to substitute a flame-roasted hamburger for 'Avodath Beith HaMikdash. Would you consider revising your answer?
Comment: @Seth J you're right about the flame-roasted hamburger, but what about flame-roasted spare ribs! ... I updated my answer, maybe it is a bit more clear now. Thanks

BBQ for Yom Hatzmaut


What hackers do in the darknet?

Question: What do hackers do in the darknet? I know that there are some "hacker services" that they can make some money, but I wonder if there are more interesting things, like forums about specific targets. I'm not a hacker or something, but I wonder if there is some way to know about attacks before they will happen.
Comment: Mostly, they do the same sorts of things they do on the clear web, just without worrying about who might see them.  99% of the deep web is actually a pretty boring place.
Comment: there are services that will scan the *dark web* for this type of info, but your title question does not match your body question
Comment: @schroeder Guess that's why it got deleted. Do you remember what was factually incorrect please ? I'd like to correct this(theese) point(s)
Answer: They do anything they want, including but not only:

Sharing hacking tools
Developing hacking tools
Organizing hacking meetings/ info sharing sessions
Organizing large scale attacks
Offering hacking payed services (P2HK - pay2hack)
Creating custom hacking tools on demand (payed service)
Recruiting new hackers

What hackers do in the darknet?


What are the required permissions to Approve a record

Question: I am submitting a record to Approval through Apex code. I want to check if the User has the access to Approve record. Does the User needs to have edit access on that record?
Comment: You first need to understand the business use case before you can create an approval process. Are you using roles? Do you have any code you can show us? Is this a dynamic approval? What "rules" are you using to base the approval on and what triggers it? Is it time based? I recommend you look at Chapter 9 of [Force.com Platform Fundamentals][http://www.salesforce.com/us/developer/docs/fundamentals/index_Left.htm#StartTopic=Content/adg_workflow_approvals.htm?].
Answer: Read permission on the record - Salesforce help article

To respond to an approval request from within
  Salesforce:   Read on the associated record
To respond to an approval
  request from an email:    API Enabled
Answer: Minimum Read permission on object. If you are a admin then you can approve any record. If you have read permission and if approver assigns you as a delegate approver then also you can approve it.


How can I make my character sound Scottish?

Question: Yes, you read the title correctly. It sounds sorta ridiculous, but I'm wondering how I can make my Scottish character in a story of mine sound more Scottish. He's a comedian who can rarely take something seriously, and I was hoping to...um...make his jokes sound more Scottish? Like, I just want to know Scottish slang and jokes.
Comment: Welcome to Writing.SE! Please note we cannot do your research for you. The best we can do is give you some guidance with what to look at and what to avoid. You might find it useful to take a look at our [tour] and [help] pages to understand better how we work.
Comment: why is he scottish? are you trying to simply avoid "uk=london" problem? in which case any bit of countryside will do.
Answer: The way you make a character Scottish (or any other nationality) is you research that nationality. And you don't settle for the "Hollywood Atlas" version either (meaning a collection of exaggerated stereotypes. And that's a tv tropes link). You find out about real Scotland, and ground your character in that.
To find out what various Scottish accents sound like, look for them on Youtube. Note, however, that relying heavily on phonetic spelling of words would make your prose harder to read. You can, instead, mention that the character has a certain accent, or that he pronounces a certain word in a particular way.
Some vocabulary, like 'lad' and 'lass' is more prevalent in Scotland than in other places. You can try googling something like "words more commonly used in Scotland". If, however, your character uses such "vocabulary" words every other sentence, he would appear more like a stereotype than a person. You'd want to use those words sparingly. Also, some vocabulary would be particular not to "Scotland" but to one city or area in Scotland. You'd want to be consistent with where your character is from.
But there is more to coming from a certain place than the accent and the vocabulary. There's the way one does things, and the things one would never do. Where a British character would still be talking about the weather, an Israeli one would already be asking personal questions.
There's culture too, and there are the pop-culture references one is likely to make. For example, where an American character would make a reference to Star Trek, it would fit better for a British character to mention Dr. Who.
The more you know about a place and its culture, the more "local" you can make your character.
Comment: @Thatoneguy Further to these points, if you must include "tells", for the love of God don't [mix in Irish conflations](https://tvtropes.org/pmwiki/pmwiki.php/Main/Scotireland). I almost went off Gabriel Iglesias for that.
Comment: Just make your character subsist on a diet of fish suppers and munchy boxes.  They'll immediately come across as Scottish but with the downside that they'll be dead of a heart attack by age 40.
Comment: @J.G., please cut Gabriel Iglesias some slack. The vast majority of Americans can't even distinguish between UK and Australian dialects, much less between Irish and Scottish. ;)
Comment: @RobJarvis I went on to like the rest of his comedy, of which there's been plenty ever since. It's a shame he doesn't get more voice work, of the kind Robin Williams often did.
Answer: The most important thing to consider is this: why the writing must portray the Scottish accent. Scottish spelling is not the same as English spelling, so English speakers may get confused if the author consistently uses Scottish spellings and words. Scots English is English with a Scottish accent, and this may include code-switching between English and Scottish. If your reader is an English speaker, then looking up every word of Scottish origin gets very annoying. Some authors do sprinkle in foreign words or unusual slang terms for authenticity, but authenticity in writing is limited. If the spoken Scottish is completely irrelevant to the plot, then the author can just focus on the main story and imagine that the character is speaking in Scottish or Scots English. The author just has to mimic Scottish or Scots English in writing, if that is relevant to the plot. For example, if another character misunderstands what the Scottish character says, then the Scottish character may repeat what he says in English or use the usual English equivalent of the term.
Answer: Besides the spelling and specific vocabulary, you could make your character Scottish by making him culturally Scottish. This is not about the way you write his speech, but about the content of what your character says.

Jokes. Make his jokes about Others (e.g. Frenchies, Londoners, Eskimos, etc...) and their habits that Scots may find hilarious. If you don't want to invest too much time in researching that, you could take just any joke that compares two groups of people, or two countries and replace them with Others and Scots for the effect.
Trivia. Make him refer to Scottish facts and trivia which are known to the greater public. For instance the time when Scotland was still an independent country in its own right could be used as a way to say "a long time ago". Or make him refer to the traditional Scottish kilt as a "traditional AC unit". Or anything that is not clear is "denser 'an fog cross the Highlands". Or perhaps the fact that most of Scottish roads are so narrow than you drive in the middle as a way to say that they drive on both the right and left side of the road at the same time.
The trope. As with any good comedian, in his professional life he may exaggerate the Scottish stereotype while on stage, and force himself to be more in the norm in private.
Knowns and unknowns. make him knowledgeable about his background and country. I'd advice you research that. And make him less acquainted about other countries or backgrounds.

Finally, not quite about language, but a general advice.

Habits.  "That's how we do it." Make him a rough gentleman, how that is honest to his word, parsimonious in his speech. Make him know that, and make him justify his being like that because of his culture. That is not because he is one such, but because that is how he was taught while growing up, and probably values these aspects of life more than others. Make him neutral to fashion, or to loving cheese or refined food, but, as an example, make him absolutely taken by the value of returning favors.

Finally #2, for inspiration (I'd use the modern day English version, but keep the meaning of the old sayings): https://scotlandwelcomesyou.com/scottish-sayings/
Comment: NotP, "Make his jokes about Brits and their habits that Scots may find hilarious. " --- Scots _are_ "Brits".
Comment: @NofP - You are confusing the terms Brits and English. Jokes comparing an English man to a Scots man can be heard both sides of the border.
Comment: Thanks for the clarification. While linguistically accurate, I know a very large number of Scots that beg to differ. ;-)  it is in these tiny details that a Scottish Scot stands out compared to a wannabe literary imitation.
Comment: @ChrisRogers ...and?
Answer: I have lived in Scotland and have been married to a Scot from Lanarkshire for the past 34 years, but I'm originally from the USA.
The one thing I would say is be aware that regional accent and vernacular varies a lot in Scotland, and it doesn't take a  huge distance for this to happen.  Fortunately there are lots of examples of current Scottish comedians that you can watch on YouTube.  Kevin Bridges is popular right now.  (He's from Clydebank, which is part of Greater Glasgow.)  Frankie Boyle is another one.  There are many others ...just google Scottish comedy, and go from there.  If you watch these people performing, you'll not only get an idea of what they sound like, but also what their humour is like.  Not every Scots comic is Billy Connolly.  He was a one-off, but so are the others.
Please beware of using archaic stuff or doing too much phonetic 'translation' which is not only hard to read, but rarely comes off well.  The ye's and the kens, etc.  (Although 'ken' is used a lot in Aberdeenshire, and other areas in the eastern part of Scotland ...through Angus, Dundee and into Fife—and to some extent in the Borders as well.)  It's a good idea to read modern Scottish writers to see how they portray their own language in writing.  It's pretty obvious that they don't stray too far from normal English.  Beware of portraying modern Scots as speaking like Robert Burns!
And also be aware that real west highland speech is different from lowland speech in that it is more soft-spoken, quite politely worded most of the time, and more 'correct English.'  Why?  Because it wasn't all that long ago that their first language was Gaelic, and their parents and grandparents often learned  English as a second language. So they learned a slang-free form of it.  Sometimes the word order gives them away, though, and they sometimes will express themselves using a Gaelic viewpoint ...but English words.  Hard to explain, till you see it happening.
Just be careful, educate yourself, try to avoid clichés and stereotypes, and you'll be okay. As in so many things, less is more.


Jboss standalone-full.xml file getting overridden while restart

Question: I have modified the standalone-full.xml while jboss is running. And then I have restarted the jboss instance. My change is not available in the file (standalone-full.xml) after restarting. Seems, previous version (before modification) got restored.
But sometimes, changes are reflecting after restarting.
Its confusing. Any Idea, what is happening while restart?
Comment: Are you sure there is no JBoss management solution which is able to detect configuration changes and override them? I've not used drift detection in JON/RHQ but I'd guess it is possible to revert to old config that way. As the configuration scanning interval might be rather long, sometimes your changes might get detected before restart, sometimes they might not.
Answer:
I have modified the standalone-full.xml while jboss is running.

JBoss actively manages the server configuration, and rewrites the XML based on events that take place during its operation. I am assuming that you made these modifications by editing the XML directly using a text editor. While you can do this with little impact while the server is offline, doing this while the server is running yields unpredictable results, as you have found.
You can definitely make changes to the server's configuration while it is running, but for it to be consistently applied you should use the web management console (http://localhost:8080/console) or the CLI (<code>${JBOSS_HOME}/bin/jboss-cli.sh</code>). Making your changes this way, you can even get feedback on whether your change will require the restart of JBoss.


Set of points where a convex function is not differentiable

Question: The definition I have of a convex function $f: \mathbb{R} \rightarrow \mathbb{R}$ is that for every $x, y \in \mathbb{R}$ and every $\lambda \in [0, 1]$,
$$
f(\lambda x + (1-\lambda )y) \leq \lambda f(x) + (1- \lambda )f(y).$$
It is well known that convex function differentiable a.e. I want to show that dervitive of f is nondecreasing. That points that f is differentiable, difination of convex implies nondecreasing. So, I just need to show that  that set of points that f is not differentiable, jumps up. Then, the $f^{'}$ is nondecreasing. Does one have any idea?
Comment: points are not differentiable, but functions are
Comment: @zhw. : I meant that points that function.is not differentiable.
Answer: Let $x_{-} <x<x_{+}$. We can write $x=\frac{x_{+}-x}{x_{+}-x_{-}}x_{-}+\frac{x-x_{-}}{x_{+}-x_{1}}x_{+}.$
$f(x)=f(\frac{x_{+}-x}{x_{+}-x_{-}}x_{-}+\frac{x-x_{-}}{x_{+}-x_{1}}x_{+})=^{\textrm{convex property}} \leq \frac{x_{+}-x}{x_{+}-x_{-}} f(x_{-})+\frac{x-x_{-}}{x_{+}-x_{1}} f(x_{+})$. Then
$$ \frac{f(x)-f(x_{-})}{x-x_{-}} \leq \frac{f(x_{+})-f(x)}{x_{+}-x}$$
Let $x \rightarrow x_{-}$ and $x \rightarrow x_{+}$. So, $f^{'}(x_{-}) <f^{'}(x_{+}).$


How to prove a L=L(G) without knowing the L?

Question: How does one prove L(G)=L if the language is not given and only the grammar G is given?  If there is no pattern to be seen in the grammar that would create the strings w of a language L, how would you go about doing this?
Comment: It is completely meaningless to prove $L(G) = L$ if you only have $G$. We already know that $L(G) = L$ for some language $L$, namely the language defined by $L = L(G)$. What you are really asking is, given a grammar, how to describe the language it generates in a simpler way. This is a very general question and I'm not sure there is a simple answer.
Comment: @YuvalFilmus I was asked on a test to find a prove some language was generated by a grammar G.  I realized that the grammar G created a language (a+b)* and I need to prove this is true.
Comment: Of course @YuvalFilmus is right. There is no simple answer to this. (In fact equality to $(a+b)^*$ is undecidable for context-free grammars, so how can we expect to determine the language for a grammar.) Yet I think it is a reasonable question that we should not close too soon.
Comment: https://cs.stackexchange.com/q/11315/755
Answer: In cases like this, where you have a grammar and want to guess what the language is, a good way is to approach the problem systematically, by trying to derive some short strings. For example, if you had a grammar $G$ like this,
$$\begin{align}
S &\rightarrow SA \tag{1}\\
S &\rightarrow \epsilon \tag{2}\\
A &\rightarrow aS \tag{3}\\
A &\rightarrow bA \tag{4}\\
A &\rightarrow \epsilon \tag{5}
\end{align}$$
then here are a few derivations, where the relevant production is labeled:
$$\begin{align}
\epsilon&: S \stackrel{2}{\Longrightarrow}\epsilon\\
a&: S \stackrel{1}{\Longrightarrow} SA\stackrel{2}{\Longrightarrow}A\stackrel{3}{\Longrightarrow}aS\stackrel{1}{\Longrightarrow}a\\
b&: S \stackrel{1}{\Longrightarrow} SA\stackrel{2}{\Longrightarrow}A\stackrel{3}{\Longrightarrow}bA\stackrel{4}{\Longrightarrow}b\\
aa&: S \stackrel{1}{\Longrightarrow} SA\stackrel{1}{\Longrightarrow}SAA\stackrel{2}{\Longrightarrow}AA\stackrel{3}{\Longrightarrow}aSA\stackrel{1}{\Longrightarrow}aA\stackrel{3}{\Longrightarrow}aaS\stackrel{2}{\Longrightarrow}aa\\
\end{align}$$
If you try this for, say $ab,ba,bb$, you'll find that they're all in $L$ which prompts a guess that this grammar generates all strings over the alphabet $\{a,b\}$. This isn't too hard to show, by induction on the length of a string in the language.
The proof goes like this:
Base. Show that the length-0 string, $\epsilon\in L(G)$. (We've done this already.)
Induction. Let $w$ be any string of length $n>0$. Our inductive hypothesis is that any shorter string, $z$ is in $L(G)$, i.e., there is a derivation $S\stackrel{*}{\Longrightarrow}z$. Now either $w=za$ or $w=zb$. We'll do one case and leave the rest to you:
$$
S\stackrel{1}{\Longrightarrow}SA\stackrel{3}{\Longrightarrow}SaS\stackrel{2}{\Longrightarrow}Sa\stackrel{*}{\Longrightarrow}za = w
$$
so $w\in L(G)$, as required.
Comment: @chamburger. Glad to be of help. By the way, welcome to the site. If you plan on asking another question, you might want to read [this](http://cs.stackexchange.com/help/accepted-answer).


Is TCP Guaranteed to arrive in order?

Question: If I send two TCP messages, do I need to handle the case where the latter arrives before the former? Or is it guaranteed to arrive in the order I send it? I assume that this is not a Twisted-specific example, because it should conform to the TCP standard, but if anyone familiar with Twisted could provide a Twisted-specific answer for my own peace of mind, that'd be appreciated :-)
Comment: Since TCP has no idea where your messages begin or end, how could it possibly reorder them even if it wanted to?
Answer: As long as the two messages were sent on the same TCP connection, order will be maintained.  If multiple connections are opened between the same pair of processes, you may be in trouble.
Regarding Twisted, or any other asynchronous event system: I expect you'll get the dataReceived messages in the order that bytes are received.  However, if you start pushing work off onto deferred calls, you can, erm... "twist" your control flow beyond recognition.
Answer: TCP is connection-oriented and offers its Clients in-order delivery. Of course this applies to the connection level: individual connections are independent.
You should note that normally we refer to "TCP streams" and "UDP messages".
Whatever Client library you use (e.g. Twisted), the underlying TCP connection is independent of it. TCP will deliver the "protocol messages" in order to your client. By "protocol message" I refer of course to the protocol you use on the TCP layer.
Further note that I/O operation are async in nature and very dependent on system load + also compounding network delays & losses, you cannot rely on message ordering between TCP connections.
Comment: What do you mean by _between_ TCP connections?
Answer: TCP "guarantees" that a receiver will receive the reconstituted stream of bytes as it was originally sent by the sender.  However, between the TCP send/receive endpoints (i.e., the physical network), the data can be received out of order, it can be fragmented, it can be corrupted, and it can even be lost.  TCP accounts for these problems using a handshake mechanism that causes bad packets to be retransmitted.  The TCP stack on the receiver places these packets in the order in which they were transmitted so that when you read from your TCP socket, you are receive the data as it was originally sent.
When you call the doRead method in Twisted, the data is read from the socket up to the size of the buffer.  This data may represent a single message, a partial message, or multiple messages.  It is up to you to extract the messages from the buffer, but you are guaranteed that the bytes are in their transmitted order at this point.
Sorry for muddying the waters with my earlier post...
Comment: please revisit your answer as you are very wrong. The API exposed by TCP is very much a stream with byte ordered delivery. You are referring here to the underlying transport method (i.e. packets) which are of course not guaranteed to arrive in order.
Comment: FYI, the "server layer" for TCP is IP which is of course "connection-less" and does not guarantee packet order delivery.
Comment: I am lost with your explanation -- in second sentence you write data can be corrupted (for TCP client?), and in third you write it will not be corrupted because TCP will handle such case. So what can TCP client see -- data corrupted or guaranteed to be correct? Also with order of data, you mean with direct connection there is order guaranteed, but for indirect connection TCP client can see data out of order?
Answer: TCP is a stream, UDP is a message. You're mixing up terms. For TCP it is true that the stream will arrive in the same order as it was send. There are no distict messages in TCP, bytes appear as they arrive, interpreting them as messages is up to you.
Comment: Re: terms - Yep, of course. However, Twisted abstracts this into distinct messages (so interpreting them as messages is not up to me)
Comment: No, Twisted does not abstract TCP into "messages". You will get a chunk of bytes (down to one byte at a time in extreme cases) in the base protocol.
Comment: And worth noting that while you might have two writes on the sender side, they might collapse into a single read on the receiver side, and vice versa - depending on the buffer sizes and the network conditions.
Comment: I think it is right from the application view. From the protocol view, TCP is essentially an UDP with a lot of extensions for connection handling, lost packet re-sending, arrival ordering and so on. It is well visible in the Unix API: the same stream-oriented api calls (write, read) and packet-oriented calls (send, revc) are all working on both type of sockets. Of course you can't manipulate UDP "connection" on a sub-packet level, while you can read/write on the byte-stream level TCP connections.

Is TCP Guaranteed to arrive in order?


No coding no CIVICRM? Or..?

Question: I run a small but growing non-profit and I was looking into CIVICRM as our much needed CRM system. Now I know no coding at all, can I still custumie and use CIVI or do I nedd to know coding?TY!!
Answer: You can customize civicrm in many ways - eg add custom data/fields; you can also add extensions - essentially packages of code that help you leverage civicrm further. Lots of ways to customize your civicrm without requiring you to know touch code.
Answer: You can indeed customize CiviCRM in many ways, as KarinG explained. However, if you are a small NGO with small budgets I would recommend doing only the absolutely necessary customizations and stay away from 'i want this to look a little different'. Not because you can not, but because the benefits will probably not outweight the effort.
Answer: There are ways to customize the appearance and UI of CiviCRM as well.  See this talk from 2015's Denver conference: CiviCON Denver- Make It Pretty: Customize the Appearance of CiviCRM without Knowing How to Code

No coding no CIVICRM? Or..?


Is there any difference between a 2 for 1 stock split and a 100% stock dividend?

Question: A 2:1 stock split, and a 100% stock dividend seem to have the same effect. Is this really the case, even behind the scenes? Is a 2:1 stock split just a synonym of a 100% stock dividend, or are there legal and accounting differences? If there are differences, how are they significant to the retail investor?
Comment: Note that the question is about stock dividends, and not about cash dividends.
Comment: Dupe https://money.stackexchange.com/questions/27415/why-is-a-stock-dividend-considered-a-dividend-what-makes-it-different-from-a-stock-split
Answer: A stock dividend means that you receive additional shares in the company instead of cash and they are not taxed until the shares are sold.
Like stock splits, stock dividends dilute share price.   They do not increase shareholder wealth or market capitalization.  There's no difference unless there's a conditional attachment that requires that the stock dividend shares cannot be sold for a period of time.
Here's a more in depth explanation  with some examples.
Comment: Thank you for the answer, but I still don't see how a 100% stock dividend is any different from a 2-for-1 stock split.
Comment: "Like stock splits, stock dividends dilute share price".  This is incorrect.  Dividends don't "Dilute" the price, they lower the price since you're removing that VALUE from the company.  Splits cause lower prices through an equal division of shares currently issued.  The total value remains the same.  "Dilution" might describe this in common English, but the word "dilute" is usually used in investment terms to refer to when current owners of a stock lose value in their holdings because additional shares have been issued and sold to others. Current SH's can only stay even by buying more shares.
Comment: You are conflating dilution of share price with dilution of value.  @D Stanley's comment below states it more clearly: **The dilutive effect is the same for a stock dividend and a cash dividend - the company is giving something away, which dilutes the per-share value accordingly. If a company has 100 shares and issues 100 more shares as a "dividend", suddenly there are 2X the number of shares outstanding, but the company has not changed value, so it's stock is worth half as much per share.**
Answer: The issue is whether or not the company is creating new shares vs distributing already-existing shares not included in the public float (until paid as stock dividends, committed via Options awards, or included in company retirement plans, etc.).  I think this is the crux of your question.
A company will pay a STOCK DIVIDEND from Treasury Shares: shares it owns, but hasn't registered or made available for public trading.  You receive shares worth the current market price*the # given to you.  Critically, there is no dilution of yours or anyone else's ownership from the company doing this.  But the main difference between a STOCK DIVIDEND and a STOCK SPLIT is this:  **A STOCK DIVIDEND is worth more than the shares you already own.
A STOCK SPLIT is little more than a marketing device designed to lower the current market price of the stock making it more attractive to people who naively believe that a stock's Price is somehow indicative of its Value**.  They believe that the higher the price, the more expensive the stock.  This couldn't be farther from the truth.  However, human psychology being what it is-- and companies being well aware of this fact-- stock splits happen all of the time as a way to drum up (or keep the river of) dumb money flowing into their "affordable" stock.  Example: XYZ corp has run up in price from $20 to $100.  At $100 many retail investors believe the company is "expensive".  It probably is... but not because of the Price.  It's because of the Value.  A company at or above Fair Market Value would be truly "expensive".  But the company might have been expensive at $30, too.  When they split their shares, say, 5:1, everyone gets 5 shares for each share currently owned and the public market price of the company goes from $100 down to a "more affordable" $20.  Rinse and repeat.
Companies do the same thing for similar reasons in reverse.  a Reverse Split will exchange 1:10, which has the effect of increasing the current stock price, making the company look like they're doing better than they are in many cases.  A company whose stock has lost much of it's market value will do this.  Example: the price of their stock has fallen from $50 to $1.  They do a 1:10 reverse split and raise their stock's price to $10... which is at least respectable on the surface.
A stock split doesn't provide anything of value to the current shareholders. If your stock was worth $5,000 yesterday, it's still worth $5,000 today.  You just have twice as many shares (again, if it's a 2:1 split).
If a company's market capitalization was $100 million prior to the split it will be $100 million afterwards, too.  The share count might have doubled, but you'll notice that the stock price is halved, too (if it's a 2:1 split).  2x the shares at 1/2 the price.  Nothing has changed.
As for the dividend:
Not all shares originally issued by a company are publicly traded.  Some of those shares are held by the company and not made available unless pursuant to a registration.  These are called TREASURY SHARES or TREASURY STOCK.  You can see this (by implication) when you look at a company's financials on a site like Yahoo! Finance.  There will be a reference to "Public Float". or "% Public Float".  These are the shares that are publicly traded.  If that number is not <100%, which is extremely rare, that tells you the company has Treasury Stock and/or some other shares restricted from public sale in some way (part of the company's retirement plan, connected to Stock Options issued as incentives, held as part of a deal with "strings attached, etc.).  These shares all exist, but can't be publicly traded until registered or their restriction has been lifted in some way.
Another way you can see this is in the line item on the company's financials right under "Shares Outstanding" usually marked: "FULLY DILUTED SHARES OUTSTANDING".  This number approximates the ACTUAL number of all shares issued by the company, including shares attached to options that will most likely be exercised, etc.  When calculating a company's Earnings Per Share most people do a quick and dirty calculation based off of the wrong number, i.e., they use the Shares Outstanding.  The most accurate analyses use only "Fully Diluted Shares Outstanding".  Many times this is an elusive number and professional analysts will calculate this number after pulling together share references from a variety of places (including the aforementioned Stock Options).
To sum it all up: a STOCK DIVIDEND is paid from Treasury Shares, providing the recipient with something of value just like a cash dividend and removing an asset from the company's books (which actually decreases the value of the company in proportion to the value disbursed, just like a cash dividend does and which you can see on ex-dividend day when the shares open down by the amount of the dividend declared... in theory in many cases).
A STOCK SPLIT's only relationship with a company's value is in management's hope that people will naively believe that it indicates that the company's shares are now more "affordable" or "less expensive",increasing demand for the stock for a while. If you think a stock is expensive because of the price, buy fewer shares. Cost is share # * Price.  You will have the same exposure to the company based on underlying value if you buy that single share or 100 shares at 1/100th of the price.
Hope this helps.
BTW-- while a stock split is technically "taxable" when you sell the shares, it doesn't increase or decrease the tax you would have owed upon sale of the shares you had prior to the split.  It doesn't change your basis in the shares for accounting purposes.  It's as if you had a chocolate bar that was broken into smaller bits. You've still got the same amount of chocolate... and it's the same chocolate you had before.  A stock dividend is more chocolate.
Izzy
Answer: There are accounting differences. Consider 100,000 shares of par value $1.
2-for-1 stock split
When there is a 2-for-1 stock split, the par value is halved to $0.50 and the number of shares is doubled to 200,000.
100% stock dividend
Under US GAAP, a 100% stock dividend is considered a large stock dividend, which means that the par value of issued shares is debited from Retained Earnings and credited to Common Stock. For a 100% stock dividend in this case, 100,000 shares are issued, and the total par value of newly issued shares $100,000. Therefore, Retained Earnings is reduced by $100,000, and Common Stock is increased by $100,000.
For more details, read my answer to this question: Why is a stock dividend considered a dividend? What makes it different from a stock split?
Answer: (edit - Whoops! Completely missed that this question is about a dividend paid in stock, rather than cash)
These are completely different things:
Dividend: The company takes money out of their bank account and gives that money to each shareholder. No shares change hands. All else being equal, this usually causes the shares to drop a bit (roughly equal to the amount of the dividend), as the company now has less money.
Stock split: The number of shares doubles universally. Everyone who had one share, now has two. That's it. All else equal, the share price roughly halves (in a 2:1 split), as there are twice as many shares and presumably the total value (market cap) of the company has not changed. In practice there is some idea that a cheaper share price might induce more buyers and slightly elevated the price after halving it, but no guarantee of that.
Comment: The question is about stock dividends, and not about cash dividends.
Comment: A stock dividend is a dividend given in shares, instead of cash.
Answer: A Stock Dividend is taxable when you get the dividend.
A Stock Split is taxable when you sell them.
It's pay (taxes) now or pay later.
Comment: Not true in the US (as tagged in the Q) unless cash or preferred stock is involved; see https://www.irs.gov/publications/p550#en_US_2020_publink100010098


Why does hop always grow clockwise?

Question: Hop climbs up other plants or objects. It clasps its target always clockwise. What is the reason for this? Wouldn't it be more efficient to select the direction case by case?
Comment: It's not that smart.
Comment: Hm, there are plants which are that smart. They for example just wag randomly around to fetch the next best climbing object.
Comment: But those don't have a inherent twist.  All the ones twisty ones I've seen always twist in the same direction.  For example, around here we have oriental bittersweet (Celastrus orbiculatus).  I've only ever seen it climb up trees with a right-handed twist (clockwise going up).
Comment: I know one but I've forgotten its name. I'll try to find it out :)
Answer: There are quite a few plants like this. It's coded into their DNA. Some vines spiral in the right-handed sense, others left, e.g., morning glory and honeysuckle go the opposite way. There can also be a screw-handedness in various other things like the way the leaves are arranged around the stalk or the organization of petals into flowers.
Similarly, humans have their liver on the right and heart on the left, our brain hemispheres are asymmetric, and so on. The asymmetry also exists on the molecular level in all forms of life. For example, the molecule that gives spearmint its characteristic smell has a mirror-image version that exists in caraway seeds and has a different smell. Ultimately all of these asymmetries probably originated by chance at an early stage in the evolution of life on earth. They're coded in DNA, which is itself asymmetric.
In terms of evolution, I think there are likely to be different reasons in different animals and plants why it's advantageous to have an asymmetry rather than symmetry. Then if asymmetry is advantageous, it's probably random which of the two occurs. I googled for info on vines, but mainly found only info on animals. So the following is just my speculation, but I would think that in the case of a climbing vine, it would be advantageous for it to have a definite screw-sense programmed into it, because it makes it more likely that it will actually form a spiral, thereby staying firmly attached to the thing it's climbing up. If it didn't have a handedness, then it could kind of randomly start going up one way, then turn the other, and the result might be that it would sort of zigzag back and forth without ever securely wrapping around.

Why does hop always grow clockwise?


Difference between shall and should in this specific context?

Question: Should we go?
Shall we go?
Do they differ in their degrees of politeness?
Comment: I wouldn't expect to hear the second one in day-to-day conversation, but not because it isn't polite.
Comment: I'd guess the second one is quite common in British English. I'm not even a native though.
Comment: @J.R. Are you suggesting shall is outdated/formal? Is there no other difference?
Comment: @SandeepDhamija - No difference in meaning, really. And _shall_ does sound too formal for everyday conversation. (I'm imagining a context such as: _They're having a sale down a the department store tomorrow. Should we go?_ Other contexts may have different interpretations.)
Answer: I practice both but then out of those two, should is more polite, at least in BrE (and so in InE as I know) especially when used with I or we. OALD defines it:

should (#10) - (British English, formal) used with I and we in polite requests

On the other hand, shall when used with I or we, OALD describes it -

shall (#2) - used in questions with I and we for making offers or suggestions or asking advice.
Answer: To me -

Should we go?

is requesting a decision about going, what you might do. For example:

It is getting late, should we go to the store?

The reply could be yes or no.
Then if the reply is yes, you finish what you are doing, grab your wallet, etc., and say to your friend:

Shall we go (now)?

which directly indicates when you are going.
Both are reasonably polite.
Comment: +1 But I'd say *shall we go* is an invitation or suggestion.
Answer: Shall is equivalent to will when used indicatively.  The difference in politeness is great, at least in AmE.  It has a very formal flavor to it, and you can sound snobbish if you overuse it or use this in a non-formal or non-polite context.

I will go to the park tomorrow.
I shall go to the park tomorrow.
I wonder what the weather will do.
I wonder what the weather shall do.
I certainly shall have looked everywhere by then.

Interrogatively, shall heavily implies "Will you allow" or "will we allow?"  So "Shall you X" doesn't work.  "Shall we X" does work, though.

Will Mary come with us?
Shall Mary come with us?
Will you take a look at this?
Shall you take a look at this?  (sounds really weird.)
Shall we take a look at this? (we are asking if we will allow ourselves to look at this.)

There are some arcane outmoded(?) rules about when to use shall and will, e.g. I think something about you are supposed to use shall for first person, etc.  It could be why you can't ask Shall you X.  But you can say "You shall go to the park at 3pm" in the same way as "You will go to the park at 3pm."
Answer: When you say "Should we go" is more polite than "Shall we go". The last one is more used when you want to give an order to someone while the first one seems like you are asking for someone to go to somewhere with you.
Comment: @Downvoter- I would like you know your opinion.
Comment: It's an understandable mistake.  *Shall* in questions has a different interpretation than *shall* in statements.  In questions, it's closer to "should" in meaning.


Which statistic to use for measurement between two samples

Question: I am measuring stem widths of a control plant and a mutant plant and want to determine if there is any significant difference between them. The sample sizes are not the same. When I use a test like Kolmogorov-Smirnov, I get huge significance even though it seems like the distributions aren't really that different. It seems too sensitive; what test would be more suitable?
Comment: *"... it seems like the distributions aren't really that different."* It would be nice to support such a statement with an image such that other people can see what you mean.
Comment: *" to determine if there is any significant difference between them"* are you thinking about specific types of differences? Which ones?
Comment: Welcome to CV! Have you evaluated the distribution of your stem width measurements for both the control and mutant plants? What are the exact sample sizes for your control and mutant plant groups? Do you have an estimate of the variability (e.g., standard deviation) within your control and mutant groups?
Answer: It depends on the parameter of interest. The KS test compares the whole cumulative distribution functions. A significant result could be because of different means, medians, variances, skewness, kurtosis, and so on, or any combination of them, but in general any quantiles.
If the difference to test is of means, Welch t test is usable. However, in small samples, the best method for independent group comparisons is the permutation test. See R package {coin}. We can use bootstrap method to find confidence intervals of the difference, using {confintr} https://cran.r-project.org/web/packages/confintr/vignettes/confintr.html
Comment: All well, but bootstrap may work poorly in small samples, as its nice properties are based on asymptotic theory.
Comment: Sounds reasonable conceptually, but papers I read use very small group sizes, like n = 16 in a group, to illustrate advantage of bootstrap CI. Repeats R >= 20000 is recommended for accuracy. The bias depends on sampling randomness.
Answer: The KS test is a test of the null hypothesis that normal stem widths and mutant stem widths were drawn from the same continuous distribution.
I would probably think that you perhaps are interested in Welch's two sample t-test, which tests the null hypothesis that the population mean of normal stem widths and mutant stem widths are the same.
Welch's two sample t-test is also appropriate when variances and/or samples sizes are different.


Can I install sheet vinyl over ceramic tile without adhesive?

Question: I live in a rented flat, so can't make substantial changes but have very ugly ceramic floor tiles which I would like to cover with some funky vinyl flooring. Is it possible to do this without glue so it can be removed when I move? Please advise.
Comment: Might be important to know exactly what "*funky vinyl flooring*" is.
Comment: Hello, and welcome to Stack Exchange. A picture of the tiles would be helpful, especially a closeup showing how rough they (and the inter-tile joints) are.
Comment: It's a moot question since you'd need to level the ceramic with a skim product first. You can't put vinyl over a substrate with many voids and expect it to look decent or last.
Answer: I have seen vinyl floors where the glue was put down unevenly (sparingly in some areas), and by comparison the areas without enough glue were visibly damaged on top from wear. So, I think that (for whatever reason) vinyl floors which are not (well) attached have a shorter lifespan.
However, you might want to look into floating vinyl floors (here's a random link for a floating vinyl floor vendor). Perhaps it would help to lay some carpet padding on the underside, so that it doesn't slide and protects the original floor.

Now, I have often seen vinyl floors that are made to look like tile, stone, or wood, but they are always reaching for a conservative aesthetic. If you already have a sheet of vinyl that you like, then you are sort of forced to install it properly or be willing to sacrifice it to a learning experience.
But I have always wondered if you could create vinyl panels from say, 3/4" plywood. Basically the idea would be to cover the top with the vinyl and the bottom with say, foam rubber or carpet padding, and then just lay the panels down and cover the seams with trim. Unfortunately, I've never had enough money to warrant an experimental floor, so I can't really recommend it; but if you try it, let us know how well it works, any tips or hiccups, and after a while- how long it lasts.
Comment: +1 For the idea of covered panel. Those would add some nice heft to the temporary flooring, and probably make it somewhat re-useable! Gravity + Friction will be your friend here. This could be good in my basement.
Comment: @BrownRedHawk I thought of it many years ago. I believe it would be a popular item for renters; I've been in the position of wanting a different floor but not having permission to make any changes to the rented floor.
Comment: The joints of the original floor might show through if the vinyl is not very thick or dense


PV diagram from cubic equation of state

Question: I want to calculate the density of CO2 using a cubic equation of state in order to plot the P-v diagram. From theory I know that I get one real root when the substance is in single-phase region and two when it is in two-phase region. In the latter case the smaller volume is associated to liquid while the other to vapor. I'm using Matlab to solve the cubic eos, incrementing the pressure and the temperature at fixed intervals. How can I merge the two solutions to represent the actual Pv plot?
Answer: Set temperature as constant, make P change and find V solutions (if V(P,T) which according to what he is saying it is what he is doing...)
You HAVE to set one constant, since you want to plot PV you need to set T as constant.
In case it is P(V,T) you change the Volume and calculate the Pressure.
... I would recommend you do a loop to print out all the values then plot them in either Origin, Excel, by hand or whatever you want to use.
In case you don't know how to use loops (completely OK with that this is a place to learn)
 https://www.mathworks.com/help/matlab/ref/for.html
My recommendation? Use Fortran because Matlab takes AGES to solve but that is just personal preferrence.
Comment: For a cubic equation with real coefficients, the number of real roots is one or three (though two could be repeated).  Source: high school advanced algebra or college pre-calculus algebra. Don't count on two real roots.

PV diagram from cubic equation of state


Can I bake cake in an air fryer?

Question: My oven does not work at the moment, but I have an air fryer.
Is it possible to bake a cake in the air fryer?
Answer: You can, absolutely. But it will be tricky.
The unique aspect of an air fryer is its high airflow, which dries out the surface of foods quite quickly. (In a residential kitchen, only a deep fryer comes close to matching that, hence "air fryer".) That's great for crispiness, but for baked goods, you have to consider how much "crispiness" you actually want.
If I had to cook a cake in the air fryer, I would find a recipe which was intended to be relatively flat and quick-cooking. If I just wanted to make a "baked" dessert in it, I'd make brownies instead. (Air fryers are great at brownies, because they're flat, quick-cooking, and benefit from a crispy top.)
Answer: Yes, you can bake a cake in an air fryer. In fact, an air fryer is an oven, the name is more of a marketing term.
It may bake slightly differently than in a typical large oven, watch out for it. If in doubt, try a lower temperature, and check diligently for doneness. It might not become perfect cake, but it should be enjoyable.

Can I bake cake in an air fryer?


How can I merge responses of two Google Form identical to each other but in two different languages

Question: I want to combine the responses of two of my Google Forms that are identical to each other but in two different languages. How can I combine the responses to get the summary of both sets of responses?
Comment: Welcome to [webapps.se]. There are many ways to do that. What have you tried so far? Is this something that should be done only once or continuously? Are you already sending the form responses to an spreadsheet? How many questions and responses do your forms have or do you expect that they will have?
Comment: Consider sharing a publicly editable [sample spreadsheet](https://webapps.stackexchange.com/a/138383/269219) with realistic-looking data, and showing your _hand-entered_ expected results there.
Answer: You have two Google Forms. They are identical except that they are in different languages. You want a summary of the combined responses.

Use QUERY to create an array that combines the results of two separate queries - one for each Form Response sheet.
The query should be something like this:
={query({'Form Responses 1'!A1:A,'Form Responses 1'!B1:B,'Form Responses 1'!C1:C}, "select Col2, Col3 where Col1 is not null",0);query({'Form Responses 2'!A1:A,'Form Responses 2'!B1:B,'Form Responses 2'!C1:C}, "select Col2, Col3 where Col1 is not null",0)}
The key aspects are:

create a query for each form
create an array using curly brackets
combine the queries between the curly brackets using a semicolon (;) to combine/stack the output from each query
create your own column headers

Example
The query is in Cell A3

Responses - Form#1 (French)

Responses - Form#2 (Maltese)


Roof truss repair

Question: Cut trusses.
I'm having some remodeling done and the contractor found roof trusses that were cut before I purchased the house in order to install an air handler. He is going to send it to his engineer to find out the best way to reinforce these areas. I'm afraid that he is going to come back with some outrageous cost to fix this issue. Is there a budget friendly way to accomplish this, just so I might have a little information in my back pocket as a suggestion? Any help would be appreciated.
(https://i.stack.imgur.com/xary4.jpg)
Comment: Just remember that having it fixed now is most likely cheaper than the roof collapsing and getting it fixed then...
Comment: For more help here I think that several additional bits of information would be need. Number of rafters cut? Rafter spacing? Is cut in upper chord of rafter truss or a web piece? Size of material that was cut?  Measurement of the cut depth and height? Are these real trusses or stick built rafters? Photo of cut area showing whole rafter member width? Picture of overall rafter structure from a distance?
Comment: @david Duncan , it would be helpful to know if the advise provided helped out and if any repair was needed how it was accomplished.
Answer: Steel is often used for beams when wood isn't strong enough for the allowed vertical dimension. You might be able to reinforce it with a structural angle. My gut feel is that this would be strong enough. Assuming that it extends 2 ft past the problem area on both sides and is bolted to the 2x6(?) with 5/16 bolts, washers, and nuts, at least 2 on each side of the problem area. Put the A dimension against the 2x6 and the B dimension away from the roof so roofing nails are less likely to hit it.
This stuff isn't that expensive, but it is heavy, so you want to buy it locally if possible.
I am not qualified to make a final decision on this, you need an engineer who knows your local codes.
Answer: I'd take a sketch of the truss to your local lumberyard who makes trusses and ask them to run a load test given: 1) typical snow load for your area, 2) span of trusses, and 3) spacing of the trusses.
The truss manufacturers have software that can calculate that stress in each member of the truss. You can then match it to what your contractor says.
One reason you have not had trouble so far is that the member is in compression and the "load" is partially being transferred to the roof sheathing. This cannot/should not continue or the sheathing could buckle.
Edit: Actually, after closer review, I doubt that cut is in the top chord of a truss. The adjacent member looks like a 2x10 or 2x12 joist.

Roof truss repair


How to use Nginx HTTPS behind a SSLH and a STUNNEL

Question: I have a NGINX listening on port 441 and SSLH listening to ports: 441(https), 442(ssh) and finally STUNNEL listening on port 443 forwarding to SSLH(port 2243).
STUNNEL config:
pid = /var/run/stunnel.pid
cert = /etc/letsencrypt/live/f1.example.com/fullchain.pem
key = /etc/letsencrypt/live/f1.example.com/privkey.pem

[sslh]
accept = 443
connect = 127.0.0.1:2243

SSLH config:
DAEMON_OPTS="--user sslh --listen 127.0.0.1:2243 --ssh 127.0.0.1:442 --ssl 127.0.0.1:441 --pidfile /var/run/sslh/sslh.pid"

NGINX config:
server {
       server_name f1.example.com;
       listen 441;

       access_log /var/log/nginx/f1.access;
       error_log /var/log/nginx/f1.error;

       location /admin/ {
              proxy_pass http://127.0.0.1:10000/;
              proxy_set_header Host $host;
              proxy_redirect http://$host:10000/ /admin/;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Proto $scheme;
        }
}
server {
    listen 80;
    return 302 https://$host$request_uri;
}

As you can see I am running a WEBMIN App in /admin/ path with a reverse proxy using NGINX. My problem here is when I just type f1.example.com/admin in the browser, it redirects to HTTPS version which is https://f1.example.com/admin.
After a successful login it redirects to http://f1.example.com:441/admin/sysinfo.cgi?xnavigation=1 which is in HTTP with port 441(I am wondering how port number getting inserted here). The page loads fine but its not in HTTPS. I have to manually remove the port number and hit enter to get it upgraded to HTTPS.
How can I get this to work with HTTPS smoothly? What are the changes I need to do to my NGINX conf file? I feel like I am missing something here.
Answer: port_in_redirect off;

Added this to nginx conf and now works like a charm!


Admin Access for specific page(s)

Question: I'm working on a membership site in WordPress and I want a specific group of my users to be able to have access to a page I create, but then also have admin access to this specific page and be able to add items as they see fit to this page. Is it possible to give admin access to a user but restrict it to a specific page or set of pages?
Answer: I know this question is kind of off-topic but I need to come in and say firstly don't add anybody... anybody....
ANYBODY!!
as admin on the site... At that level they can do everything you can do, or probably a lot more if they actually know what they're doing :-p It's a good way of getting your site hacked, compromising data and filling a few thousand more inboxes with junk.
What you'll want is to add them as an editor, which doesn't have nearly the same level of permissions as admin.
Secondly welcome to WPSE - please do give this a read.
https://wordpress.stackexchange.com/help/on-topic
Whilst asking for recommendations for plug-in's is off topic it sounds like that's probably the level you were wanting help at you may want to give this page a read. It recommends Capability Manager - sounds like what you're after

Admin Access for specific page(s)


Brightness buttons not working (but the rest of the fn keys do)

Question: I have a Dell XPS 13 (2016 version) and the brightness Fn keys suddenly stopped working. I updated my display driver, but the buttons still don't work. When I press one of them, my brightness indicator shows up in the top left corner of my screen, but it doesn't move. The rest of my Fn keys work fine, only the brightness keys don't work. Windows updated recently and I'm on the Slow channel of the Windows Insider Program, so I'm thinking there's a bug in that update that broke my brightness keys. Is there a way I can fix them?
Comment: Hopefully the good suggestion from Keltari will help alleviate the problem.  That being said, please keep in mind that regardless of whether you are on the "Slow ring" or not, the Windows Insider program is essentially still a beta test.  While it is nice to test the newest Windows 10 capabilities earlier than the general public, strange things like this can happen.
Answer: More than likely you need to reinstall the software that controls the brightness keys from Dell support page. Have it auto detect your computer if you want.  In the Drivers & software section, you will find driver/software updates.  Read their descriptions thoroughly and you should find the one you need to the brightness controls.


Set WM_WINDOW_ROLE property to an arbitrary window?

Question: I'm trying to make named scratchpad in xmonad, and I need some way to find/distinct windows. For example nvim-gtk. I can't use WM_NAME because name is changeable by nvim-gtk. So, I'm trying to set role property and find the window by that property. I'm able to set role for example to gvim (gvim --role Notes) but I failed to do the same with another applications.. That is my problem. Does anybody know how I can do it?
Answer: Answered in a now-deleted comment:
<code>xprop -id "$windowid" -format WM_WINDOW_ROLE 8s -set WM_WINDOW_ROLE "$role"
</code>


Say I want to mark a 30 blocks radius for spawn proofing, the I would need some kind of Indicator to show the 30 blocks radius,any suggestions?

Question: I also want to point out that in Shulkercraft"s Witch farm,he somehow has a red circle Indicating the size of the spawn proofing to be done,I want a similar way,Link to his Video

 and look at the spawn proofing part,Please reply Quickly.
Answer: Minihud, as mentioned by Ginkgo is the most common approach, but if you want "vanilla", you can use "Pixel Circle Generator" on-line tool, and follow the generated edge.

Enter "width: 61" (it uses diameters, not radii) then follow - 30 extra blocks away from the central block (easiest to do: prepare a stack of 30 blocks in your hotbar and build a line until you run out) - then follow the picture - 5 blocks out to a side from the end of your radial line, 1 in and 4 to the side, 1 in, 3 to the side, 1 in, 2 side, 1 in, 1, 1 in, 2, and so on. Working in windowed mode (F11) or with the pattern on one monitor, game on another is the easiest way to do it.
Or much easier, (for purposes of spawn-proofing it doesn't hurt to spawn-proof too much) - mark out edges of a 61x61 square centered on the central block (again same trick, 4 stacks of 30 items), then spawn proof it taking good care to adhere to the borders near middles of the sides, while being completely sloppy around the corners.
Note:
Shulkercraft is a content mill channel which is mainly copying content off other creators with very little understanding of what they they do, and whatever they produce themselves has usually quite lackluster performance. This farm is no exception.
In particular, this location of the afk platform (directly above the center of the farm) will severely cut into the spawn rates. Lack of pack spawning extensions also heavily limits the rates, plus the flooding of the platforms as soon as even one witch spawns is another severe factor making it one of the worst designs out there. If you want a relatively easy design, pick Xisuma's, LogicalGeekBoy's or maybe Ray's. If you're more ambitious, Ilmango has excellent rates. Witch farms have poor efficiency as they are, and so using Shulkercraft design which is a good 30-50% worse than the next competitors and far behind the leaders - is hardly worth the effort.
Answer: You can use a mod such as MiniHud, which can overlay spheres/cylinders/circles with a specified radius into your Minecraft world.


Audacity adds a gap when exporting mp3

Question: I created a loop Audacity which was 10.549s long, I exported it to mp3, now when I open the exported file via Audacity it now has a gap at the beginning making it 10.58s long. The loop I made that sounded perfectly inside Audacity becomes an imperfect loop when exported to mp3. Any ideas how to fix this?
Comment: I'd try export as WAV & see what happens. Will maybe eliminate whether it's the app itself or the export/conversion process.
Comment: @Tetsujin there is no problem with WAV export but I need the file as mp3. Apparently, I tried converting wav to mp3 using another tool but the gap is still there. The issue is probably with LAME converter.
Comment: if you convert the mp3 back to wav is the gap still there? What happens if you use a different converter?
Answer: Problem: MP3 File has a gap
This is a known, acknowledged issue since at least 2000:

1 Why is a decoded MP3 longer than the original .wav file?
Because LAME (and all other MDCT based encoders) add padding to the
beginning and end of each song.  For an explination of why,
see the questions below.

800 word long technical explanation pertaining to both decoder and encoder issues snipped.
LAME-enabled players should apparently automatically jump this gap:

LAME embeds the amount of padding in the ancillary data of the
first frame of the MP3 file. (LAME INFO tag). The LAME decoder
will use this information to remove the leading padding of an MP3 file.

however:

Modifications to the decoder so that it will also remove the
trailing padding have not yet been made.

Alternatives
You could try another encoder as mentioned, if you have access to the Fraunhofer version (IIRC it is available in iTunes and Windows Media Player). Alternatively, you may be able to compile/acquire a version of sox with libmad enabled. I think these will have similar issues, however.
The question is, do you definitely need an MP3 as mentioned in the comments? Are you using a player that only handles MP3s?
If it absolutely, definitely, positively has to be an MP3, no ifs ands or buts; and the Fraunhofer encoder also gives the same issue, you could have a look at a previous thread here on SU:
Best program to trim silence beginning and end of mp3 files?
Comment: Is there any update to this? Does the official lame decoder still not remove the trailing padding? If so, I assume this problem translates to all other software that decodes mp3s (eg, Chrome and web audio api)?

Audacity adds a gap when exporting mp3


Number of spanning trees of a quotient graph

Question: Let $G$ be a finite connected graph on a $2m$-element vertex set $V$. For any graph with vertices $u,v$, let $\mu(u,v)$ denote the number of edges between $u$ and $v$. Suppose that $G$ has an automorphism $f$ that is a fixed-point free involution on the vertices. We can define a quotient graph $G/f$ by letting the vertices of $G/f$ be the orbits $[u]=\left\lbrace u,f(u)\right\rbrace$ of $f$, and setting
 $$ \mu([u],[v]) = \mu(u,v) + \mu(f(u),v). $$
Let $\kappa(H)$ denote the number of spanning trees of a graph $H$. By the Matrix-Tree Theorem and some simple linear algebra, one can show that $2\kappa(G)$ is divisible by $\kappa(G/f)$. My question is whether the factor of 2 is necessary, i.e., is it always true that $\kappa(G)$ is divisible by $\kappa(G/f)$? Similar questions can be asked for more complicated automorphism groups of $G$.
Comment: I think this works in the general case too if we define a quotient according to $\mu([u],[v])=\mu(u,v)+\mu(u,f(v))+\cdots+\mu(u,f^{n-1}(v))$, where $f$ is an automorphism of degree $n$, but I havent checked the details. I wonder if there are any other graph related quantities that behave this way under taking quotients.
Answer: Let us group the vertices as $U=\{u_1,u_2,\dots,u_n\}$ and $V=\{v_1,v_2,\dots, v_n\}$ where $f(u_i)=v_i$. Let $L_0$ be the laplacian of the graph with vertex set $U$ and edges as restricted from $G$, let $L _1 = \operatorname{diag}\left( \sum _{j=1}^n \mu(u _i, v _j)\right)$ and $L=L _0+L _1$,
also let $A$ be the symmetric matrix whose $a _{ij}$ entry is $-\mu(u _i,v _j)$. Clearly the Laplacian of $G$ is
$M=\left( \begin {array} {cc} L & A \\\
A & L \end {array} \right)$. Let $M^*$ stand for the matrix $M$ with deleted first row and column. We have
$$\kappa(G)=\det \left( \begin {array} {cc} L & A \\\
A & L \end {array} \right) ^ *=\det \left( \begin {array} {cc} B & C \\\
D & (L+A)^ * \end {array} \right)$$
for some block matrices $B,C,D$ of size $n\times n,n\times (n-1),$ and $(n-1)\times n$ where this second matrix was obtained by adding the $i$th row of $M^{*}$ to it's $n+i$th row for $1\le i\le n-1$ and then adding the first (or last) $n-1$ columns to the $n$th column. So $D$ is the matrix $(L+A)^*$ together with a last column of zeros, making $\left((L+A)^*\right)^{-1}D$ with integer entries.
Next we factor it using one of these identities
$$\kappa(G)=\det(L+A)^ * \det(B-C\left((L+A)^*\right)^{-1}D)$$
and observe that $L+A$ is the Laplacian of $G/f$ so $\det(L+A)^ *=\kappa(G/f)$, and since the second factor is an integer we get the desired divisibility.
Comment: The proof looks o.k. now. Getting the last column of zeros was a key
step. Thanks for your answer!


What does "if ntp is configured to allow remote configuration" mean in this ntp CVE?

Question: I'm reviewing CVE-2015-7850 and it says:

•   Affects: All ntp-4 releases up to, but not including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
•   Summary: If ntpd is configured to allow remote configuration, and if the (possibly spoofed) source IP address is allowed to send remote configuration requests, and if the attacker knows the remote configuration password or if ntpd was configured to disable authentication, then an attacker can send a set of packets to ntpd that will cause it to crash and/or create a potentially huge log file. Specifically, the attacker could enable extended logging, point the key file at the log file, and cause what amounts to an infinite loop.

I have hard time to udnerstand the following line:

If ntpd is configured to allow remote configuration

What does that mean?
Answer: ntpd can be configured remotely with the ntpdc command. See e.g. this for what you can do (add and remove servers e.g.). This is normally only enabled for localhost, if at all.


If I am on flight following, do I have to be direct to my destination?

Question: Can I ask for VFR flight following with waypoints to get to my destination, or does it have to be direct? (Heading changes needed to avoid sua, weather, etc.)
Comment: Related, possibly duplicate: [How should I request flight following when I'm not taking a direct route to my destination?](https://aviation.stackexchange.com/q/48211/54557)
Answer: ATC has relatively large "bubbles" they need to protect for around IFR aircraft—3 miles or 1000 feet at lower altitudes, 5 miles or 2000 feet at higher altitudes. Therefore IFR aircraft are given very explicit clearances on what route or heading to fly at what altitude.
ATC does not have nearly as much responsibility for separating VFR aircraft. Only in Class B airspace are VFR pilots afforded airborne separation between VFR and IFR aircraft, and only in Class C airspace are they afforded separation from IFR aircraft—and in Class C airspace the separation is "the dots on the screen don't touch." Quite a far cry from a three-mile bubble.
So VFR aircraft are allowed to navigate and maneuver as desired, at whatever altitude is desired, in accordance with safety of flight and following all applicable FARs. Unless ATC issues a specific instruction, such as "Fly heading 360" or "Maintain VFR at 4,500," you do not need to fly at any particular heading or altitude.
However, if you are navigating using pilotage or airways and not following the magenta line on your GPS, it would be appreciated if you mention that so the controller isn't concerned when they see you thirty miles and fifty degrees off of what they think is your "on course" track. When you request flight following the controller makes an entry into the system and generates a flight plan that only has two fixes on it: Departure airport direct to destination airport. If you are not flying a direct route, they will often have to update your position in the system to make the automated handoffs between facilities work properly, and they may as well use your actual route.

If you are asking how to inform the controller that you will not be direct to your destination, see this question and my answer to it.
Comment: probably just a typo, but with implementation of RVSM vertical separation (FL 290-410) is 1000 feet now (with limited exceptions).
Answer: When you call ATC requesting VFR flight following/advisories just advise the controller of your planned route of flight. Assuming there is no conflict with other traffic or airspace you should be able to fly the route of your choice.
If the controller determines that your route of flight (or a portion of your route) would conflict with other traffic or airspace he/she will let you know and provide alternate instructions accordingly.


Batel b'shisim on a large scale

Question: Suppose someone is making a huge 50-gallon vat of cholent. Accidentally, an entire bag of milk breaks and spills into the cholent. There is more than 60x as much meat cholent as there is milk, so the milk should theoretically be batel b'shisim. But does the fact that a non-negligible amount of milk fell into the pot (as opposed to a couple of drops into a smaller pot) change anything?
Comment: If you see the milk then it's definitely not nullified
Comment: The answer is in Ran Avoda Zara. If one of the goals of the bitul is to take advantage of the added amount of food, there is non negligible amount of isur. So the question is this?
Comment: @DoubleAA, I think (an unspoken) part of the question is, does that spill _eventually_ become absorbed and nullified?
Comment: @Daniel If you still remember, can you explain what is the specific cavana of the question, there are 3 answers d/t 3 understanding of the question
Answer: The Rambam (MT Ma'achalot Asurot 9:10) writes

If the milk fell into the sauce or onto all the pieces and
  it was not known on which piece [the milk] fell he should stir the
  entire pot so that all its contents will be mixed [thoroughly]. If
  the flavor of milk [can be detected] in the entire pot, it is
  forbidden. If not, it is permitted. If a gentile to taste [the pot]
  whom we can rely on cannot be found, we require a measure of sixty
  whether for meat in milk or milk in meat. If there is one measure in
  sixty, it is permitted. If there is less than sixty, it is
  forbidden.

See also the SA YD 92:2 and here for further details.
Therefore mixing the pot up to the point that the milk is dissolved into the mixture is enough to make the cholent kosher as long as there was 60 times the quantity of milk and if you cannot identify the milk anymore.
I confirmed with R Binyamin Tabady and R Yonathan Jessurun that this can be indeed relied upon in practice but of course, consult your rabbi
before implementing anything you learn here.
Comment: +1 because the din is true despite I don't understand the specific link with great amount, that the question have an hava amina to be different
Comment: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/89765/discussion-between-kouty-and-mbloch).
Answer: I will try to redefine the question. Generally Halacha tells about a drop of milk that falls in a pot of meat.e.g. Mishna Chullin 8, 3:

ח,ג  טיפת חלב שנפלה על חתיכה--אם יש בה בנותן טעם באותה חתיכה, נוער (יש גורסים ניער, וזה מדגיש דווקא בדיעבד ועיין ערוך השולחן סימן מ''ב סעיף ט''ז סיכום יפה של הנושא של ביטול איסור לכתחילה במקרה זה) את הקדירה; אם יש בה בנותן טעם באותה הקדירה, אסור.

In such a case we must not evaluate if the quantity added by the isur leads to a gain. So the bitul is only done to avoid a loss.
But when the quantity of isur actually present in the pot is valuable, e.g. it adds a piece to the meal, is it permitted to eat the extra piece of Tshulent.
There is halachot about this when solid pieces of Isur are mixed with Heyter, e.g. Teruma 5, 7:

ה,ז  סאה תרומה שנפלה למאה, הגביהה ונפלה אחרת, הגביהה ונפלה אחרת--הרי זו מותרת, עד שתרבה תרומה על החולין

A din for Teruma, to extract the same quantity from the mixture.
See Chullin 100a, see SA YD 109.1.
But here, the milk is allowed 100% because it's not able to give a perceptible taste in the meat (to prohibit we need taste of milk in the meat and taste of meat in the milk. See Chullin 111a). So, paradoxally we have allowed milk in the pot and allowed meat, even if the quantity of milk is great, there is no hanaa from bitul Isur, because no prohibited foods have ever been present. (This is different conceptually from the case in which a non Casher meat was annulled. See here the explanation of the Mahari Ben Chaviv).
See Gemara Chulin 108a, and Rashi paragraph "Amar Leh Rava".
Comment: I'll be happy to understand If something is wrong in my answer, there are two downvotes, but I am not able to add a correction.

Batel b'shisim on a large scale


space of reduced positive definite quadratic forms

Question: What is the highest dimension for which the space of reduced positive definite quadratic forms (or the fundamental domain of $SL_n(\mathbb{R})/SL_n(\mathbb{Z})$) has been explicitly calculated? I know it's been done for $n \leq 7$ in 1970's. Has there been any progress since then? If not, is it because there is some sort of difficulty, or because, although the computation is very much possible in practice, people thought it's not worth the effort?
Comment: If I understand the question correctly, the advent of the LLL algorithm made progress on Minkowski reduction less relevant. Though now HKZ and BKZ reduction are cropping up. I only recall Tammela reached $n\le 6$ in "On the reduction theory of positive quadratic forms." http://link.springer.com/article/10.1007%2FBF01117520 Sorry, here's the $n=7$ result http://dx.doi.org/10.1007%2FBF01213893
Answer: I very much enjoy Douglas Grenier's "Fundamental Domains for the General linear group", Pacific J. of Math., Vol 132, 2, 1988, wherein fundamental domains $F_n$ for the symmetric spaces $S_n \simeq SL(n,R) / SO(n)$ of $n \times n$ positive definite unimodular symmetric matrices are constructed inductively. That is, $F_n$ is constructed from $F_{n-1}$. The usual Minkowski reduction does not permit such an inductive description. One could therefore, in principal, see for oneself how to push the known results forward. Grenier presents an algorithm in his paper for reducing an arbitrary element in $S_n$ to his fundamental domain $F_n$, and the difficulty of pushing a fundamental domain for $S_7$ onward to $S_8$ may perhaps be phrased in terms of computing time of MAPLE or OCTAVE.
The basic element in Grenier's paper are modified Iwasawa coordinates on $S_n$. Instead of the usual Iwasawa coordinates $KAN$, where $AN$ is the identity component of an $R$-split Borel subgroup of $SL(n,R)$ and $K$ of course being $SO(n,R)$,  Grenier works relative to an $R$-split maximal parabolic subgroup $P$, namely the stabilizer of a single $1$-dimensional flag. Of course one knows that $S_n$ is a homogeneous $P(R)^o$-space, and it is an interesting point to determine exactly global bijective coordinates for $S_n$ relative to a connected maximal $R$-split torus of $P(R)^o$ and the unipotent radical of $P(R)^o$.
Now my own opinion (which is negligible) is that one does not want an explicit description, even if one wants an explicit description. Any explicit description is necessarily so explicit and complicated as to be totally useless. More seriously, I don't think there is any question about the action of $SL(n,Z)$ on $S_n$ which requires a fundamental domain to be constructed. The finite presentation of $SL(n,Z)$, finite covolume, etc., can be achieved many other ways. E.g. via the Borel-Serre bordification or Siegel sets (coarse reduction theory) a la Borel/Harish-Chandra. In short, fundamental domains for $S_n$ relative to $SL(n,Z)$ are (to me) totally fictional and useless.
Answer: In the Lecture XV from Siegel's "Lectures on the Geometry of Numbers" is written that the volume of fundamental domain $SL_n(\mathbb{R})/SL_n(\mathbb{Z})$ is something like
$$\frac{\zeta(2)\zeta(3)\ldots\zeta(n)}n.$$


Is there a website where i can just sell drawings?

Question: I am 17 years old and wanted to find a way to make money from my anime/realism drawings. I'm kinda looking more for a website torward startup game designers who just need a drawing done and are willing to pay. Is there a website like that?
Ive went to "outsource.com" but i've seen a lot of reveiws saying that its a scam and i feel like its almost impossible to get a sale on websites like "fineartamerica.com"
Answer: Besides DeviantArt, as mentioned by @Roozbeh, there are two more that I have personally used before and therefore recommend -
Artsy - A massive, venture-funded online gallery that sells art from thousands of artists from all over the world.
Artpal - Fast-growing (and free) gallery to sell art and buy art. No membership fees. ArtPal is completely free. You receive between 95-percent and 100-percent of the sale price when they sell your art.
Answer: DeviantArt.com and artists groups in Facebook.com
I haven't tried selling my art in these, but I have done some collaborations.

In DeviantArt you can have your own private webpage with your own touches, contributing prints and selling copies and files are a good way to make money. Also, collaborating with groups and the community may help your profit grow. Signing up is free and you can get core-member status if you found it suits your needs. I suggest you give it shot!
On Facebook you can join groups to introduce yourself. gather and notify people about your social events, like galleries, sells, new works, new skills and a lot more.


Cockroach brain functional anatomy

Question: In insects like the cockroach the brain is distributed, i.e. some parts lie in the head and some in the abdominal cavity. Which part is responsible for controlling locomotion?
Answer: Technically speaking, locomotion is actually not produced by the brain in cockroaches; there are neurological controllers in the legs themselves which produce locomotion even when contact with centralized nervous system is severed.
I include this for reference, because it was not explicitly stated in your question.  However, I believe it was intended to be implied by the phrase "responsible for controlling."  In other words, from my understanding, you're more interested in what section of the brain actually controls those actions in a normal cockroach.
From Central Nervous Control of Cockroach Walking by Charles R. Froutner, you can see even just in the abstract that the movements became spontaneous when the connection with the segmental ganglion was broken, showing that this is very likely where the control is exerted.  (The segmental ganglion, for reference, is a part of the dorsal "brain" you made reference to.)
Comment: What is meant by "spontaneous movement"?
Comment: @AmitMaurya, from the article referenced: "rhythmic motor patterns, similar to those occurring during normal walking."
Comment: Ultimate control has to come from ganglion residing in head,  which receives sensory information from eyes and antennae about obstacles and terrain.
Comment: Shouldn't the locomotion after disconnection from segmental ganglion be in random direction?
Answer: Just to be clear, the brain is not distributed, it is the thoracic ganglia present in thorax that aid an arthropod for different tasks.
Arthropods have most of their sensory stimuli and motor actions controlled by Midline Brain Neurophils, called Central Complex (CC)
Quoting Journal of Experimental Biology >>

Previous studies have also linked the CC to motor actions. Huber
  showed that stimulation within the CC enhances locomotor activity
  (Huber, 1960). More recently, electrophysiology studies showed that
  the neural activity of some CC units is correlated with, and often
  precedes, changes in stepping frequency.

Cockroach brain functional anatomy


In-batch Random Negative Sampling

Question: I'm trying to train a recommender model using In-batch Random Negative Sampling as described in the following paper: https://arxiv.org/pdf/2102.06156.pdf. I'm having a bit of difficulty wrapping my mind around the authors' method. In particular, this sentence "We chose to sample 3000 negatives for each positive item, and use 600 as our batch size". Does this mean that in each batch, there are 600 randomly selected positive examples, and 3000 negatives for each positive? Or rather there are 600 pairs of negative and positive, where the positive is a single example randomly selected from 3000 possible negatives for that particular positive example?
Answer: From your words, I guess the authors mean that each sample is formed by 3000 negatives and 1 positive, and so each batch is formed by 600(3000+1) examples.
Indeed, the authors write that positive dataset is formed by 10 millions of items, while the negative dataset is formed by around a billion of items, so they form a sample with 3000 negatives and 1 positive, and to maximize the GPU capacity they raise the batch size to 600, so they train a lot of examples in a batch.
Comment: I'm not sure then how this corresponds to "in-batch sampling"
Answer: The authors mean that in each batch, there are 600 pairs, where each pair consists of one positive example (selected randomly from the set of positive examples) and 3000 negative examples (selected randomly from the set of negative examples for that particular positive example).
In other words, they used a total of 600 pairs (300 positive and 3000 negative examples per positive item) for training the neural network model.
Answer: In the paper you mentioned, the authors are using In-batch Random Negative Sampling (IRNS) for training a recommendation model. IRNS is a technique for training recommender models using negative sampling to improve model performance. Each training instance in the batch consists of a positive item and a negative item. The positive item is the item that the model should recommend, and the negative item is an item that the model should not recommend. In IRNS, the negative item is randomly selected from a set of candidate negative items.
To answer your question,

We chose to sample 3000 negatives for each positive item, and use 600 as our batch size

The authors' statement means that for each positive item in a given batch, they randomly sample 3000 negative items to use for training. So, for a given batch size of 600, there will be 600 positive items, each paired with 3000 negative items, resulting in a total of 1.8 million training instances (600 x 3000) in the batch.
To clarify further, each batch consists of 600 training examples, where 300 of these are positive examples (i.e., items that the user has interacted with, such as viewed or purchased) and 300_10 = 3000 are negative examples (i.e., items that the user has not interacted with). For each positive item, the authors randomly select 10 negative items (from the pool of 3000 negatives) to pair with the positive item, resulting in a total of 300_10 = 3000 negative examples in the batch.
So, in each batch, there are 600 training examples, consisting of 300 positive examples and 3000 negative examples (10 negatives for each positive). The 300 positives and 3000 negatives are randomly sampled for each batch, so the specific examples included in each batch will be different each time the model is trained.

In-batch Random Negative Sampling


Is my plumbing drain/vent setup ok?

Question: I'm new at plumbing, working on installing a master bath in our house. Pictured is the room with the shower pan in place, a vanity drawn where that will go and you can see the toilet flange sitting in between where the toilet will sit. Does the setup I've drawn look correct? Are there any mistakes that I need to change or a better way of doing anything. Under the room is unfinished basement. My cleanout needs to be pretty close to the toilet. I can't move it further left past the shower as there is a block wall there.
Comment: You may not need that cleanup there. I think a toilet opening "counts" for the same purpose. If you want to have a cleanout there because you have good access from the basement that is fine.
Comment: Shower drain may not get adequate air. Can you tie a vent stack from it to the toilet stack?
Comment: Hello, and welcome to Home Improvement. Nice diagram!
Answer: I don't know where you are located and plumbing terminology can vary by region, however, the typical method to plumbing a single bathroom would be to use a 'wet vent'. I've discussed wet vents in this previous answer, which includes a full definition as well as the components of a wet vent.
One condition of a wet vent is that the toilet needs to be the last fixture connected (or be connected via a symmetrical fitting). Here's the reworking of your sketch as a wet vent with the toilet as the last fixture:

The portion highlighted in red is the wet vent. This section of pipe will drain the sink as well as allow air to pass through and vent both the shower and toilet. With this configuration, you do not need the second vent at the end.
As others have mentioned, the cleanout at the end is optional, as the removal of the toilet will act as a cleanout for the line.
Comment: I'm located in PA. I saw your previous posts and they were helpful but I think I misunderstood the toilet being last. So would this be correct? >> https://imgur.com/ROoV89D
Comment: @JAdamKirkpatrick Yes, that looks correct.

Is my plumbing drain/vent setup ok?


any one know how to implement a moran process in evolutionary game?

Question: this is a article of http://www.mathematica-journal.com/data/uploads/2011/05/Voelkl.pdf, but I still have little idea how to transfer it into the java code?
Answer: The Moran Process of selection is not that hard. You select a particle with a probability of selection proportional to its fitness (there are several papers that talk about this but you can look up "Emergence of cooperation and evolutionary stability in finite populations" by Matin A. Nowak).
Once you have picked a particle for reproduction the total number of individuals have increased by one (N+1). You need to maintain the population at N so you pick a particle, randomly, to kill.


Simultaneous diagonalization of bilinear form and a linear transformation

Question: Suppose that $V$ is a finite dimensional $\mathbb R$-vector space, and $A\in M_n(\mathbb R)$, given $T:V\rightarrow V$ a linear transformation and $f:V\rightarrow \mathbb R$ a bilinear form, and $\alpha$ a basis where the matrix representation of $T$ and $f$ is $A$. Is true that if there is a basis $\beta$ where $f$ is diagonal, then $T$ is diagonal in this basis too?
I thought that if $P$ is the basis change matrix from $\beta$ to $\alpha$, we have $D=P^{-1}AP$ in this basis, and $D$ is the representation of $f$ and $T$ in $\beta$. Is this right?
Thanks in advance.
Answer: Hint:
$$ A = \begin{bmatrix} 0&1\\ 4&0\end{bmatrix}. $$


Is there an inverse function to jQuery serialize?

Question: I can write something, I'm asking if something is already built into jQuery.
Comment: There might be, but it depends on the context of your problem, which you haven't told us. What are you trying to do?
Comment: Maybe this helps: http://stackoverflow.com/questions/901115/get-query-string-values-in-javascript
Comment: Thanks I was just trying to be lazy.. I just never understood hwy make a convenient functions and not provide the inverse.. cheers :)
Answer: Short Answer: No, there isn't something built into jQuery to do this. Not sure why not...
But here is a jQuery plugin that should do the trick if you are using .serialize() to get a serialized string:
$.fn.deserialize = function (serializedString)
{
    var $form = $(this);
    $form[0].reset();    // (A) optional
    serializedString = serializedString.replace(/\+/g, '%20'); // (B)
    var formFieldArray = serializedString.split("&");

    // Loop over all name-value pairs
    $.each(formFieldArray, function(i, pair){
        var nameValue = pair.split("=");
        var name = decodeURIComponent(nameValue[0]); // (C)
        var value = decodeURIComponent(nameValue[1]);
        // Find one or more fields
        var $field = $form.find('[name=' + name + ']');

        // Checkboxes and Radio types need to be handled differently
        if ($field[0].type == "radio" || $field[0].type == "checkbox")
        {
            var $fieldWithValue = $field.filter('[value="' + value + '"]');
            var isFound = ($fieldWithValue.length > 0);
            // Special case if the value is not defined; value will be "on"
            if (!isFound && value == "on") {
                $field.first().prop("checked", true);
            } else {
                $fieldWithValue.prop("checked", isFound);
            }
        } else { // input, textarea
            $field.val(value);
        }
    });
    return this;
}

(A) The reset at the top is optional. You may want to reset the field values first, or may want to clear them using something like this: https://stackoverflow.com/a/6786237/1766230
(B) See https://stackoverflow.com/a/24417399/1766230 for why we need to replace +.
(C) See Mozilla Developer Javascript Reference for info on decodeURIComponent.
(Note: If you're using .serializeArray() or some other way to serialize your data, the above won't work; you may find some of these solutions useful: jQuery plugin to serialize a form and also restore/populate the form?)
Boring usage example:
var $form = $('form.myFormClass');
var s = $form.serialize();
$form.deserialize(s);

Here's a jsfiddle that let's you play around with setting values, clearing, resetting, and "deserializing": http://jsfiddle.net/luken/4VVs3/
Comment: Great fiddle thank you for taking the time to make/link that.
Comment: This fails on inputs with square brackets in the name attribute like ``. Use `'[name="' + name + '"]'`instead, to support inputs like this.
Answer: No there is not.
How would you know which DOM element to change? There could be the same elements with the same name in different forms etc'.
Maybe parseJSON will help you:

jQuery.parseJSON(json) Returns: Object
  Description: Takes a well-formed JSON string and returns the resulting JavaScript object.
Comment: _"No there is not, and can't be"_ - sure there could be. Just call the (proposed) `deserialize()` method on a particular form and the values would go back to that form. If there's more than one element with the same name these should be set in order from the duplicates in the serialised version (the reverse of what `.serialize()` does). I've successfully used such a function on multiple projects (not with jQuery), but it is up to the programmer to make sure the selectors are right...
Comment: Thanks... jQuery.serialize uses the name attributes to serialize the element and the value. That is besides the URI encoding and packing. The process reverses fairly easily. I'm new to javascript ad jQuery, I just thought I was missing something in the doc. I'll have to bite the bullet and move to json
Comment: @nnnnnn. You're right, there could be an unsafe version of it. But jQuery (as much as I am aware of)has zero unsafe functions. He can write the first one if he like to...
Answer: Here is :
a=$('.price_analysis input').serializeArray();
aa={};
for (var i in a) {
    aa[a[i].name] = a[i].value;
}
alert( JSON.stringify(aa));


Linux software to query the Skyhook database

Question: I'm a Ubuntu user. I'm looking for some software which will query the Skyhook database with the MAC addresses of all the Wi-Fi hotspots in range of my computer and display the results. I'm looking for something I can install on my machine. Code samples would be good too.
Answer: http://www.skyhookwireless.com/developers/sdk.php
http://loki.com/how


Can i define in the persistence.xml two database?

Question: I'm working on an application in Java EE. I must use two database ,how can I define two database in my persistence.xml?
Thank you in advance for your suggestions
Answer: Create another persistence-unit in your exisiting persistent.xml and give it a different name. Then create another entity manager depending on newly added persistent unit.


Sigma's for Sony can be calibrated with Sigma Docker. What about Sony lenses?

Question: So, I am so confused on this topic, as I can't find an information anywhere. Sigma 3 years ago introduced amazing tool - Sigma Docker that allows without having special equipment or extraordinary skills, to re-calibrate to 'fail-focusing' Sigma lenses (this is especially important for 85mm F1.4 ART, where even if focus goes to 'nose' instead of 'eye' we can already see that).
But Sigma lenses are much more heavier than Sony's lenses. An Sony has 100mm E-mount lens that is probably twice lighter than Sigma's 105mm F1.4 lens that even have the 'mouting socket' for tripod (which says that it is way to heavy for regular holding in hands if photographer is not a 'body-builder').
So how i.e. does Sony 100mm lens for E-mount is callibrated? Is is still old-way that we have to send it to 'service' and they do have laboratory, draw lines on sheets of paper etc., and do the adjustments with screwdriver?
Comment: **TLDR; please clarify your question**...There seems to be a lot of extra, unnecessary information in your question - causing your question to become muddled. Are you asking how to calibrate a Sigma lens destined for a Sony E-mount camera? Are you asking if the E-mount can handle a heavy lens? Are you asking if special calibration is necessary when using heavy lenses? Are you asking how to calibrate a Sony E-mount lens? You've used tags destined for editing (color-management/display-calibration) - why? Are you asking how calibration affects color?
Comment: @MichaelC not obvious to me at all
Comment: The two calibration tools they use might be the stock shelf and the junk bin :)
Answer: The Sigma dock only works with select Sigma lenses. The lens needs to have the needed firmware to respond to the commands sent by the dock. Even Sigma lenses that are not part of their 'Global Vision' selection (ART, Sports, Contemporary) can not be calibrated using the Sigma USB dock.

So how i.e. does Sony 100mm lens for E-mount is calibrated? Is is still old-way that we have to send it to 'service' and they do have laboratory, draw lines on sheets of paper etc., and do the adjustments with screwdriver?

Since all Sony E-mount cameras are mirrorless, there's not much need for the type of calibration done by Sigma's dock for lenses used with reflex cameras that have a separate PDAF sensor. Because mirrorless cameras use the main imaging sensor to do contrast detection autofocusing, there should be no focusing errors attributable to different optical distances between the AF sensor and the imaging sensor. After all, it's the same sensor used for both.
If a Sony E-mount lens is not focusing properly with an E-mount camera, the issue is beyond the scope of what the Sigma dock allows the end user to do with certain Sigma lenses. So yes, one would need to send the lens to an authorized Sony service center and have it checked out. How they do that is probably a bit more sophisticated than "draw lines on sheets of paper etc., and do the adjustments with screwdriver?"