track outbound email from apex class

Question: I have a lookup from Case to Lead. Whenever a new Case is created if the contact field is not filled for the record , it sends an auto response mail to the corresponding Lead. I did this using trigger. How can I track the email in the activity history of the respective case?
Comment: case auto response rule works fine, but it sends the response message only to contact, not to lead
Comment: If you are sending the email using a trigger, then you should be able to create an Activity record for the case using the trigger as well.  Where are you getting stuck?
Comment: from what I understand from my part of research on this is that Activity history is read-only. To solve the issue, I had to make a visual force page and add it to the case layout
Answer: I made a Visualforce page that uses the standard controller tag referencing the case object and added the page to the case layout. this was fine enough.

track outbound email from apex class


How will EOS integrate with Steem Blog system?

Question: Dan Larimer mentioned EOS would integrate with Steem blog system. How would that work and what is the purpose of it?
Answer: No specification was published about how it will work yet.
However, Steemit + Steem is fundamentally enabled by a particular set of features, including feeless transactions, high TPS, uncapped supply, observer auditability through on-chain operations, and a degree of censorship-resistance.
Due to the architectural similarities shared by EOSIO and STEEM, all these features can be natively used in EOSIO. Thus, a Steemit-like application may be implemented as its own EOSIO-based chain, as a side-chain to another EOSIO blockchain, or as a non-native token to an already existing EOSIO chain.
Answer: EOS generalized the application specific features in Steemit and bitshares ,say account names , feeless. etc .
At user stand point it's just sidechain with native tokens.
At develpoer perspective its boon, developer can redirect for account creation to Eos dan project.just like Dtube ,Dmania,
busy did.


How true to knowledge is this representation of fictional (CGI) dinosaur behaviours?

Question: In the Disney film Dinosaur (2000), how true to knowledge is the representation of the dinosaurs' behaviours? Does the film try to be true to knowledge, or is it mostly guesswork or exaggeration?
Comment: What do we know about dinosaur behaviour?
Comment: They haven't yet finished arguing over whether they had scales or feathers, let alone what their daily behaviour was. Early examples from 250 million years ago had scales, but feathers were around 180 million years ago, so there's a reasonable chance things like velociraptors did actually have feathers… making all modern movie & museum representations completely wrong …and who knows? maybe they did talk ;)
Comment: I know this is a Q about behaviors, but when I saw "dinosaur raised by a family of lemurs" in the synopsis I LOL'd
Answer: Disney spent an enormous amount of money on the CGI.  Taken directly from the Wiki:

Having aspired to be a paleontologist, David Krentz supervised the
character design and visual development teams.

Also taken from the Wiki, with regards to Disney's decision to make the dinosaurs talk:

Ebert wrote, "An enormous effort had been spent on making these
dinosaurs seem real, and then an even greater effort was spent on
undermining the illusion".

Both statements come from cited sources, so the information is legitimate.
Having an aspiring paleontologist supervising the characters, coupled with Ebert's statement of "making these dinosaurs seem real", I'd say they probably worked off of as much knowledge as they had available to them.
Comment: Which is to say not much at all. After all, I'm an aspiring F-1 driver...
Comment: Making dinosaurs 'seem real' is a lot different than making them 'be as representative of real dinosaurs as much as our current knowledge permits us', though. Of course, it's an animated family film by Disney, and representation was never their strong suit.
Comment: Ebert is a film critic and has, as far as I'm aware, no special knowledge about the film other than what he saw on the screen. I'm not sure why you've bothered to quote him or feel that he knows more than any other person that wasn't involved in the making of the film.
Comment: @Valorum - Did you really just assume that a film critic of Ebert's stature just sits in a theater and reviews films without the ability to interact with studio execs, directors or any other people involved in the making of films??
Comment: @JohnnyBones - Are you possessed of the opinion that Ebert would take the time contact the execs of a studio or the director of a children's film just to get background for a two-paragraph film review? A review which I might add contains no evidence of any special insight whatsoever.
Comment: @Valorum - You're right.  Why would anyone want to be thorough in their job.
Comment: @JohnnyBones - Let me put it to you another way. If he'd done any of the things you've suggested (speaking to studio execs, directors or any other people involved in the making of the film) why would his short review be [entirely absent of any special insight](https://www.rogerebert.com/reviews/dinosaur-2000)? Is he incompetent?
Comment: @Valorum I'm not sure about Ebert's competence (or lack of), but I *am* sure that he suffers from an abundance of mortality, so why are we all referring to him in the present tense?
Answer: An article on Cinema.com gives an extensive overview of the expertise that Disney brought to bear on this film. In short, they hired top scientists to brief their animators as well as giving them access to concept art, rough sketches and finished footage to ensure the accuracy of their work.

Although many liberties were taken in portraying some of the
characters, the directors and animators did a considerable amount of
research and met with some of the top experts in their field. Jack
Horner, a noted paleontologist from the Museum of the Rockies, visited
the Studio on several occasions and lectured to the "Dinosaur" team.
Leighton also spent time at Horner's Museum in Bozeman, Montana where
he laid out the actual bones of a 100-million-year old Tenontosaurus
(an animal similar in form to an Iguanodon) to get a sense of how the
bones and muscles were connected and how that structure would affect
its movements.
Dinosaur expert Don Lessem, a respected author and museum consultant /
designer, also provided valuable information to the creative team.
Stuart Sumida, a top paleontologist / biologist from Cal State San
Bernardino, lectured the artists and animators on dinosaur locomotion
and anatomy. The directors and several of the supervising animators
also visited a local animal reserve to ride elephants and study their
massive structures as reference for how a prehistoric creature might
move.
Dinosaur : Production Notes

Referencing the artbook Dinosaur: The Evolution of an Animated Feature, several of the senior crew had amateur experience of palaeontology.

For David Krentz, a lifelong dinosaur fanatic, designing prehistoric
animals was a dream come true. He recalls, "When I heard they were
making a film about dinosaurs, I begged and kicked and pleaded until I
got on it. Even before they hired me to work on the show, I'd bring
material over and make suggestions about the design. I took a crack at
designing the main character and gathered a lot of attention."
"We had to walk a really fine line between reality and caricature," observes Krentz. "It was important to remember that these were characters first and foremost. Dinosaur facial muscles tend to be minimal so we had to take quite a few
liberties. In the case of Aladar and the other Iguanodons, we threw in
some horse facial muscles. We also added eyebrows and mouth shapes to
help make them more expressive. There was a big debate for awhile
about beaks or lips and we eventually settled on the latter. We ended
up putting lips over the beak. Body-wise, the Iguanodons are pretty
close to reality and the musculature is essentially accurate. They
actually had a bone in their eyebrow."
In terms of accuracy, the herd members range from "bang-on" (e.g. the
Ceratops) to loose caricature (e.g. Eema the Styrachosaur). Included
in the group of over 30 species are some that have never been seen on
film before, including the Microceratops and the Ankylosaur (Url).
Krentz describes his assignment on the film as "probably the most
Nirvana-like experience that I'll ever have in my life. For three and
a half years, they paid me to draw dinosaurs. It was just a dream come
true to be able to bring dinosaurs to life. My mother still can't
believe it. My career choices were paleontologist or animator. This is
the best of both worlds. It was so much fun to work on that I couldn't
wait for Christmas vacation to be over so I could get back to work."

Disney pushed for the film to be more 'kid friendly' with the inclusion of talking dinosaurs and mammal cast. Krentz in particular was not happy about this development

Krentz was put in a difficult position on Dinosaur. He had pushed,
pleaded, cajoled and threatened his way onto the Dinosaur team, due to
his lifelong obsession with dinosaurs and their physiognomy. Now he
was being asked to alter what fossil evidence had revealed to science
about the actual creatures.
"I just had to get over the idea that these are dinosaurs. They
aren't," Krentz says. "They're characters. There's walking the line,
and there's going over the line. We had to walk the line. They had to
be believable as animals and interesting as characters. In order to
make them read as characters, we really had to push things. And that
meant making them very inaccurate dinosaurs."
Dinosaur: The Evolution of an Animated Feature


SQL Server login for other domain user with the same name

Question: Due to some circumstances I had to dis-join from the domain Windows Server 2012 R2 based machine with SQL Server 2014 Business Intelligence Edition installed . Let's call it 'mydomain.local'. Then I totally reinstall AD DS role on domain controller machine and re-create domain 'mydomain.local' from scratch. After that SQL Server machine was joined again to the "new" 'mydomain.local' domain. Now I try to connect to Database Engine with SSMS as 'mydomain\Administrator' and receive an error:

Cannot connect to SQLSERVER.
  ADDITIONAL INFORMATION:  Login failed
  for user 'mydomain\Administrator'. (Microsoft SQL Server, Error:
  18456)  For help, click:
  http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476

Error 18456 has several states that can be viewed in SQL Server Error Log and it's State 5 in my case. Error states explanation is given here.
I still can login onto SQL Server as local administrator. I understand that the reason of the issue is that 'new' login having the same name has different sid. And I think I should drop login 'mydomain\Administrator'  and the re-add 'new' login and assign sysadmin role to it. But dropping the login is also a problem because of:

Login 'mydomain\Administrator' owns one or more database(s). Change
  the owner of the database(s) before dropping the login.

Of course I can change database ownership to, for example, local administrator and switch it back after re-adding login for domain user. But I'm curious are there any smarter ways to substitute 'old' domain login with a 'new' one?
Answer: There's probably a way to "hack" sys.syslogins, but I wouldn't recommend trying.  It would probably be easier to just recreate the account.


Using a Salesforce Campaign as Entry Source on Journey builder

Question: I have configured Marketing cloud and connected it to a production Org, now I'm trying to create a journey that receives the Campaigns from Sales Cloud in the org and uses them as the data entry, however, when I select the Salesforce Data -> Salesforce Campaign option, it doesn't show any Campaign, and I now for a fact that there are active campaigns in the Org , I don't know if I'm missing some configutation step, I've verified that the user that connects both cloud is a Marketing user, my question is, how do you set up the Salesforce Campaigns to be the data entry source for a Journey in marketing cloud?
Answer: It's possible your user is not correctly integrated.
In Marketing Cloud, go to Setup > Users and find your Marketing Cloud username.
Click on the username and then on Salesforce.com Status
The click on "Integrate" and Enter in your Salesforce.com Username (your Sales/Service Cloud username) and click on Save Settings
More info here: https://help.salesforce.com/s/articleView?id=000354555&language=en_US&r=https%3A%2F%2Fwww.google.com%2F&type=1
Answer: Instead of selecting the Salesforce Campaign icon in the middle select the Salesforce Data icon on the right.  We use these to great success for all objects, campaign, lead, etc.
In the next screen search for Campaignmember in the search bar.  Most likely you'll want a Campaign Member object driven Entry event.  (If you are not seeing any objects in the search bar to @zuzannamj point it's a connector issue)
In the next screen select the recipient whether it's the User or Contact/lead.
In the next section, Entry Criteria, typically you'll want to select Is Created and Is Updated.  That will open up the fields section below.  Search for the field "Campaign ID".  Drag that field over to the Filter canvas area.  Select Equals as a modifier (usually the default), paste in your campaign ID from SF CRM (usually starts with a "7") and wait a second as it will pull up the campaign in the UI, select the campaign.
Add any remaining filters in the Entry Critera.
Add any additional object filters in the Filter Criteria (Related Object Criteria)
Add any data fields in the Entry Data needed to personalize your content or for logging.
And you should be good to go.  Please share any other issues.


Why concept of proper cone is important in convex optimization?

Question: I'm reading Convex Optimization from Prof. Boyd and I got some question on the important usage of proper cone in convex optimization. Other than generalized inequalities, is there any other use of proper cone in convex optimization?
Comment: I don't know why this question would be downvoted, because it's an interesting question and I hope there are some good answers.  A simple answer is that we can't define a "second-order cone program" (SOCP) or a "semidefinite program" (SDP) without first knowing what the second-order cone is and what the positive semidefinite cone is.  And SOCPs and SDPs are very important in convex optimization, for two reasons: 1) Efficient algorithms are available to solve them; 2) Many practical problems can be formulated as SOCPs or SDPs.
Comment: The question should state the definition of a proper cone, but I checked and in Boyd and Vandenberghe a "proper cone" is a cone that is closed, convex, solid (nonempty interior), and pointed (does not contain a line). I guess these are the properties you need when defining a generalized inequality.
Comment: The point of the proper cone is that it defines an order $\le$.
Comment: The word proper had various meanings when it comes to cones.
Answer: A standard form linear program (LP) is an optimization problem of the form
\begin{align}
\text{minimize} & \quad c^T x \\
\text{subject to} & \quad Ax = b , \\
& \quad x \geq 0.
\end{align}
If we express the constraint $x \geq 0$ as $x \in \Omega$, where
$\Omega$ is the nonnegative orthant (which is a closed convex cone), then we can see a way to generalize the standard form LP to a larger class of problems.  A "cone program" is an optimization problem of the form
\begin{align}
\text{minimize} & \quad \langle c, x \rangle \\
\text{subject to} & \quad Ax = b , \\
& \quad x \in C,
\end{align}
where $C$ is a closed convex cone.  (Now $C$ does not have to be the nonnegative orthant.)
There are two especially interesting cases:
1) $C$ is a second-order cone, or more generally
$C = C_1 \times \cdots \times C_m$
where each $C_i$ is a second-order cone.  In this case, our cone program
is called a "second-order cone program" (SOCP).
2) $C$ is a positive semidefinite cone, or more generally
$C = C_1 \times \cdots \times C_m$ where each
$C_i$ is a positive semidefinite cone.  In this case, our cone program is called a "semidefinite program" (SDP).
Why are these two cases especially interesting?  For two reasons:
1) Many practical problems can be expressed as SOCPs or as SDPs.  (See the Boyd and Vandenberghe textbook for many examples, as well as tricks for expressing convex optimization problems as SOCPs or SDPs.)
2) Efficient algorithms (interior point methods) for solving linear programs can be generalized, yielding efficient algorithms for solving SOCPs and SDPs.
And what is so special about the second-order cone and the positive semidefinite cone that makes it possible to solve them so efficiently with interior point methods?  It has to do with the fact that these cones, like the nonnegative orthant, are "self-dual" and "symmetric". But hopefully somebody else can provide more details about this point.  One good reference for this material is the lecture "Symmetric cones" in Vandenberghe's 236c notes:
http://www.seas.ucla.edu/~vandenbe/ee236c.html
Another viewpoint is that if we want to develop convex optimization theory in the setting of a real inner product space, we must figure out what the statement $x \leq y$ should mean. And this leads us to discover the concept of a convex cone.
Comment: Thank you for a clear explanation. I think in the book there is an explanation for why second-order cone and positive semidefinite is self-dual.


UAC is popping up after each login. How do I discover what's wrong and fix it?

Question: I have an almost new PC running Win7 Home Premium. On each successful login I get a UAC popup asking for permission to "modify content on the disk" on behalf of the Windows Control Center. Any clue on how I can diagnose what's the problem and hopefully fix it?
Answer:
Check the event log for anything from the Windows Control Center, to try to see what it's doing.
Download Autoruns.exe from Sysinternals and run it, then clear any checkbox from Windows Control Center. (I'm not sure what that is, by the way. Windows Control Center I mean. That's not good.)
Comment: Maybe I'm begin naive here, but isn't Windows Control Center (or Command Center, can't recall) a piece of windows? The thing that keeps complaining about backups not being scheduled etc. Also, the UAC says it's code signed from Microsoft, so I'm not _that_ worried.
Comment: @agnul I'm always willing to be wrong. :) I'm running Windows. How do I access the Windows Control Center / Command Center?
Comment: Now you're making me nervous :-) I've just checked, it's called "Command Center" and the UAC popup says it has a certificate signed by Microsoft Corporation. It somewhat troubles me that the certificate seems expired in 2011. Some digging in autoruns seems to be in order.
Comment: @agnul Sorry to worry you, I just hadn't heard of it before. A web search shows that it might be someone's product: http://www.bing.com/search?q=%22Windows+Control+Center%22
Comment: Still no idea what it is, but the CLSID in the UAC dialog box seems to be registered to alienware, must be some OEM stuff. (My PC is indeed an alienware one).
Answer: The UAC popup comes from the Alienware software that is automatically started to manage the Alienware specific features of the PC. If you update the Alienware software to the most current version the UAC warnings should go away.
To do this, the update check integrated in the Alienware Command Center didn't work for me - it insisted that the software was already at the most current version. I had to download the new version manually from the Dell support site. First you have to find your PC model under "Support for home users" -> "Drivers and downloads", then you can download software in the "Application" section. The download is called "Dell-Application" and contains the current version of the Command Center utilities.


Intel HD 3000 on MacOS Mojave

Question: I recently upgraded to MacOS Mojave using Dosdudes patcher and have been getting a few graphical anomalies in certain apps. I have included an example. It manifests as large black boxes over certain text or graphical windows/items and it doesn't seem to have much of a rhyme or rhythm  to when or where it appears. Restarting apps and switching from light to dark mode or vice-versa does temporarily fix the issues sometimes.
Answer: This is exactly why Apple made the cut-off for machines that don't support the Metal graphics framework.
You can expect all sorts of graphics glitches if you're trying to run an OS that expects hardware you don't have.

Intel HD 3000 on MacOS Mojave


Battery level sensor

Question: I'm designing a smart bin for my paper and would like a sensor that continuously monitors  the battery level in real time and in percentage value and then sends the data to the administration office.
What sensor can I use? And how can the percentage value be obtained?
Comment: You can use a voltage divider for battery level measurement with a microcontroller. The conversion to % can be done in code. There are lots of projects on internet for the same.
Comment: Could you please tell me one? I was unable to find it.
Comment: Try searching the following term, *arduino battery percentage*. You will eventually find lots of videos on YouTube and tutorials on sites like Instructables.
Answer: The way battery capacity is usually monitored by reading the voltage. You need to look in the datasheet for the voltage span of your battery when it's fully charged and when it's "empty". The battery will never be totally empty but you will define a safe voltage to cut it off as to not damage the battery as indicated in the datasheet, this is your "0" percent.
To get the percentage you would need to calculate it either from the data sheet and the characteristic of the battery or do a measurement of it from full to empty and then estimate the percentage left.
A microcontroller can be used to read the voltage into its ADC port, probably with a voltage divider. Something like an Arduino is a good start. You can then do the calculations in code and send it over something like Bluetooth to an app or your choice of communication.
Below is an example of how you might do it.

simulate this circuit – Schematic created using CircuitLab
Comment: I agree but you you also get more accurate readings with lower resistance. To expand on this I would recommend adding a mosfet as a switch controlled by one IO pin on the Arduino. Then you only need to draw the current for short periods of time.
Comment: If you care about the battery life, I highly recommend using higher resistor values and buffing the input to the ADC (with a voltage follower). As shown, the resistor divider will draw ~8.7mA continuously. With a 2000mAh battery, the resistor divider alone will drain it in 9 days. In comparison, the Arduino draws ~0.2mA when active (according to http://forum.arduino.cc/index.php?topic=5536.0)
Comment: The MOSFET is good idea. I'm curious, why do you say that lower resistance provides more "accurate readings"? If you buf the input as suggested, the opamp will have much lower output impedance than 1 kOhm. And because the input impedance of opamps is insanely high, the current into the inputs is often on the order of low nanoAmps to femtoAmps. I don't see how you could expect more accuracy by having the ADC transient current flow through a 1K resistor.
Comment: An example to this would be an Arduino. It states that to take an accurate sample you should have less than a 10k resistor, anything over this might lead to you seeing cross talk. But there are ways of working around this, like using an op-amp or capacitor. For connecting directly to the ADC from the voltage divider however it seems a resistor in the league of 1-10k is best for accuracy. Of course, depending on the microprocessor used and how the ADC is described in the datasheet.

Battery level sensor


What is meant by the "Yogic Slumber" of Bhagwan Vishnu?

Question: I heard a description of Bhagwan Vishnu which says that the he is in "Yogic Slumber"
What exactly happens in this condition?Please explain "yogic slumber" in detail.
Comment: Become Vishnu - to experience! Certain things are unexplainable! Like, screaming exactly as your first scream or screeching like an Owl with precision.
Human biology is way not enough!
Answer: Padma Purana:UK:175.:

"[Sri Lakshmi said.]: O revered one, You, despite being the sustainer of the world, you being indifferent (passive) towards your glory, are sleeping on this milky ocean, what's the reason behind this?".

"[Lord Vishnu said]: O you of beautiful face, I'm not sleeping, rather, by the vision which sees (follows) the truth, I am contemplating by being fixed (nimagna) in my true form of Lord Maheshvara (Lord Shiva)".

14-15. "[Sri Lakshmi said.]: O Hrishikesha! You alone are always to be meditated upon by the self-controlled ones. Therefore, I have a great curiosity to hear from you, about that which is higher than you. O Achuta, tell me if there is something different from you who are the lord, the creator, and the destroyer of the worlds".
16-18. "[Lord Vishnu said]: O goddess (Lakshmi), this my body is illusory and not real, and is augmented with the mass of the acts of creation, maintenance and withdrawal. O dear one, the nature of the self is different form this. It is without duality and unity. It is free from existence and non-existence; and without beginning or end. It is pure consciousness, has acquired luster, is beautiful due to great joy, is the form of the Ishvara (lord), can be known only through the unity with the self, and this is what is told in the Gita".
19-20. "Hearing the words of him of an unlimited lustre, she having doubt to contradictory statement said: 'If you are highest joy, and not known through speech and mind, then how does Gita make you known. Remove this doubt of me!'".
20-26a. "[Lord Shiva said]: Having heard the proper words of Lakshmi, the lord told her the Gita, the vision leading one towards the self, along with an historical account. "O great lordess, I am the 'self' differentiated in two ways, – as higher and lower. The higher is a witness, attributeless, partless, Shiva. As the lower one, I am 'panchavaktra (of five faces)' it also remains in two forms. I, Maheshvara, am the self, am to be explained through the distinction in words and meanings, as, through the words of the Gita, my strong noose of the nature of objects in the worldly existence, is completely cut off; since (realization of my two forms) 'Panchavaktra' and 'Maheshvara', are dependent on its study". Hearing these words of him (which were) the great ocean of essence of the Gita, those afraid of the worldly existence know it through the difference between this and that. Lakshmi asked thus to him. He told her about the Mahatmayam (greatness) along with the corresponding historical accounts (stories) in its major and minor details.".
26b-29. "[Lord Vishnu said]: O you, beautiful lady, I'll tell you about my firm existence in the Gita. The five chapters are the five faces in order. The (next) ten chapters are the (ten) hands; one is the belly, and the (remaining) two are the lotus like feets. Thus the eighteen chapters are the divine forms of words. It, destroying great sins, should be known through knowledge only. Therefore, he, the very intelligent one, who studies a chapter, or half of it, or a verse of a half-verse is liberated like 'Susharma'".

Atharvashika Upanishad 2:1.:

"The pranava (the sound of Om) makes all the souls to bow before it. It is the one and only one which has to be meditated upon as the four Vedas and the birth place of all devas. One who meditates like that goes away from all sorrows and fears and gets the power to protect all others who approach him. It is because of this meditation only that Lord Vishnu who is spread every where, wins over all others. It is because Lord Brahma controlled all his organs and meditated upon it, he attained the position of the creator. Even Lord Vishnu , parks his mind in the sound (Om) of the place of Paramathma (ultimate soul) and meditates upon Îsâna. , who is most proper to be worshipped. All this is only proper in case of Îsâna.".

I hope this clarifies all your queries. Prd..

What is meant by the “Yogic Slumber” of Bhagwan Vishnu?


How Can I Appropriately Live Life Accordingly to God's Will?

Question: I have been struggling for the past five years. My civil rights were violated about three to four times and all being investigated by the Federal Bureau of Investigation. I am currently unemployed. I have had no luck in trying to get my portfolio of fantasy novels published either. It is still a professional hobby of mine where I have not earned any money. I am looking for an agent and publisher to no avail. Is this all part of God's will for my life? How do I know if I am living a life according to God's will?
Comment: Like any library, Christianity Stack Exchange offers great information, but does not offer personalized advice, and does not take the place of seeking such advice from your pastor, priest, or other trustworthy counselor.
Comment: _"How do I know if I am living a life according to God's will?"_ The Apostle Paul discusses this in great detail in [Romans 12-15](https://www.biblegateway.com/passage/?search=Romans+12&version=NIV): 12:2 being the key verse, and the next 3 chapters discussing what it looks like. If I get time in the next couple of days (and the question remains open) I might try to convert some of what he says into an answer to your final question (or others can give it a go!)
Answer: God's will for a specific human life has less to do with what the circumstances of the life are and more to do with how that life responds to the circumstances.  Insofar as God orchestrates or allows the particular circumstances of a life He does so for two main reasons:
In order to give birth to faith,

The God who made the world and everything in it, being Lord of heaven and earth, does not live in temples made by man, nor is he served by human hands, as though he needed anything, since he himself gives to all mankind life and breath and everything.  And he made from one man every nation of mankind to live on all the face of the earth, having determined allotted periods and the boundaries of their dwelling place,  that they should seek God, and perhaps feel their way toward him and find him. Yet he is actually not far from each one of us, - Acts 17:24-27

or to refine faith,

Blessed be the God and Father of our Lord Jesus Christ! According to his great mercy, he has caused us to be born again to a living hope through the resurrection of Jesus Christ from the dead,  to an inheritance that is imperishable, undefiled, and unfading, kept in heaven for you,  who by God's power are being guarded through faith for a salvation ready to be revealed in the last time.  In this you rejoice, though now for a little while, if necessary, you have been grieved by various trials,  so that the tested genuineness of your faith—more precious than gold that perishes though it is tested by fire—may be found to result in praise and glory and honor at the revelation of Jesus Christ.  Though you have not seen him, you love him. Though you do not now see him, you believe in him and rejoice with joy that is inexpressible and filled with glory,  obtaining the outcome of your faith, the salvation of your souls.

If you have not yet abandoned your own efforts to shape your own life into a life that pleases God then I encourage you to lay everything down at the foot of the cross.  Jesus Christ, the Son of God has lived THE life that pleases God and you are invited to rest from your own efforts and take part in His life:

because if you confess with your mouth that Jesus is Lord and believe in your heart that God raised him from the dead, you will be saved.  For with the heart one believes and is justified, and with the mouth one confesses and is saved. - Romans 10:9-10

If you are already born again by the grace of God through faith in Jesus, having appealed to God in Christ, trust that God's promise in Christ is to send His Holy Spirit to be in you to guide you into all truth, to testify to you of Jesus (reminding you of everything he said) and to undertake the process of sanctification (which is part of God's will for you).  This sanctification process often takes place in the fires of trial where we learn to subordinate our desires to the desires of God and it is ultimately for our eternal good.

I appeal to you therefore, brothers, by the mercies of God, to present your bodies as a living sacrifice, holy and acceptable to God, which is your spiritual worship. Do not be conformed to this world, but be transformed by the renewal of your mind, that by testing you may discern what is the will of God, what is good and acceptable and perfect. - Romans 12:1-2

I do not know if God's will for you is to publish fantasy novels or do any other particular thing and you may not currently know either.  Remember that Abraham was called to go to a land that God would show him.  Abraham was the father of Faith precisely because God did not show him first but, rather, called him to walk by faith rather than by sight.  Abraham did and was called God's friend.
This is most often very difficult...no one enjoys discipline at the time (I know that I never have).  God is working to shape us into that which we cannot imagine but that He can clearly see.  Relax into the Potter's hands, struggle to give thanks in all circumstances, and trust in the Name of the Lord Jesus Christ.  He will never leave you nor forsake you.
Comment: Hi Mike. it's our specific policy not to answer questions like this, because we never know enough to give a good answer and we do not want to encourage people to take spiritual advice from random strangers.
Comment: @DJClayworth I tried to avoid anything that smacked of personal counsel but I understand.
Answer: Psalms 37:4-5 "Delight thyself also in the Lord; and he shall give thee the desires of thine heart. 5 Commit thy way unto the Lord; trust also in him; and he shall bring it to pass."
I have found doing the few things that God wants us to do is His will. Study the scriptures to gain insight into who God is. 2 Timothy 2:15. Pray for His will to be done and desire to do it. Last, and most important, is to share the gospel with whoever you can. Matthew 28:19-20. Once you commit yourself to these things He will give you what He wants you to desire. We often think God will give us what our own will wants. Rather God will give us His will. If you commit yourself to this then eventually it will come to pass.
If God wants you to be a successful writer then it will happen, He doesn't have that in mind for you are you willing to do something else? Maybe you cannot make a living off your writing but you can be a blessing to someone with that talent.
Comment: Hi Husbandman. it's our specific policy not to answer questions like this, because we never know enough to give a good answer and we do not want to encourage people to take spiritual advice from random strangers.


What is effective permission if windows user is added as login as well as via group membership; with only public permission given via the user login?

Question: Link: https://learn.microsoft.com/en-us/sql/relational-databases/security/authentication-access/determining-effective-database-engine-permissions?view=sql-server-ver15#principals

Remember that a Windows user might be a member of more than one
Windows group (e.g. both Engineers, and Managers). Permissions granted
or denied to the Engineers login, to the Managers login, granted or
denied to the user individually, and granted or denied to roles that
the user is a member of, will all be aggregated and evaluated to for
the effective permissions.

If windows group is added as login and given db_owner permission on couple of dbs.
And then one of the members of this group (say domainname\UserA) is added as a login with only public role (at server and db level).
I know that denials override the grants. But does giving public permission inherently result in any denials?
In other words, what is the effective permission for this user (domainname\UserA)? Is it only public or does it retain the db_owner permissions?
Answer: Permissions can only be denied by an explicit DENY statement.
From the Docs

DENY denies a permission to a principal. Prevents that principal from inheriting the permission through its group or role memberships.

As a result, granting permissions via membership in any group does not take away any permissions.  Grants are always additive, that is they are in-addition to the already existing permissions the security principal has.
So, to answer your question, membership in the public role does not prevent permissions assigned via group membership from having effect.  In the scenario mentioned in your question, the user would have db_owner permissions via their membership in the group that has been granted membership in that role.


Relation between binomial and negative binomial

Question:
I was reading on negative binomial from a Statistics textbook and came across this portion on probability relation between binomial and negative binomial. $Y$ refers to the number of trials required to get $r$ successes.
Can somebody please explain the relation
Answer: Based on binomial distribution, event $\{X \geq r\}$ is the set of outcomes that satisfy "$n$ trials led to $r$ successes or more", which is equivalent to  "$r$-th success happened at $n$-th trial or before", which is in turn equivalent to "$n$ trials or less were required to get $r$ successes", and that is it.
$$\begin{align*}
P\{X \geq r\} &= P\{\mbox{at least r successes in n trials}\}\\
&= P\{\mbox{r-th success in n-th trial or before}\}\\
&= P\{\mbox{n or fewer trials to get r successes}\}\\
 &= P\{Y \leq n\}
\end{align*}$$
The second relation is the complement of first relation that is:
$$\begin{align*}
P\{X \geq r\} &= P\{Y \leq n\},\\
1 - P\{X \geq r\} &= 1 - P\{Y \leq n\},\\
P\{X < r\} &=  P\{Y > n\}\\
\end{align*}$$
The second relation means:
$$P\{\mbox{less than r successes in n trials}\}= P\{\mbox{more than n trials to get r successes}\}$$
Comment: Thank you. What about the second relation?
Comment: In the second relation, is it right to say that the P( less than r successes in n trials) $=$ P( more than n trials to get r successes)
Comment: (32) is simple the complement of (31)


Do I need to sift flour that is labeled sifted?

Question: Is there really an advantage to sifting flour that I bought that was labeled 'sifted'?
Answer: Maybe!
Flour is unusually variable in how densely it will settle, so this can make a big difference for some recipes. The purpose of sifting is to make the amount of flour in a given volume reliable. (If you are measuring by weight, you don't need to sift.)
By moving around the sifted flour, or pouring it from one container into another, you are changing the way it is packed. Therefore, you can easily "unsift" it in the course of normal handling. Proper sifting is done straight into the measuring device.
Comment: The key is to find recipes that measure by weight instead of volume, buy a good scale, then don't worry about it! Or give the flour a quick whisk if you need it not to be packed.
Comment: I disagree here with "if you are measuring by weight, you don't need to sift". There is quite a bit of difference in the texture of many baked goods made with sifted vs unsifted flour, especially the lighter cakes.
Answer: Assuming you're baking: Sifting does more than just standardize the density of your flour (which it doesn't even do all that well). Most recipes that call for sifted flour do so because it helps aerate the batter, as well as keeping the flour from clumping and forming lumps. It won't incorporate a large volume of air, but it will bring in lots of microscopic "seed bubbles", which will then provide lots of nucleation points for the leavening to form CO2 bubbles. Without those seed bubbles, you'll get fewer, larger bubbles of leavening, resulting in a different texture. (Creaming sugar into softened butter performs a similar function in many recipes.)
Also, +1 for hobodave's food processor tip. Or a good whisking in a large bowl will do in a pinch.
Comment: +1 for the wisking -- I hate dirtying more than I have to.  (and as much as I hate cleaning wisks, when it's dry goods, it cleans up easily.)
Answer: It can't hurt. I wouldn't trust flour that came pre-sifted. Anything will settle during transport.
Random tip: pulse your dry ingredients in a food processor instead of sifting.
Answer: Also by sifting flour ensures no foreign objects are in the flour...bugs, toys, coins, large flour lumps, chocolate chips, cupcake sprinkles, pet fur, etc.
If you have small children that help you bake, or pet friendly kitchens, you'll be surprised what you can find in your baking ingredients!!
Bugs sound gross but they do happen, especially in old house kitchens, or if you use a tub or other container to hold your flour, better to find out if you have a problem before you start mixing!
Answer: Ideally your recipe will have the flour by weight, not volume, as you can't reliably tell how much flour you are adding when you measure the flour by volume. You should search for baking recipes on the net that list the flour by weight (good books do this for bread baking; the Bread Bakers Apprentice does this, for example).
After weighing the flour you should still sift it as this adds air and can help lend lightness to a quick bread or cake.
Comment: @AdmaF: this would indeed be ideal, but I've never once seen it in any popular cook book, recipe card, or most web sites. Also, this would still not address the matter of breaking up clumps or aerating.


Is the site wrong about an ethical hacking question or am I?

Question:
Can you let me know if this site is crazy? or am I?
Comment: Bug in the website, that definition suits only to "virus".
Comment: The best way to handle all the errors and mistakes in both the free and paid, official exam prep questions, is not to memorize the answers, but know ***why*** every single one of your answers is correct. Then, you can handle mistakes on their end. Treat every proposed answer from them as only a suggestion or an opinion. Then verify on your own. It will make you a stronger test taker (and more knowledgeable).
Comment: Thanks Mirsad, I have quite a few screenshots where the training sites are wrong. It's very dissapointing and frustrating for people who are trying to learn or pass an exam. Even my paid course contradicts itself throughout the modules, that's why I also search elsewhere. How I'm going to pass, I don't know.
Comment: In case it may be useful to you: I've just written [a post](https://www.whitewinterwolf.com/posts/2017/10/04/ec-council-ceh-certification-review/) with a review and few advices for the CEH exam. Don't hesitate to provide me any feedback!
Answer: You're right and the website is wrong.
I know it's frustrating but I think that anyone who went through a certification also went through the same frustration ;).
Sometimes, the issue is not even in the training program but in the certification organism itself who do not check his own questions enough (question quality varies greatly from one organism to another). Training programs then only reflect this situation by using older official questions and answers.
Instead, take the fact that you have now enough knowledge and confidence to challenge such answers as a good sign of your level. At the end, you don't need 100% good answers. As long as you have enough knowledge, you should be able to pass despite odd, malformed and wrong questions.
Comment: Thank you, your answer encouraged me to be more confident, I went to my exam and passed first time :)
Comment: @LukeDobner: Congratulations :) , I'm glad if my answer helped you!
Answer: As discussed in the comments of the question the correct answer is in fact virus.
This is a common issue of using online (and free) test banks. The question/answer database is not reviewed for errors. I have yet to find a reasonably priced, error-free exam bank for Network Security exams.
What I recommend you do is use the resources included with and inside physical books. The book itself will quite likely contain error-free exam test questions, and some additional ones on a CD. This route will be more pricey, but certainly worth the added costs.
This is how I studied for my CompTIA Security+ CE exam, and will be continuing with my CompTIA CASP exam.
Comment: I wouldn't blindly accept test questions as being correct just because they're in a physical book - I've seen similar errors in books, and even in actual exam papers.


Install many applications using one command

Question: after reinstall system I need install applications again. Is it possible to make bash script or own package where cancan I add needed application and after reinstall system will I install them all using one command?
Comment: Related to [Installing multiple packages at the same time](https://askubuntu.com/questions/874611/installing-multiple-packages-at-the-same-time)
Answer: To build a list of installed packages use:
sudo dpkg --get-selections > package.list

To restore the packages use:
sudo dpkg --set-selections < package.list
sudo apt-get dselect-upgrade

Answer: You can use sudo apt install app1 app2 app3 type command in order to install multiple applications from the terminal or a bash script.  Simply list all of the applications you wish to install in that command.
For example, if I wanted to install the applications gufw, libreoffice and hexchat, I would simply run the command sudo apt install gufw libreoffice hexchat.
Make sure you use the correct package name for each one because if any one of the package names in the command are misspelled or incorrect, the entire command will fail.
Answer: If the packages come from apt repositories , it is sufficient to provide a long list on command line
sudo apt install pkg1 pkg2 pkg3

If the list is large you may run into argument list too long error. In such case you can  create a text file with list of packages one per line and run something like
sudo xargs --arg-file packages.txt apt install

Remember to update package cache before installing
sudo apt update

For deb packages found locally on disk, you could use sudo dpkg -i ./*.deb in current working directory or sudo dpkg -R -i debfiles/ to recursively traverse debfiles/ directory ( user-defined , can be replaced with another name). However, there are issues when those packages may need dependencies first, and the linked post provides a Python script to resolve that via topological sort.


What temperature will kill camellia plants?

Question: I have many camellia japonicas and sasanquas. In very cold weather I protected  newer smaller plants. But global warming has dealt a bad blow to E TX , we had +7 °F overnight and in the 20's °F for 4 or more days. Of course the blooms are gone (have some flower phots with 2" of snow on the bloom). Meaningful covers on 8' tall 12' long plants is not rational, so I am waiting to see what is left. Literature give references for 32 °F or 20's °F for a few hours, but not 7 °F. Any guesses?
Answer: Some camellias can survive in zone 6 (0 F) but I think it rather depends on the variety. Best to wait and see; in the worst case you may need to cut back to the ground. While air temperature may go to +7 likely within a foot or so of the ground the temperature will be higher. On the positive side it will be a good indicator of weak and crowded growth that can be thinned out. Lots of pruning work to be done in the South this year I think.
Comment: There is mulch , and of all things ;about 4" of snow cover so the ground should not be "very" cold.
Comment: Official  low temperature  + 3 F ; in zone 8.


Disable edit option in Media library

Question: Hovering my mouse over a file name or a thumbnail brings up the Edit option, I want to know is there any hook to disable all edit links in Media library on Multisite
Comment: What is your context for requirement? Should items be _absolutely_ uneditable? Only for specific users or other conditions?
Answer: Add some CSS to admin_head to hide the image actions bar, and hide the edit button once clicking into the image:
This should do the trick:
function hide_image_edit_link() {
    echo '';
}
add_action('admin_head', 'hide_image_edit_link');

Comment: I can still edit files clicking on a file name or a thumbnail
Comment: This wasn't clear from your question.

Code updated, to also hide the button when clicking into the image, I presume you don't want to disable this entirely.
Answer: There're several filters that you can utilize:
Custom column content
If you got a custom column that you added with the ``-filter, then you can use the
manage_{$post->post_type}_posts_custom_column

filter to alter the content. If you only want to target non-hierarchial post types then there's as well the manage_posts_custom_column and for hierarchical ones, there's manage_pages_custom_column. All three filters have two arguemnts: $column_name, $post->ID.
For the media library there's a special filter: manage_media_custom_column.
Removing actions
IIRC, there's the following filter to add or remove different actions:
apply_filters( 'bulk_actions-' . $this->screen->id, $this->_actions );

You should be able to obtain the screen ID from get_current_screen()->ID.
For the media library it's - again - a special case and you have to use the
apply_filters( 'media_row_actions', $actions, $post, $this->detached );

filter.
Make sure that you don't use $this-> inside your callback arguments as you're not in object context.
Removing the image link
So far there's no possibility to completely remove the <a href="" ... tag without a lot of effort. But you can (simply) set the link target to the current page with using the get_edit_post_link-filter.
Just re-target it to sprintf( '#post-%s', $post_id );:
add_filter( 'get_edit_post_link', 'wpse107783_remove_media_icon_link', 20, 2 );
function wpse107783_remove_media_icon_link( $url, $post_id )
{
    if ( 'upload' !== get_current_screen()->id )
        return $url;

    return sprintf( '#post-%s', $post_id );
}

Why not CSS or JS?
Still people could remove event listeners or CSS rules via their developer tools, which is something you might not want.
Redirect
A real lock out can only happen server side based on roles and capabilities.
add_action( 'template_redirect', 'wpse107783_redirect_media_edit' );
function wpse107783_redirect_media_edit()
{
    if (
        ! is_admin()
        OR 'attachment' !== get_current_screen()->id
    )
        return;

    exit( wp_redirect( admin_url() ) );
}

Note: I'm not sure if template_redirect is the right hook here. It might as well be admin_menu or init.

Disable edit option in Media library


Any suggestions for real-time phonetic analysis packages?

Question: I'm writing some software that will need to do a bit of phonetic analysis. Are there any programs, libraries, or software packages that I can extend to my program which are commonly used for real-time phonetic analysis? I'm aware of software like Praat and WaveSurfer, but to my knowledge I don't think I can send/receive data from them in real time. Asides from those, other NLP tool-kits seem to output on the lexical/phrasal level, which is not the level of analysis I'm looking for.
Comment: NLP libraries, as the name suggest Natural language processing, are focused on analyzing textual content on computers. Matlab is designed for this type of work.
Comment: it's a broad question and also you could get some info by asking in DSP SE and/or Stackoverflow.
Answer: Doing phonetics analysis is broad term, you should first mention what type of phonetics analysis you are looking for and how is your level of programming.
For the first question we will go into FFT only since it's an algorithm that is fundamental (you can manually check the formants, frequency etc.). If you are not familiar with FFT the simplest definition is that it converts sound waves to frequency-time patterns (you can read more at here). There are numerous FFT packages written for Python, and C++
There are some great tutorials on realtime signal processing at here, and here.
Comment: By the way you can take a look at: https://www.speechandhearing.net/laboratory/ampitch/
online pitch track analysis :)


How can I put something in book format without "publishing" it?

Question: I have a friend who has written a series of great nursery rhymes.  I would like to put these rhymes into a book as a gift for my friend, but I don't want to give up my friend's first publication rights.  Is there a service I could use — perhaps like one of those photo publishing books or something along those lines — where I could get the rhymes in a bound book form but without it being considered publication?
Comment: Using a photo publishing service should be fine - I can't imagine that that'd count as publication, or that you're giving up any rights on the content (though obviously check the EULA). I'll have to look around for sources, though.
Comment: You could also go the craft route: Bind them into a book by hand.
Comment: @NeilFein - it's a good idea, but one that I currently have neither time nor tools for, sadly.
Answer: Is the purpose of doing this for your friend to see their words "in print", or for them to see that someone considers them good? (i.e., you.) Or perhaps it's something else entirely.
Whichever option you choose, you'll have to get the rhymes in shape for printing/publication, if they aren't already. There's no need to hire an editor, not with a print run of one, but I would do some careful proofreading.
However, print runs of nursery rhymes will include illustrations as a matter of course. If you want to simulate a print run, you'll want to do these as well.
You have a few options:
Get the rhymes into bound book form, using a short-run print service.

Advantages: Less work on your part. Will look professional.
Disadvantages: Need to check services' terms of use. Expensive. Need to prepare manuscript, get illustrations and layout done.

Do a craft-style "printing" of the book.
This would be where you get a scrapbook from a crafts store, and use it to hold the pages. Call it a "mockup" of the book.

Advantages: Realistically, there are no copyright or terms-of-use issues. Cheaper than a print-on-demand book.
Disadvantages: Will look home-made, although that can be charming. Slightly more work on your part than bringing the whole thing to a printer - will take the most time of these options. Need to prepare manuscript, get illustrations and layout done (but less tightly than with the first option.)

Do a framed print of one of the rhymes.
This is the simplest way to handle this. Pick one of the rhymes, have it illustrated or decorated, and print it out nicely and put it in a frame.

Advantages: Less work overall. Will look home-made but, here, I think this is an advantage. Realistically, there are no copyright or terms-of-use issues. The cheapest option of all.
Disadvantages: Less extensive than doing the whole book. You need to pick just one rhyme. (Or is that an advantage?)
Comment: Good question on the purpose.  The purpose is to have all the rhymes in one place for my friend to be able to read to said friend's kids, since right now they aren't, and ideally make it cute.  But at the same time since I **do** think they are good I wouldn't want to mess with my efforts to get my friend to polish them up and shop them around.
Answer: If you have art to go with these nursery rhymes, then I'd say go the photobook route already mentioned.
If not, check out using Amazon's Create Space. It's their print on demand service, that people can use to self publish. However, there's nothing saying that you have to offer it for sale -- you can set it up in Create Space, and print out a grand total of one, and have it shipped to you. And it'll only cost you a few bucks for the printing.
Another option may be a place that has an Espresso Book Machine, if there's one near you. The espresso book machine prints out library quality books (paper back), in a matter of minutes, on demand. It's like a giant copier but better. I say "may" because whoever owns it near you may not offer it for people to print their own stuff. The one near me does, and also offers help laying it out and making a cover on a per-hour fee basis. (it does have to be laid out exactly)
Finally, on Neil Fien's excellent idea in the comments of crafting the book by hand. You may not have the time or the tools to do that, but art or graphic design students at a nearby university do. I'm guessing you could commission one of them to do it for a couple hundred bucks, and get something pretty sweet if you make it clear you're commissioning an artwork, not asking them to slap some pages together. It gets even better if it's hand-lettered, not printed.
To track that down, I'd suggest find some classes on binding, materials (paper), or on fonts, and ask the professors for recommendations. Heck, if you're loaded and willing to spend the money, I bet you could get one of the professors would do it.
The more I think about it, the more I like the hand-crafted, hand-lettered idea. That would be a stunning gift!
Comment: Every year I print my personal daily planner with Create Space. Basically a calendar and personal phone book. I order three copies -- one for me, one for my son, and a spare. I never release it for publication. It costs me about twenty bucks. I used to print them on my home printer and bind them by hand, but Create Space is way less work and much better quality when it's done.
Comment: That's an awesome idea. I've actually never seen a book printed by create space, as far as I know. How would you rate the quality of what they print for you compared to a similar kind of book from a store (printed by offset printing)? Particularly the cover?
Comment: I think you would have to study it very closely to tell the difference. The inside pages I see no difference at all. The cover appears to be a laminate laid down on card stock, so if you abuse it the printed surface can peel at the edges. Some writers complain about this but I think it's a trivial issue. Lots of paperback book covers don't stand up to abuse -- these just fall apart in a different way. You probably have books that were printed using similar technology and don't know it: Ingram, a major book distributor, sometimes uses similar equipment when demand exceeds expectations.
Comment: @Jay Thanks! It's too bad they can't do other covers, but considering their price point & on-demand, I can't complain. :)


Python pip --index-url Not Limiting Repository Search

Question: I'm trying to instruct pip to install packages using only a local repository (on a different  server in my internal network). The requirement is that remote repositories (like pypi) should never be consulted, even if the local repository does not have a match.
First Attempt:
<code>$ pip install --index-url=http://<local.repo.host>/packages/pypi/data/web/simple/ paramiko --verbose
</code>
However, when I run the command above, it's clear that other repositories are still being consulted:
<code>....
Ignoring link http://www.amk.ca/files/python/pycrypto-1.9a5.tar.gz
(from http://<local.repo.host>/packages/pypi/data/web/simple/pycrypto/),
version 1.9a5 doesn't match >=2.1,!=2.4
</code>
The only workaround I've found thus far is to pip download (without installing), and then easy_install the tarball.
Example:
<code>$ sudo pip install --no-install --download /tmp/ --index-url=http://<local.repo.host>/packages/pypi/data/web/simple/ paramiko
$ sudo easy_install --allow-hosts=<local.repo.host> --index-url http://<local.repo.host>/packages/pypi/data/web/simple/ /tmp/paramiko-1.9.0.tar.gz
</code>
Which results in the remote repositories being blocked:
<code>Link to http://www.amk.ca/files/python/pycrypto-1.9a5.tar.gz
***BLOCKED*** by --allow-hosts
</code>
I also tried setting ~/.pydistutils.cfg to:
<code>[easy_install]
index_url = http://<local.repo.host>/packages/pypi/data/web/simple/
allow_hosts = <local.repo.host>
</code>
And ~/.pip/pip.conf to:
<code>[global]
index-url = http://<local.repo.host>/packages/pypi/data/web/simple/
</code>
as suggested by the "What to do when PyPI goes down" blog, but that does not prevent attempts to remote repositories either.
Is there a more straightforward way of accomplishing this? I'd prefer to not use easy_install given that pip is heavily favored (for a lot of reasons). Will this approach even work in all situations?
Answer: Update: Fixed by upgrading pip.


Samsung galaxy note 2 android 4.3 problems

Question: Is there a solution for the battery drain problem that the note 2 suffers after the 4.3 update?
In my case the drain is most noticeable when the wifi is on. When its off battery lasts a good while same or maybe a little bit better than before. But when wifi is enabled, you can watch the battery indicator change values quickly.
I've looked for solutions but found non that seems to be working.
Answer: There may be apps in the background that run which drains the battery life. To be certain of which app:
Go to

Settings > Battery > Battery Graph

The battery graph will give detailed analysis which app used how much battery. If there is any app that you don't recall using a lot but is one of the top battery consumers I'd recommend you to uninstall/disable the said app.
Comment: I already did that the thing is, it is not apps that cause this drain, it is the wifi which when disabled everything is fine but when it is on i can watch the battery go down. Another thing is the SNS service it consumes alot. And what is the difference between Android system and android os. Both appear in the graph and both consume the most


A finite field extension that is not simple

Question: Let $F=\mathbb{F}_p(X,Y)$ be the field of rational functions in variables $X,Y$ over the finite field of $p$ elements. Let $K=\mathbb{F}_p(X^p,Y^p)$ be a subfield. Note that for any $f\in F$, $f^p\in K$. Deduce from this that $F/K$ is not a simple extension.
Comment: Maybe if you can prove that the degree of the extension is $p^2$ all is done. Try it!
Comment: Presumably the reason it's in a section on separability is that this section (or maybe the next section) contains the theorem of the primitive element, and the point of the exercise is to show that this theorem really needs the hypothesis of separability.
Comment: I tried contradiction methods. So assuming $F=K(f)$, $f^p=g\in K$ then $f$ is not separable over $K$. That's all I could think of, and I don't think this is taking me anywhere.
Comment: I couldn't show the set $\{X,Y,XY,X^2,Y,XY^2,...X^pY^p\}$ is a linearly independent set. I took that this was what you meant by $p^2$. But this is an exercise in a section on separability.
Answer: First of all $\mathbb{F}_p(X^p,Y^p)$ is a function field, which means that we may treat $X^p,Y^p$ as variables. The polynomial $(T-X)^p = T^p-X^p$ is irreducible over $\mathbb{F}_p(Y^p)[X^p]$ by Eisenstein's criterion, but then also over the field of fractions $\mathbb{F}_p(X^p,Y^p)$. Hence, $\mathbb{F}_p(X,Y^p)$ has degree $p$ over $\mathbb{F}_p(X^p,Y^p)$. Similarily one proves that $\mathbb{F}_p(X,Y)$ has degree $p$ over $\mathbb{F}_p(X,Y^p)$. Hence, $F=\mathbb{F}_p(X,Y)$ has degree $p^2$ over $K=\mathbb{F}_p(X^p,Y^p)$. But since $F^p \subseteq K$, every element of $F$ has degree $\leq p$ over $K$, so that it cannot generate $F/K$.


Freeform Pro confirmation message inside Fancybox

Question: Trying to send message using Freeform Pro in a lightbox (Fancybox). I'd like to have confirmation message display inside of lightbox after successful submit. Not quite sure the best way to accomplish this. Any insight or advise?
Answer: If you want the thank you message to appear in the same Lightbox window as the form, without a refresh, you'll need to do this with Ajax. This is the basic outline of how this would happen:

Create a Thank You page in the CMS with your content.
Create your Freeform form and put it in the Lightbox. I'm assuming it's invoked by clicking a link on the containing page? Wrap the whole form (all the content you want to replace) with a div class="ajax-content" (or whatever you want to call it).
Give your submit button a class like "get-thank-you" and create an onclick event for this button that replaces ajax-content with data from the thank you url. You can find an example of how to do this here: https://stackoverflow.com/a/13832977/990061

Hope this makes sense?


Text is readable in Chrome; microscopic in Firefox

Question: I have some text on a page that is small but readable in Chrome/Safari (that's how I intend it to be), but becomes microscopic in Firefox for some reason. Can anyone suggest a fix so that the text is readable in Firefox and IE?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <title>WTF LBJ?!</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

        Created by Varun Shetty and Bobby Corp. Inspired by LBJ and WTF Obama. Bobby loves Lebron; Varun loves the idea of Lebron.

        Sorry for the swear word, but LBJ gets people fired up.

Comment: "20%" means 20% of the default font size, which is pretty much unreadable on most screens. Perhaps you should go 70% or something like that.
Comment: It seems Chrome interprets the percentage differently... In any case, to avoid other problems, remove the ";" from the div tag.
p.s. Obama has done a lot more than you think, that site is too easy criticism.
Comment: thank you both. and i love obama - i think that WTF site is actually showing people all the good stuff he's done.
Answer: 20% is equal to 0.2em, or 1/5 of the font size. My guess is that Chrome / Safari have a minimum font size configured to keep this readable. Try adjusting the font-size to something higher, like 0.4em and see if it actually becomes bigger in Chrome / Safari.  If it doesn't, you've just hit a browser-defined minimum and the "real" font size is actually smaller.
↪ Example
Comment: Both Chrome and Firefox have a user setting for minimum font size. Howevere, authors should not rely on it being set (especially since it mostly isn't). Setting font size to less 60% will cause serious trouble to many, if not most, users.
Comment: I just found that the user can't switch the minimum font size in Chrome off completely. You can set it to as low as 6px, but not lower. So Firefox gives the user more control over this setting.
Comment: The minimum font size appears to be off by default in Firefox. You can turn it on via *Menu > Options > Fonts and colors > Advanced > Minimum font size*, by the way.
Answer: try and set font-size to a specific number instead of %, like 8pt or 10px
Answer: I'm wondering if it is because you are using a low percentage on the particular font. By default, most browsers display fonts relative to 16px. So, when you defined #credit {font-size: 20%;}, you were telling the browser, "I want 20% of 16px, or a size of around 3.2px."  Here's a possible solution...
When I go about building websites, I always first set a default font size on my body tag. I have read several places on the web, (incl. Chris Coyier's popular CSS-tricks blog) that if you set body {font-size: 62.5%;}, this will actually help in making fonts similar in size between varying browsers.
Setting a font-size in pixels is ok if you're targeting screen devices (as it appears some have already suggested), although I'm starting to become a fan of ems as they seem pretty powerful.  Ems are good in the sense that they are always relative to the parent (in this example, your body text).  If you set font-sizes on your other page elements in ems based off of your body font-size, which is 62.5% (translated = ~16px), then you're golden.  You're providing your users with the most flexibility and you're also supporting IE browsers to zoom in and out without degrading the fonts...always helpful for users who might need to zoom in a bit to read something or zoom out a bit to see the whole page.
By using this method of ems and setting a default body font-size, everything in ems can be almost literally converted.  So, for example, if you want some text to be 10px in size, just set your font-size to 1.0em.  If you want a font-size of 22px, set your font-size to 2.2em...12px = 1.2em, 72px = 7.2em, etc.
In short, try setting your body {font-size: 62.5%;} and then setting #credit {font-size: 0.8em;}. This should give you a similar font-size between browser windows of 8px. Adjust accordingly if you would like something smaller or a little larger.
The even simpler answer would be to just use pixels like others have suggested, but like I said, create your sites with your users in mind. :)
Hope that helps!


We cannot recognize a set of languages as the language themselves

Question:
"We cannot recognize a set of languages as the language themselves"
What is the meaning of the line and why we cannot do it and how is the encoding of TM is helping in that?
Comment: Can you please just give little concrete example if you people get time.
Sorry If I am bothering you much and thanks in advance.
Comment: Don't use images as main content of your post. This makes your question impossible to search and inaccessible to the visually impaired; [we don't like that](https://cs.meta.stackexchange.com/questions/752/should-we-do-anything-about-questions-that-are-just-a-scan-of-a-problem-in-their). Please transcribe text and mathematics.  You can [use LaTeX](https://cs.meta.stackexchange.com/questions/271/add-short-reference-for-latex-commands).  Don't forget to give proper attribution to your sources!
Comment: Please credit the original source of all copied material.  This is required under our rules: https://cs.stackexchange.com/help/referencing
Comment: Yes. I will update this question as soon as I reach home.
Answer: TMs accept words as input.
What this paragraph is saying is that you cannot encode arbitrary languages as finite strings (aka words), and hence you cannot easily describe a property over languages themselves (for instance, a property of "all languages that contain the empty word", is a property over languages).
Afterwards it represents a way to somewhat describe some of the languages: a description of a language can be defined as "any turing machine accepting (computing) that language".
Answer: Admittedly, the sentence you give is indeed a trifle obscure. Simply said, it is saying that if we have a property of a language, like "any string in the language has odd length", we can't hope to recognize the property by using a TM that will iterate over all strings of all possible languages to test, since that would clearly be an infinite input, which we know is a TM no-no.
It goes on to state a definition that works, namely given a property, we can look instead at the set of all TM descriptions of machines which accept some language that has the property.


What influenced the far-future setting of Viriconium?

Question: Personally, I think Viriconium is the best far-future scifi I have ever read. It is also by far the most beautiful prose I have ever read in a sci-fi novel. In fact, it is so "literary" at times that it's almost not sci-fi. And yet, it's set in the far future and there are robots and a galactic civilization, et cetera. So what inspired its far-future setting? Was the author, M. John Harrison, actually reading scifi? Or did it just emerge seamlessly from his brain?
Answer: One of the influences was the desire by the author to reject the idea of a fictional world as a place. His essay, "What It Might Be Like To Live In Viriconium," addresses the topic directly, and this interview from 2002 discusses the matter further.

The early Viriconium pieces were anti-fantasy, written deliberately to
  refuse closure to fantasy readers and to get up the noses of fantasy
  writers, editors and reviewers.
Answer: Jack Vance's Dying Earth novels and stories are an influence, marked as they are by dense prose, wide vocabularies, and themes of entropy, decadence, and melancholy.
Michael Moorcock and J.G. Ballard are also influences, Moorcock in his revision of sword and sorcery and Ballard in his cold, unsentimental, and virtuosic prose style.
Comment: Do you have citations supporting this perspective, or is this your interpretation based on familiarity with all three authors' works?
Comment: He hasn't logged in since 2012. I'm guessing he isn't going to see this.


How is the atmosphere expanding in all directions if Gravity is holding the atmosphere down to earth?

Question: We are taught that gravity is the force that keeps the atmosphere and everything else binded to Earth. However, observable reality shows us that the atmosphere expands in all directions as it fills any and all available volume. This is an observable natural phenomenon that can be observed from any place in the atmosphere at any time, from ground level up to the upper atmosphere.
I find a contradiction between this observation and my understanding of gravity especially because the atmosphere rises and expands in all directions right at the surface of Earth where the force of gravity is claimed to be it's strongest being that it's closest to the center of Earth's mass and just as important, it's still expanding in all directions at the highest altitudes. So if gravity can't hold it down at the surface of Earth how could it ever hold it down at any higher altitude.
Comment: do you know what a pressure gradient is? or to put it another way, why does cold air sink?
Comment: The experimental protocols underlying your "observable reality" might have some flaws.
Comment: Observable reality shows that I can jump into the air or throw a ball away from the surface of the Earth.  How is that possible if gravity is holding me and the ball down?
Comment: The same logic applies to soil. How can soil expand in all directions under your feet instead of only at the Earth's core? The answer to both questions are the same: matter occupies volume.
Comment: If gravity couldn't hold air down at the surface of the earth, we'd have a lot of trouble finding air to breath.
Comment: Gravity at the top of the atmosphere is about 95% as strong as at the surface. It doesn't cause this.
Comment: The air is trying to expand, and gravity is trying to shrink the air. They find an equilibrium where both forces are equally strong.
Comment: These answers are insufficient. A pressure gradient obviously has pressure involved and gas pressure cannot be achieved without limiting the availability of volume for the gas to fill. In other words containing the gas. All gas pressure has a gradient, pressure gradient cannot exist without pressure and pressure cannot exist without a gradient. We obviously have gas pressure, this can only happen with limited volume and gravity is not limiting volume because it's obviously not holding the atmosphere down.
Comment: To Lee Mosher, experimental protocols? My observable reality? If you don't observe the atmosphere moving freely in all directions without a downward bias, it would be your observable reality that has issues.
Comment: Gravity is not a force so it cannot possibly be affecting matter. Which explains why it's not affecting any physical matter. Gravity cannot be selective and ignore half of the matter in the world and only affect the other half. It's not even a force to begin with and all of earth scientists will not deny this fact.
Comment: The atmosphere and the force of gravity being in equilibrium with each other is not what we observe. Again, we observe the atmosphere expanding in all directions. So gravity would be losing this alleged tug of war with one another. Equilibrium or hydrostatic would be static. No expansion or movement upward or downward.
Comment: There's an obvious and correct explanation for what we observe in reality. The atmosphere is contained. Inside the contained atmosphere all matter is sorted by way of relative density. Relative density explains observable reality without a pseudo force needed. It is tested, repeated and observed countless times every day. Gravity simply does not exist.
Answer: A couple thought experiments up front:

If you breathe on a cold day, the air doesn't rush up, despite the
vacuum of space above it.  Why?  It's not just because of its own gravity... but because of the gravity (weight) of all the gas above it that tends to keep it suppressed overall.  Yes it does seem to spread in all directions diffusing, as gases do when there is room.  But there is more to come on that...
But other gases show the situation more; if you put out dry ice ($CO_2$), the gas will sink.  This is because it's heavier.  Despite being a gas and attempting to fill the free space.  And so gravity is pulling it (and other gases).  And that points out some of the way the atmosphere works.  The lower atmosphere actually works out to be a relatively free place where gases are mixed around more because of more energy.  But as you go up higher, the gases start to stratify out.  This is where gases with more mass per volume (= density) start to be held lower consistently.  So each tends to start to form a level.  (We're talking way up there, well above the height of commercial jets).  At highest levels, you find the lightest things like helium and hydrogen.

The $CO_2$ motion is evidence that gravity is impacting gases.  But when you breathe out air, it is similar to the mixed gas around it and will be more free within it.

There is another way to make gas "lighter" rather than changing what it's made out of... temperature.  Hot air balloons are an example of something that very much does go up specifically rather than just spread.  That's due to density (again, basically how heavy it is in a given volume, so very much a result of gravity).  Molecules move faster in warm air, so it's more spread out, so less weight per space, and so is lighter than the air around it and rises.  (Also why you may notice your breath indeed tending upwards on a cold day, and likewise from fires/industrial smokestacks, because they are warmer than the environment)
Yet air is less dense as you go up, so it still reaches levels where it stops rising. So what's left is colder and still less dense.  So there's a real significant decrease in gas as you go up, and air becomes much less dense (basically meaning gases will tend to stay below it, because it weighs more than the gas above it)
The majority of air winds up being at low levels because it is weighed upon by the air above it.  even in the "well-mixed" low atmosphere (go up in an airplane or up a mountain, your ears pop).  Higher up, more spread out means less total gas.
(Also worth noting is that the rising air expands to fill the increased space as it rises, but as it expands it uses up energy, cooling... and so stops rising)

So then doesn't the lightest gas, the gas at the top of the atmosphere, just leave?
The answer still tends to be no... because it still has some weight.  (There's little remaining pressure force pushing it towards space because those top of atmosphere gases have reached very sparse quantities (= very low pressure)).  Everything at every level has an escape velocity... basically the amount of energy needed to overcome the (remaining) gravitational pull and reach space before it slows down too much from gravity.  This powerpoint presentation shows that for our most common gases, molecules very rarely reach that speed.  For hydrogen and helium, the value is reached a bit more often, but still a very low percentage of the molecules, meaning it takes a long time.  But yes, the lightest gases do manage to escape, and in a way it is because they are meandering out to fill the space, more unrestrained by gravity than the heavier molecules that predominantly make up air.
Some other important notes for your question:

The force of gravity is for most intents about the same at all levels of the atmosphere, because the atmosphere is so small compared to the Earth.  This Quora question shows basically a 4% difference in gravity between the surface and top of atmosphere, and 9% to the ISS.  So there's really not much difference in gravity down low vs up high.

So light gases and energetic molecules do escape.  Heavier gases sink, lighter ones rise.  So why isn't there a ton of insane motion?  Because over time the Earth reaches equilibrium in its distribution of the atmosphere... where the gases trended to move around until a point where the buoyancy (push up by gas molecules from below) and pressure gradient towards space were balanced by the weight at each level... the hydrostatic equilibrium the other answers mention. Less gas settles up high, more gas settles down low, until the forces balance.

When you release a gas, you may well tend to be releasing a gas that was previously there.  So in a sense, it's expanding to fill the space that it once previously took up.  Of course you're taking out and putting back very tiny fractions of gas.  But you can imagine that if you did release a significant amount of "new" gas (from extraterrestrial sources, or from chemical reactions of substances previously tied up in other states of matter), you would add more gas, and it would overall tend to be growing the amount of gas taking up space, and would cause the atmosphere to change size.  And that would cause more gas to start to escape to space, by having a taller atmosphere.  (Likewise if you heated the Earth significantly)

But coming back to your questions:

I find a contradiction between this observation and my understanding
of gravity especially because the atmosphere rises and expands in all
directions right at the surface of Earth where the force of gravity is
claimed to be it's strongest being that it's closest to the center of
Earth's mass and just as important, it's still expanding in all
directions at the highest altitudes.

It may appear it is expanding in all directions.  But it is actually quite limited over time.  Perhaps a bit like how when you stir up sediments in water, it seems to be moving in all directions... but over time it will tend to be affected by gravity and sink back down.  And the majority of the gas will over time tend back towards the lower levels of the atmosphere because of gravity too.  And if you released air atmosphere at the higher altitudes (at matching temperature) of the thermosphere where it is "settled apart" more, it would tend to sink more notably (like CO2 does in our low-level atmosphere), more vividly showing how gravity is counteracting gases leaving.
Comment: Really good explanation.  I can't independently verify everything is correct, if it is, it is of the highest quality indeed!
Answer: The Earth's atmosphere is held in place because it is more or less in hydrostatic equilibrium, where the pressure that would buoy it upward were it not for gravitation is in balance with the Earth's gravitation force that would otherwise pull the atmosphere downward.
Answer:
However, observable reality shows us that the atmosphere expands in all directions as it fills any and all available volume

A very close measurement will reveal that in the presence of gravity the gas does not fill the volume uniformly. The density will be slightly higher at the bottom than at the top. It is just that in everyday situations the difference is not readily observed.
However, over the entire depth of the atmosphere the density varies from what we observe at the earth's surface and approaches zero as we rise arbitrarily high. But it never actually reaches zero no matter how far you rise (though one will reach an altitude where other effects like the solar wind will overwhelm any measurable atmosphere).
So although the atmosphere is bound to the planet it occupies all of outer space; there is no true "top" to the atmosphere. For our own purposes we do define various boundaries between the atmosphere and out space, but these definitions are arbitrary.
Indeed the density never actually reaches zero, and the effect of this is that the atmosphere of any planet will very slowly leak away.
Answer: In the radial direction (upwards), the atmosphere is very close to hydrostatic balance, and allows only very small fluctuations in velocity (Mach number <0.1%).
In the horizontal direction the atmosphere has much larger freedom of movement, being mainly constrained by the Coriolis and centrifugal balance at large scales, which can lead to wind speeds of up to 5-10% Mach number. Still small against a Mach number of 1, at which the atmosphere would depart from any pressure balance.
This subsonic movement of gas is just shifting mass around, there is no net expansion of the atmosphere into space, which could only happen via a radial supersonic, or close-to-sonic expansion (a so-called planetary wind).
Hence the common saying (in scientific circles) that all movement in the atmosphere is just a small perturbation on top of a larger balance.
Comment: I think it's worth noting that thunderstorm updrafts caused by significant instability can manage even on the order of 100 m/s (200 mph) more localized from buoyancy.  Yes that's still a small perturbation in regards to time/distance scales, but not in overall magnitude (ask people's windshields in Texas today!)
Comment: @JeopardyTempest: Sure, but it's the mach number that counts for measuring how much inertial forces vs. how much pressure gradient is balancing gravity.
Answer: The simple answer is that it does not rise and expand in all directions. In your house or outside, the air is generally not expanding or contracting, and, on balance, neither rising nor sinking. Consider what happens when you blow up a balloon. If the air inside it was constantly expanding, then the balloon would get bigger even after you sealed it until it popped.
Of course, there are updrafts and downdrafts. But they balance out.
Certainly, if you pump all the air out of a chamber, and then open a valve to let air back in, it will expand in the chamber until it fills all the available space. But that is precisely because gravity is pulling down on the air everywhere, and the empty chamber is a place for the air to go to "get out of the way" of the surrounding air that's being pressed down by the weight of the air above it.
You say, "observable reality shows us that the atmosphere expands in all directions as it fills any and all available volume." But most available volume has already been filled, and once that happens, it stops expanding. It doesn't all just expand out into space and disappear.
Answer: Air at the same temperature and density released into (still) air at the same pressure will result in diffusion; it is an exchange of molecules where the individual molecules rarely go far in one go before bouncing off other molecules. Diffusion is a consequence of the energetic motions of molecules and their statistical randomness - there is no preferred direction. The mixture will tend to homogenize and tracking the individual molecules will show an expansion until homogeneity is reached - or other factor intevene. Atmosphere is not still and wind and turbulence mix and disperse them over longer distances.
Air released into vacuum will expand in all directions, because of air pressure, which is a consequence of those energetic motions of molecules and collisions with other molecules - which, embodying energy that is conserved, do not subside over time - but each molecule is also affected by gravity, so air released into a vacuum chamber on Earth is not expanding equally in all directions. The pressure gradient - from having the mass of air above plus gravity - will exist, even if very small elevation differences of a chamber would mean extremely precise measurements would be needed to detect it.
To escape to space a gas molecule needs a free path (no other molecules in the way) and sufficient velocity but on average gas molecules travel more slowly than Earth's escape velocity and relatively few manage to escape to space.
Where there is a free path (above most of the atmosphere) it is also colder, with slower average velocity.
To settle on the ground the energetic motions of gas molecules that prevent their compression  has to slow a lot, ie it has to shed energy and cool, to liquid and ultimately solid.
The molecules on average aren't fast enough (ie hot enough) to reach space and too fast (not cold enough) to settle to the ground. It is held between, in equilibrium.
Answer: The effect of gravity on gas molecules is too small to notice on small laboratory scales
What you observe in a small laboratory scale is not representative of what you observe on a large scale. But there are other observations that hint the small scale experiments in a lab where a gas released "fills the space" dont tell us everything. For example, the atmospheric pressure at the top of everest is less than 1/3 the value at sea level. So, on a large scale, gases clearly don't "fill the space".
But why the disparity between the two experiments? Consider a single gas molecule in air. To vastly simplify, it moves with an average speed of about 500 m/s. If it were an isolated ball moving directly upwards, it would, under gravitational acceleration, stop moving at something like 30km up.
But there are plenty of other factors influencing its motion in the laboratory atmosphere. The mean free path of a typical air molecule (nitrogen or oxygen) in lab conditions is <100 nm. So the possibility of measuring the impact of gravitation on its motion, even under purely diffusion controlled conditions, is pretty, impossibly low. And this ignores turbulence (ie weather) which thoroughly mixes the lower atmosphere making it even harder to see any gravitational effects (which would, for example, lead to denser molecules being more common lower in the atmosphere). In fact the separation by component is unobservable at the top of Everest for this reason. The equilibrium effect balancing the kinetic energy with the effect of gravity on particle motion manifests as lower pressure with higher altitude.
So for reasons of simple physics, gravity does have an effect but such a small one that it only becomes apparent over scales of kilometers. If you had a vacuum in a tube a kilometer or two tall and released gas into it, you would observe a lower pressure at the top compared to the bottom. The gas would not expand evenly to fill the tube. Most labs are not that tall so the effect is not observable on the lab scale. But can be seen easily if you travel up a tall building or a modest mountain while holding a barometer.
Answer: Let's look at a cube of air in the atmosphere—say a 1 m × 1 m × 1 m large cube.
While the force on that cube caused by the gravity of the Earth is directed downwards and pulls that cube towards Earth, there is another force that counters that force and pushed the cube away from Earth. This counteracting force is caused by the fact that the pressure in the air just below the cube if higher than the pressure of the air just above the cube, since the pressure steadily decreases the higher up in the atmosphere you get.
The pressure of the air just below the cube, when multiplied by the area of the side of the cube that is directed downwards (which is 1 m × 1 m or 1 m²), causes an upwards force on that cube that effectively pushes the cube away from Earth.
Now, this force is much greater than the force caused by the gravity, but there is also a corresponding downwards force caused by the pressure of the air just above the cube, which effectively pushes the cube downwards, which is almost as great as the upwards force from the pressure of the air just below the cube. And it so happens that the sum of the force cause by the pressure of the air just above the cube, and the force caused by the gravity, equals to the force caused by the pressure in the air just below the cube. So, the net force on the cube is zero, and that's why the air doesn't just fall down to the surface of the Earth.
I have ignored the forces on the cube caused by the pressure of the air on each of the four sides in the horizontal directions, since the pressure there is symmetric and thus those forces cancel each other out.
Or, at least that's the case in the ideal scenario. In reality, you have pressure fluctuations which makes the net force deviate slightly from zero. This in turn cases an acceleration and consequently movement of the air, which we call "wind."


Journal Abbreviations in achemso

Question: I am submitting a paper to ACS Nano using the achemso package. However, even after using ancac3 document class optiion the bibliography always shows the full journal name. ACS Nano would like to have the journal names abbreviated. Anyway I can accomplish this?
Answer: Abbreviating journal titles is something which it is not easy to achieve programmatically in a reliable way, as it needs a list of 'known' titles to work from. As such, achemso does not attempt to abbreviate the journal field. Tools such as JabRef do include the ability to search and replace full journal titles with the correct abbreviations.
At one point, I did explore some code to use a dictionary-based approach to abbreviate titles, but this is difficult to do reliably without some manual intervention. Thus it has never been included in release versions of achemso.
(Aside: biblatex with Biber does offer the possibility to do more complex field substitution, which could be used here. However, this is not at present a method which is sufficiently widely available to allow its use in achemso.)
Comment: Thanks for your suggestions. I was in a rush, so for the moment I decided to manually abbreviate the journal names (in accordance with the CASSI, which is what the journal asks for) in my Bibdesk file.
Comment: But I still don't appreciate the difficulty (this might have as much to do with my deep ignorance of LaTeX). The list of journals (especially the ones that chemists are wont to cite) is finite and 'known'. So is the unique abbreviation that each of them is assigned, so whats the problem? I think this is a huge bottleneck in achemso - since each journal needs its own bibliography format and this can be a severely limiting feature.
Comment: @NanoBuff Every chemistry, physics and biology journal I know uses abbreviated names, and these are standard. Thus the usual approach is to use only the abbreviations in the `.bib` file: this is not journal dependent. As I say, the issue was getting things reliable enough to work, particularly with the requirement to work on the ACS servers (which do not have for example e-TeX). I can of course look at this again: there are a number of potential approaches.
Answer: I experienced the same problem and wrote a simple python script to replace these names with their abbreviations, based on the CASSI online database. It can be found here on GitLab. The database I made is far from complete, so please add the journals you need. It also lets you titlecase the paper titles and make latin italic.

Journal Abbreviations in achemso


Is there a tense issue in this sentence?

Question: The garbage bags slipped from her hands, crashing to the ground.
Comment: No tense problem, but a style problem: another one of those awful gerund phrases ("crashing to the ground") that should really be conjoined with "and": _The garbage bags slipped from her hands **and crashed** to the ground_.
Answer: In a word, no.
I presume you are referring to the apparent tense difference between slipped and crashing.  However, crashing to the ground is a participle phrase (that is, a verb phrase functioning as an adjective) that modifies the noun, bags.  As such it is under no requirement to conform to the tense of the main verb.  As noted on the linked page,

A present participle attributes a quality of action to the noun, which is viewed as undertaking the action [...]. A past participle views the noun as having undergone the action expressed by the participle[.]

The bags, at the point when they were slipping, were also crashing; Thus the present participle (crashing) is called for.
Answer: Yes, there is a problem. I think the sentence should read:

The garbage bags slipped from her hands and crashed to the ground.
Answer: There is no tense problem even if it appears there is. This is a very common usage. However, I think on would suit better:

The garbage bags slipped from her hands, crashing on the ground.


unobtrusive validation with custom validator that requires ajax post

Question: I'm using ASP.NET MVC with unobtrusive validation. I need to add a new custom validation attribute with client-side validation, which is fine (I've already got some of those defined). The problem is that in the client side validation, I need to make an ajax call to check if the input is valid.
In MVC, you add client-side validators with addMethod:
jQuery.validator.addMethod("customValidation", function(){...})

But the function you define needs to return a boolean, and doing an ajax post is aysnc, which breaks that.
According to jQuery validator and a custom rule that uses AJAX there are 2 options - either use async:false in the ajax call or add a remote to the validate method. BUT, async:false is depcrated and I can't use remote because I'm using unobtrusive validation.
Has anyone got any better solutions to this?
Comment: Can you post the javascript validation method, or at least its logic ?
Answer: Data annotations contain a Remote attribute that plugs into jquery remote validation automatically.
https://msdn.microsoft.com/en-us/library/system.web.mvc.remoteattribute(v=vs.98).aspx