How does Amazon bill me without the CVC / CVV / CVV2?

Question: The card in question is a VISA, if that's of any importance. I've noticed this only on Amazon. All other sites I've purchased something from, ever, have needed the CVC code for the card. However, I know I never entered the CVC on Amazon when I added my card to it, and this has been bugging me ever since. How do they successfully charge the card without the CVC code?
Comment: CVC isn't required though often payment handlers will give you a discount for using CVC so quite a lot of people choose to do it, there are also the fraud benefits mentioned below. It might be worth noting that here in the UK I have to use CVC for Amazon - it's possible that they're doing some risk assessment and allowing no-CVC if they deem you less risky enough.
Comment: @GdD If you read the PCI DSS requirements it clearly states you are not allowed to store CVC/CVV/CVV2 codes. See page 8 https://www.pcisecuritystandards.org/documents/pci_dss_v2.pdf
Comment: IIRC, PCI compliance has nothing to do with whether you use the CVC code or not, it's about dealing with credit card data securely. It's up to a business whether they use CVC codes or not.
Comment: @AndySmith funny thing -- I actually order through the UK store when I need stuff that's not deliverable electronically, and they don't ask me for the code. Must be at least somewhat individual then...
Comment: @AndySmith I'm in the UK and I don't have to use it, I do have Amazon Prime however so maybe they don't require the CVC for people have that extra service.
Comment: @TC1 - One of the thing Amazon does to verify you actually have the card on file is request you enter the entire credit card number again after a period of time.
Comment: What use is CVV / CVC if it can be stolen by a phishing attacker?! (http://en.wikipedia.org/wiki/Card_Verification_Value#Limitations)
Comment: @user30291 A plain card number (and name) is much easier to get compared to the same plus the CVC, just because they are handeled separately. Normally, the CVC is even handeled more secure, but that's not even required to make it more save. It's like with a door that has a second lock of a different type, both easy to pick.
Comment: when CVC first appeared it was considered proof that who provided it had the card.  it was as if it made credit cards 2FA'd.   of course, it didn't.  it just added a few more bits of entropy and diluted a fairly dense space.  about all it protected against was those who try to guess numbers (the assignment density issue).  i guess Amazon is willing to take the risks.  they will probably ask for CVV or other info from IPs determined to be more risky or high price purchases.
Comment: Hm, I am quite sure I entered my MasterCard CVV, maybe you have the secured by visa redirect thing active?
Answer: That code isn't necessary. This may cause more fraud and more chargebacks, but Amazon keeps those numbers low so that they can offer a faster shopping experience such as one-click.
The only thing necessary to make a purchase is the card number and, in all but rare cases, expiration date, whether in number form or magnetic. Most systems require more information (such as matching full name, bank phone number, physical billing address with zip code, et al) so that they can deal with fraud and/or chargebacks, and sometimes this is enforced by the issuing bank.
Comment: @deed02392 After researching it a bit, I found [this site](http://www.datamation.com/columns/executive_tech/article.php/3607996/Credit-Card-Expiration-Dates-Are-Obsolete.htm) which says "big players in the U.S. consumer-sales industry have developed informal agreements with credit-card issuers that allow charges to be made to consumers' credit cards without specifying the expiry month and year". So it looks like the big guys get to do whatever they want while small merchants (like us) don't have these special agreements. So what I said above is not entirely true.
Comment: Where is the procedure defined? Is it card specific (e.g., VISA, Master etc.) + bank enforcements?
Comment: I believe that the procedure(s) end up being defined in the merchant's contract with the payment processor (someone like Paymentech or Heartland or BillMatrix).
Comment: You certainly **DO** need the expiration date to charge any card. We charge cards manually all the time, but this is impossible without the expiration date. I would assume it's used as sort of a "control" since card numbers can easily be generated by trying numbers and feeding them into the Luhn algorithm. However the expiration date cannot be validated programatically.
Comment: @TC1 - It would defined with Amazon's merchant contract agreement.
Comment: @Mike I think we need some citations.
Comment: And this is precisely why I prefer to request a new card number when a card expires.  I don't want ANY entity able to bill me unless I specifically add/update my credit card info.
Answer: Amazon pays a slightly higher rate to accept your payment without the CVV, but the CVV is not strictly required to present a transaction - everybody uses CVV because they get a lower rate if it is present (less risk, less cost).  Nobody who knows what they are doing will store your CVV - if the card networks suspect that you are storing CVV, you will have forensic auditors on your site REALLY fast.
Where is the procedure defined?  As noted above, it's the bank that boards the merchant account and there is a wide range of flexibility depending mostly on the merchant's track record for many good transactions and very few chargebacks.  You and I might not be able to process transactions without an exp date, but Amazon surely can if they want to...
Comment: I have personally implemented payment forms at least twice and both times, the fee for running a transaction without CVV was higher than the fee for running the transaction with CVV. I can't say whether Braintree charges higher fees without a CVV nor whether Amazon has negotiated a deal without extra fees or with fees low enough to find acceptable.
Comment: @Nimbuz With Braintree, yes, because they are both the payment gateway and the merchant bank and charge a flat rate. If you had a large volume and independent merchant bank and payment gateway, I do believe you may be able to negotiate a discount for opting to use CVV and lowering your charge-back rate.
Comment: Nimbuz can you provide a reference for that?
Comment: Not true, rate is the same wether or not you provide the CVV, braintree recently confirmed that.
Comment: Amazon cannot charge without the expiration 'if they want to'. I've had many cards expire with Amazon and they won't ship without it, even though the # is the same. Here is an example of a minimal API call through a credit card processor: https://www.braintreepayments.com/docs/ruby/transactions/create#minimal_example
Answer: The CVC (sometimes "CVV" or "CVV2") is supposed to indicate whether the card is present at the time of the transaction. Card companies require that it never be stored or recorded, but rather passed directly from the customer to the merchant gateway and then immediately forgotten. Therefore, any time you give that number to a merchant, they're supposed to use it immediately and then immediately forget it.
Since this number is theoretically never recorded in any database, having this number present at the time of the transaction should indicate with greater certainty that the card itself is truly present and therefore that the transaction is not fraudulent. As such, providing this number decreases the probability of the transaction being rejected.
Alternately, a transaction submitted without the CVC indicates that the transaction was submitted using previously stored credit card information, but the card was not itself present at the time of the transaction.
Some merchants ask you to provide this number when saving a card on file. What they should be doing with the verification code if they do so is requesting verification from the bank that the code does in fact match, but then they should not store the CVC code in their database. The purpose would be to ensure that you're not storing on file a stolen credit card--primarily for the merchant's safety.
If a merchant does in fact store this code and a card company finds out, it's big trouble and can result in some steep fines.
Comment: so basically a transaction w/o the CVC is a transaction w/o the card, like those automatic renewals for many things i have, such as Amazon Prime and a few domain names.
Comment: So, what's the point of not requiring the CVV when adding a card?? This is nonsense...
Comment: @marcolopes it all depends on how the merchant interacts with their provider. Some providers offer the option of verifying a CVV when adding a card, and may even give the merchant a token indicating the CVV verification that can be passed when the card is used. Or perhaps when adding a card the merchant does no verification at all because the programmer didn't think about it. It all depends.
Answer: This question has been sufficiently answered.
However, one more fact I believe to be interesting and relevant is that even if a merchant collects your CVV2 and discovers that it is incorrect, the merchant may still charge you at their discretion.

The issuer may return several pieces of information to the merchant (e.g.
  authorization or rejection, address verification service (AVS) and CVV2 match
  responses). AVS tells the merchant how well the billing address supplied by the
  cardholder matches the billing address on record. A rejection notice overrides any
  decision the merchant may make to accept the transaction, while the treatment
  of AVS and CVV2 responses are up to the discretion of the merchant [23].
Molloy, I., Li, J. & Li, N. 2008, "Dynamic Virtual Credit Card Numbers" in Springer Berlin Heidelberg, Berlin, Heidelberg, pp. 208-223.

Reference 23 in the paper cited above is:

Visa International Service Association: Rules for visa merchants - card acceptance
  and chargeback management guidelines. Technical report, Visa International
  Service Association (2005)

This also answers a closely related question (that of charging with an incorrect CVV2, as opposed to no CVV2 at all) that I believe was marked as a duplicate of this question incorrectly.
Answer: I confirm that Amazon strangely doesn't make use of CVC (also "CVV" or "CVV2"), however there's nothing magical about Amazon itself, it's all up to the bank to accept payments without this security code.
For instance in my case I wasn't able to associate a master card as a payment method because my bank probably didn't accept charging without this code.
I asked for assistance at Amazon and was replied:

Thank you for your interest in Amazon Web Services.  I'm sorry for the
  trouble you're having activating your services. Most Amazon Web
  Services require a valid credit card to be added to your account.
I've checked your account and found that we were unable to authorize
  your credit card for your recent sign-up.

Amazon is not set up to accept the CVV2 security code associated with credit cards. Your bank may be able to temporarily lift this
  requirement.

As you see they suggest asking my bank to temporarily lift this requirement so that they can charge without using the CVC.
So again, some banks may accept not using this CVC, some may not, most probably will whitelist Amazon only because it's Amazon.
Comment: based on another answer, merchants are not permitted to store the CVC.  yet quite many are able to do automated charges.  that has to be w/o CVC or they stored it.  but at least they know it went through the first time.  and with the expiration date they know when to stop doing that.
Comment: @Skaperen yeah I guess if the first time they were able to charge you with CVV/CVV2/CVC they can trust you enough to not ask for the CVV again as it's probably your card. I would assume that's how the "save/remember payment method" works that doesn't ask for CVV again.


Ceph - Prepare Shared SSD For Journaling

Question: The Ceph documentation for adding drives shows the use of the prepare statement twice, with the same drive for the journal as shown below (where /dev/ssd is the journal drive):

Once the prepare statement has been executed once for preparing /dev/sdb, the partitions have already been made on /dev/ssd, so preparing /dev/sdc fails.
Question
Is the prepare statement supposed to work by destroying and recreating the appropriate number of partitions on /dev/ssd (now 2 instead of just 1) or are we expected to manually configure the partitions ourselves and the documentation is wrong? If we manually create our own partitions on the shared journal drive, what command do we specify for preparing drives sdb and sdc, since if we leave out the journal part (:/dev/ssd) on each of the prepare commands, it will create two partitions on each drive instead of just one, as it expects the second partition to be used for journaling? Finally, if we manually create our own journalling partitions, should they use the XFS filesystem in production?
Answer: you may parted ssd to two partition /dev/ssd1 /dev/ssd2
parted sdb to one partition sdb1
parted sdc to one partition sdc1

and then
ceph-deploy osd prepare osdserver1:/dev/sdb1:/dev/ssd1
ceph-deploy osd prepare osdserver1:/dev/sdc1:/dev/ssd2


Techniques for proving a series is uniformly convergent

Question: I am trying to determine whether the series$$\sum_{n=1}^\infty{\frac{x}{n(1+nx^2)}}$$is uniformly convergent on the real numbers, and am really stuck. I have tried using the Weierstrass $M$ test but cannot seem to find any series greater than this which is convergent. I have looked at comparing it to series which have $1/n^k$ in particular. Are there any other methods I can use? Or am I just using the Weierstrass M test incorrectly?
Comment: uniformly convergent where?
Comment: @zhw Sorry, should have clarified. On the reals.
Comment: You are not using it incorrectly. In this case a different method is preferable.
Answer: It is easy to see that$$\max_{x\in\mathbb R}\frac x{n(1+nx^2)}=\frac1{2n^{3/2}}.$$This is so because$$\left(\frac x{n(1+nx^2)}\right)'=0\iff\frac{1-nx^2}{n(1+nx^2)^2}=0\iff x=\pm\frac1{\sqrt n}$$and$$f\left(\pm\frac1{\sqrt n}\right)=\frac1{2n^{3/2}}.$$Now, you can apply the Weierstrass $M$-test with this upper bound.
Comment: Or simply use the AM-GM inequality as in the solution I posted. ;-))
Answer: From the AM-GM Inequality, we have $1+nx^2\ge 2\sqrt{(1)(nx^2)}=2n^{1/2}|x|$.
Therefore, we can write
$$\begin{align}
\left|\sum_{n=1}^\infty \frac{x}{n(1+nx^2)} -\sum_{n=1}^N \frac{x}{n(1+nx^2)}\right|&=\left|\sum_{n=N+1}^\infty \frac{x}{n(1+nx^2)}\right|\\\\
&\le \sum_{n=N+1}^\infty \frac{1}{2n^{3/2}}
\end{align}$$
Inasmuch as $\sum_{n=1}^\infty \frac{1}{n^{3/2}}<\infty$, then for any $\epsilon>0$, there exists an number $N$ independent of $x$, such that $\left|\sum_{n=1}^\infty \frac{x}{n(1+nx^2)} -\sum_{n=1}^N \frac{x}{n(1+nx^2)}\right|<\epsilon$, which establishes the uniform convergence.
And we are done!
Comment: Please let me know how I can improve my answer. I really want to give you the best answer I can. If it wasn't useful, I am more that happy to delete. Just let me know please.


Keycloak Docker behind loadbalancer with https fails

Question: I am trying to use clustered keycloak docker behind the A10 load balancer. I am trying access all the request by https from the client application. My issue is that the same setup is working when we try to access keycloak has HTTP but at the same time when we try to access this has HTTPS it is not working. Can anyone help me to solve this issue? Please let me know whether the issue is in the keycloak level or A10 load balancer level.
Answer: I know this is an older question, but I couldn't find a satisfying answer anywhere and I wanted to share my solution. This eventually worked for me in an AWS Environment with an Application Load Balancer:
Run the keycloak docker container with the environment variable PROXY_ADDRESS_FORWARDING=true
As seen in the keycloak docker documentation:

When running Keycloak behind a proxy, you will need to enable proxy address forwarding.
Answer: I don't know A10, but you have to ensure that it sets the request headers X-Forwarded-For and X-Forwarded-Proto.
Then you have to configure Keycloak (Wildfly, Undertow) to work together with the SSL terminating reverse proxy (aka load balancer).
See http://www.keycloak.org/docs/latest/server_installation/index.html#_setting-up-a-load-balancer-or-proxy for a detailed description.
Comment: any idea with this https://stackoverflow.com/questions/48513451/keycloak-with-nginx-proxy-server-not-authenticating-rest-api?noredirect=1#comment84046838_48513451?
Answer: You need to add a Request Header (X-Forwarded-Proto:https) to your template.
ADC -> Templates -> L7 Protocol -> {your template} -> Header Insert :
Add
Header Name: X-Forwarded-Proto:https
Insert Type: Insert If Not Exist
I hope this can help you.


How Anomaly Analysis is differentiating from Heuristic analysis

Question: Taking a look at the discription of both kinds, orientation seems the same. while it isn't the same I can't figure the difference. In a Heuristic scan it looks for suspicious or malicious behaviors in a file, Anomaly analysis looks for anomalies in a file and its structure.
Answer: It's the difference between "weird" and "bad".
Anomaly analysis looks for the "weird". There is no judgement about whether it is "bad". In a lot of contexts, weird = bad, but not always.
Heuristic analysis learns what is "bad" and looks for that, even if it turns out to be "normal".
Answer: Search for anomaly is look for things that aren't bad per se, but usually isn't common. For instance, a freshly registered domain being accessed late night, and receiving lots of traffic. Or your HR computers accessing Github, or executing PowerShell scripts.
Those things are not wrong, they are out of place. Accessing Github is not wrong. But it's strange for certain group of users. In this case, an heuristic scanner would not find anything strange.
On the other hand, an anomaly detector needs a baseline. If you don't have a good baseline, you will either get a lot of false positives, and end up shutting down the scanner, or a lot of false negatives and will not be of any use.
Comment: Great answer. Does a heuristic scanner also needs a good baseline to deal with FP's FN's or is a heuristic scanner by nature more (not fully) resistant to these?
Comment: They need a baseline too, but it's easier to make. Binding a socket to cmd.exe, for example, is almost universally a bad thing. Acessing github? It heavily depends...


How can I count the total friends of a Facebook user by uid?

Question: How can I count the total friends of a Facebook user by uid?
Answer: There is a friend_count field against the user table that you can query.
SELECT friend_count FROM user WHERE uid = me()

Just replace me() with the UID of the user that you want to query.
Answer: @Scott
This very much works, I didn't expect it to :)
https://graph.facebook.com/fql?q=SELECT friend_count FROM user WHERE uid = 273103345
I tried with a random user id who is not a friend in Graph API. However for few random uids it returned null, I am guessing they were pages.
Comment: FQL is deprecated now.
Answer: FQL is now deprecated as of October 2014. Quoting Facebook's FAQ :

As of Tuesday 22nd July 2014, we now return a total_count field within
  a summary property in the response to /v2.2/me/friends.

The user/friends endpoint does require the user_friends permission to return an actual list of friends who use your app, however the friend count field will still be returned without this the user_friends permission granted. Sample response:
    {
  "data": [
  ],
  "summary": {
    "total_count": 811
  }
}

Full FAQ: https://developers.facebook.com/docs/apps/faq#total_friend_count
Answer: COUNT is not supported by FQL:
SELECT uid2
FROM friend
WHERE uid1 = USERID

Since COUNT is not supported you need to get all of the records and then count them in whatever application that is making the SQL call.
If you want to get more information, like names, along with count you can use an inner select to get the friend's extended info:
SELECT name
FROM user
WHERE uid IN (SELECT uid2
              FROM friend
              WHERE uid1 = USERID)

Here is a related SO question:
FQL result count
References for Friend table:

Query this table to determine whether
  two users are linked together as
  friends.
Answer: Heres my solution... works great!
$myfriends = $facebook->api('/XXXXXXX152466/friends');
$friendcount =  COUNT($myfriends['data']) + 1;

Replace XXXXXXX152466 with the facebook profile id#
Using Facebook PHP SDK along with Graph API!
Comment: I think the result is a paginator, so I should it is not good if an user has a lot of friends.
Answer: Starting with Facebook API 2.0 you can't get the full list of Facebook friends, only a partial list of friends that also authorized your app.
You can still get the total number of friends though, the Graph API user/friends has a field summary containing the count as total_count
So you can get it using:
FB.api("/me/friends", function (response) {
   if (response && !response.error) {
      console.log(response.summary.total_count);
   }
});

Answer: There are lot of way to count the no of friends using Facebook Graph API with Php SDK, out of one i am telling..
$fbuser=$fb->api('/me/friends');
$access_token = $fb->getAccessToken();

$friend_count=0;
foreach($fbuser['data'] as $friends)
{
  $friends_count++;
}

For complete tutorial visit this article Getting FB Friends Count


Analysis Textbook

Question: Does anyone have an recommendations for an Analysis textbook for beginners? I'm looking for a textbook that's like Calculus Third Edition by Smith and Minton in that it's hardcover, has good illustrations and is easy to understand, but I don't want anything that skimps on the proofs.
Thanks
Comment: See also: [Good book for self study of a First Course in Real Analysis](http://math.stackexchange.com/questions/62212/)
Comment: I highly recommend Spivak's *Calculus* with the solutions manual.
Comment: For calculus with proofs, Tom Apostol's Calculus Vol. 1 is quite good.  For something that's more difficult that you would use in a real analysis course at a university, Rudin's Principles of Mathematical Analysis is a standard textbook, although the density of that book might not exactly suit self-study.
Comment: Best book hands down is Advanced Calculus by Fitzpatrick.
Answer: For self-study one could do a lot worse than to begin with Edward D. Gaughan's Introduction to Analysis before moving on to something more advanced: roughly speaking, it goes back and does the basic theory of the topics typically covered in freshman calculus of one variable. It was designed to be transitional between calculus and graduate-level real analysis, and I remember it as being both rigorous and quite gentle; we used it in a transitional course between calculus and a much harder and more general undergraduate real analysis course.
I liked to use the second edition of Robert G. Bartle's Elements of Real Analysis when I taught the more advanced real analysis course; it's especially good on the topological aspects of analysis in $\Bbb R^n$, and on the whole it's very clearly written.
Comment: +1 for Bartle's *Elements of Real Analysis*. It was the text for my first analysis course, and in hindsight I'm glad the professor chose to use it instead of the more customary Rudin. Bartle's book is more user-friendly, covers more topics, and has much better exercises, in my opinion. Unfortunately, my copy is in several pieces now and apparently the only version in print is a $170 paperback edition :-(
Answer: Understanding Analysis by Stephen Abbott.
Elements of Real Analysis by Charles Denlinger
Answer: Real Mathematical Analysis by Charles C. Pugh
Elementary Analysis: The Theory of Calculus by Kenneth A. Ross
Answer: In my (elementary) real analysis class we used a book by Stephen Lay called Analysis With an Introduction to Proof. The reviews are generally positive and I thought it was a great book. My only gripe is that there are no solutions to even/odd numbered exercises except for one or two hints for each section. Also, it's incredibly expensive considering it is about the size of an iPad. In terms of content, it was excellent. There were many examples presented and the proofs were straightforward and easy to comprehend. The text started by covering logic and proof techniques, and even provided some "fill in the blank" proof questions that really eased you into it. I would recommend it for a first text in analysis.
Answer: Since you have not accepted an answer - and they are all good - I will suggest my favorite.
These are free notes (they almost read verbatim) of a RA course given by Vaughan Jones (Fields Medal winner - aka Nobel for math). They are complete and offer his own treatment, which is indubitably excellent:
https://drive.google.com/viewerng/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxtYXRoMTA0c3AyMDExfGd4OjJiNTJkM2M2ZWUzZGIwYWQ

Analysis Textbook


Unable to update or download apps on iPhone 6 - process hangs

Question: When I attempt to update any app on my iPhone 6, the little process circle that appears after you click "update," just continues to swirl, remaining in that state as long as I let it. I have to quit the app store app or reboot my phone to get it back to the update button (even if I try pressing the swirly circle, it does not change).
I've tried a hard reset, tried deleting any recently added apps. Some apps I'm unable to delete, because they appear to be in a transitional state (partially greyed out, like they're downloading or updating) and, I cannot see any third party apps when I go into settings, manage storage - it loads all the native apps, then appears to be in the process of loading the rest, but never continues. It shows i have 2.5gb available memory, so I should be able to at least update some apps, unless that figure is not correctly representing everything on my phone.
I'm running iOS 9.0 and am extremely apprehensive about updating, because my phone was bricked for two days when i updated it to 9.0. I have an iPad air 2,which i had no trouble updating to 9.0, and am experiencing no issues with now - I'm able to update and download apps fine. And yes, I did log out of the iTunes app store, then back in, but it made no difference. I've not connected it to iTunes on my computer, because I'm currently servicing my pc.
Any ideas? I've tried everything i can think of.
Answer: It seems you're in a tight spot and have a pretty tight knot tied up with some really solid thinking.
Let's unravel things a bit. Get out a piece of paper and start writing times and limiting things you change to one at a time.

Put the phone in airplane mode and power it off. (note what you did and the time)
Power it on while disconnected and go delete all the apps that are stuck that you can afford to lose and re-download. (keep writing times and actions :-)
Check your storage usage and make sure each app gives you a number. If you can't get the usage numbers to paint while in AirPlane mode, start deleting things that take a lot of space. Movies, songs you can re-download until the device is working.
If you can't get it to a sane place in AirPlane mode, consider a call to AppleCare or just getting a backup to iTunes and wiping the device.

If you can resolve the transitory apps and get things working, go ahead and re-connect to the network and see if you can let the rest of the apps download. If so, proceed:

Turn off all background refresh in settings > general
Turn off Handoff (same place - higher up)
Set the time wrong - about 4 minutes in the past
Enable automatic time setting and verify that it returns to the correct time
Reset network settings (which will clear up several things and perform a minimal restart)
Pick one app that's small. Clicker is a good one Try downloading it.
If that fails, sign out of the App Store and power off the phone
Start the phone and try to download Clicker again.

If that fails, Apple support might be needed to assist. You could try changing your network (use LTE or cellular data if you're on WiFi now) or change WiFi to another location. The good thing about your notes is you will have some very specific times and steps and can start to notice patterns and perhaps ask a follow on question if needed.


What is the impact of selection on orthologous and paralogous genes? How would this impact differ in different regions of protein coding genes?

Question: Since paralogs increase the size of the genome and provide more opportunity for the evolution of novel characteristics, would they be more prone to selection?
Answer: Exactly .
Paralogs and orthologs , both go under natural selection. But harmful mutations tend to have a less fatal effect if they happen to paralogs as there would  be a backup for the malfunctioning protein. In paralogs, if a bad mutation happens to a protein, the paralogous protein will compensate and help the organism maintain its function but in orthologs one mistake is enough to do harm because there are no other proteins to perform the function of the wild protein.

All the different members of the tubulin family of genes (and
proteins) are sufficiently similar in sequence to suggest a common
ancestral sequence. Thus all these sequences are considered to be
homologous. More specifically, sequences that presumably diverged as a
result of gene duplication (e.g., the α- and β-tubulin sequences) are
described as paralogous. Sequences that arose because of speciation
(e.g., the α-tubulin genes in different species) are described as
orthologous

Reference : Molecular Cell Biology of Lodish et al 8th edition page 325
Also see Campbell Biology 9th edition chapter 26 section 26-4
Comment: this is a good answer, but it would be helpful to include a source or citation.
Comment: @sam, thanks for the great answer! I am just wondering though how the impact of selection would differ in protein coding regions.... I know it would be more impactful in this region as opposed to non coding, but im not sure how the impact differs between protein coding regions.. or why? thanks!
Comment: @Manon Valiquette , natural selection effects the whole gene.  (Beneficial) selection in protein coding regions includes 1.Active sites / binding sites for complexes  2.Allosteric domains 3.Structural/Less important sections. In 1 , any change leads to a large scale of "FUNCTION" and  the "AFFINITY" to ligand of the protein/enzyme.  In 2 alternation of sequence leads to changes in "AFFINITY" for the ligand and more importantly "RATE OF CATALYSIS", while changes in 3 tend to have a less impact on the protein. Plus selection can also occur in non coding regions which mainly result in ---
Comment: --- "Gene expressing patterns and timing and amount of transcription" . for example a selection in promoter sequence can increase the rate of trancription of a specific gene , leading to overexpression of it which sometimes may be beneficial. I hope that I've understood your question correctly.


What equipment do I need to take photomicrography pictures?

Question: Just saw many amazing micro(macro?) pictures like this 9x magnification of nylon stockings on the Nikon Small World website. I wonder what equipment do I need (from scratch) in order to take those pictures or videos? Use the one I linked as an example. I am hoping a camera setup rather than using microscope if possible. May list the price range so that I can see if I can afford it to become my new hobby. Thank you.
Comment: That seems a bit beyond normal macro magnification - might need a microscope for that... Does Nikon have something similar to Canon's MP-E 1-5X macro? That image is probably beyond 5X, even, though....
Comment: @twalberg according to the image description, it is 9x magnification.
Comment: @twalberg Not unless Nikon has released one very recently.
Comment: @Jonas Many of the other photos there are much higher magnifications, others are less.
Answer: Details are described in the Nikon Microscopy University site.
Essentially, you need a microscope that includes a special lightsource designed for polarized light observations, a polarizer, special lenses with interference patterns, rotating stage to get the correct angle, and a digital camera system and extension tube.
It might not surprise you that Nikon is a significant vendor and manufacturer of microscopy solutions.
I doubt this is in many photographer's 'hobby budget'. Prices of these are not published, but used equipment on eBay are priced at $18,000+ USD.
Comment: OMG thanks. I am not going to take any pictures using microscope, definitely for labs or researchers. But still, very amazing!
Comment: Sorry for a followup. So when the magnification is less than 10x like my linked example, can there still be a camera setup instead of microscope?
Comment: 10x is 10 times actual size. Macro often tries to get to 1x or actual size, or rarely as much as 4x, but lighting and focal distance is very difficult with a camera
Answer: If it is just as a hobby, you could try some workarounds. Try to play with a home made setup, 9x does not seem extreme:
if you want to use one, educational microscopes, the ones that meant for children or schools, can be kind of inexpensive.
You will need to attach to it the camera somehow, maybe with the adition of some spacer rings to be able to focus at shorter distances.
Polarized light is only an option, but if you want it, you can try with a polarized source, like the screen of your phone (probably not very powerful), or filtering any light with some polarized glass. You can use a photography filter or even sunglasses or any other polarized thing (like the inside of the old floppy disk, but will probably be too dark).
I have tried comparable setups in different applications, and even if the results are not comparable to using the real things, they were good enough to get relevant scientific data
Answer: There is an accessory called a bellows that goes between the camera body and lens and enables higher magnifications than macro lenses/extension tubes/diopter-add ons. Specific magnifications figures are determined by the focal length of the lens and the extension length used on the bellows.


Ficus tree leafs with spots, get yellow and fall

Question: Hi I´ve a Ficus for many years  without any issues. For some 6 months or so the leafs started getting yellow and fall.
Answer: This is too much water or poor drainage or both.  The soil has less air spaces due to too much water and this promotes the growth of fungus/virus/bacteria which show in the leaves as the spots.  Indicators are:

shows on older leaves first
close examination shows a dead spot surrounded by a dying brown ring which is typical of the growth/rest/growth life cyle

Ficus are tough.  Cut the plant back hard, reduce watering, increase light and the plant will bud out new growth and overcome the problem


Apple website animations do not work on Safari 11

Question: I have a Late 2011 15" MBP with El Capitan(highest update). The animations on Apple website do not work on any browsers (Safari 11, Firefox 57, Chrome) even if the discrete GPU is being utilized. WebGL, CSS animation settings are turned on. The same animation works on other Windows PC with any browser. Is there any setting I can change?
Answer: 'Block auto-playing videos' related? https://www.cultofmac.com/488858/safari-11/


What would it take to replace the electoral college system?

Question: It seems electoral college debate comes back every election these days. What would be needed to replace/remove this system? An amendment? ratification? Is it even possible?
Comment: This question asks for the process of removing or changing a law, which would make it more suitable for the site politics.SE
Comment: This question [is already answered on politics.SE](https://politics.stackexchange.com/questions/8589/what-steps-need-to-happen-for-the-alternative-vote-to-be-implemented).
Comment: No, actually it is not answered there, from the legal perspective.
Comment: @user6726 Many other questions have been closed because they ask about the process of changing/creating laws. Changing, creating, or removing laws by their nature can only be done through political processes. Creating and removing laws is done through the Legislative branch (e.g. politics). I will give you that the courts can strike laws for being unconstitutional, but the electoral college is apart in the Constitution.
Answer: The election of the president (and VP) is a function most directly of Article II Section 1 Clauses 2 - 4 of The Constitution and the 12th and 23rd Amendments. Sections 2-3 of the 14th Amendment would probably have to be rewritten, since they also refer to there being "electors". A single constitutional amendment would suffice (and nothing less than an amendment would): the wording would of course depend on what system you wanted to replace it with. In doing this, it should be decided how to deal with the fact that electors cannot vote for both a president and vice-president from the elector's state (per the 12th Amendment): that might indicate an intent to prevent the president and vice-president from being from the same state, or it might mean that the intent was that if that happens, then that state's electors can't vote for their two favorite sons. In repealing the 12th, you can decide what you want now.
There is a proposal to effectively nullify the Electoral College, the Popular Vote Compact, which has been enacted in a few states. The basic idea is to make it a statutory requirement at the state level that all electors must vote for the winner of the popular vote at the national level, regardless of the outcome in the particular state. The idea is that when enough states agree to the scheme such that they hold a majority of electors (which can change over time, so to be stable you need more than a simple majority), then they vow to vote for the winner of the national election. However, this also needs to be backed up with more compulsory faithful voting of electors, since compact or no compact, only 1 state seems to be able to actually prevent an elector from voting however he wants.


The difference between Zn and Al on acid and base reaction

Question: Because it was written on my textbook that Zn and Al dissolves in acid and alkali, I tried.
When I put Al in NaOH solution it reacted immediately. But when I put Zn in the same concentration of NaOH solution it didn't react. I heated and added NaOH and at last it emitted some bubbles.This is what I observed when I reacted alkali and Al or Zn.On the contrary, when I put Zn into 9.5% HCl solution it reacted at once. But when I put Al into the same concentration of HCl solution, it took so long until it starts to emit bubbles.Could anyone explain why there is such a difference?
Answer: A "piece of aluminum" is not pure aluminum, but a sample of pure $\ce{Al}$ with a strong protective layer of $\ce{Al2O3}$. Interestingly, pure aluminum oxide forms complexes and reacts with NaOH, but $\ce{Al2O3}$ is only sluggishly attacked by $\ce{HCl}$. Here is a supporting reference:

In aqueous solutions of HCl acid aluminum wire does not dissolve due to presence of oxide film on surface.

And, a more detailed answer, per the same source:

Theoretically, the oxide film on Al is soluble in low pH solutions. However, in practice, the cathodic reaction, hydrogen reduction, results in a diffusion layer with a pH at the surface that is much higher than the bulk solution pH. This retards the rate of dissolution and can even bring it to a virtual stop if it enables a uniform passive film to form. In high pH solutions, the reverse is the case and dissolution is accelerated, instead of retarded, by the pH shift that accompanies hydrogen evolution. In less pure Al, the inclusions become dedicated sites for the hydrogen reduction reaction restricting the pH shift to their locations, and this allows dissolution to continue at anodic sites.

On the topic of zinc and HCl per an educational site:

Let's examine the example of the interaction between zinc and hydrochloric acid. Zinc also reacts with HCl, releasing small bubbles of hydrogen and forming zinc chloride ZnCl₂.

But why small bubbles? My answer, there is also hydrogen embrittlement occurring on the zinc surface, as highlighted in recent research, "The Effects of Zinc Alloy Electroplating on the Hydrogen Embrittlement of High Strength Steels", to quote:

Hydrogen permeation measurements were performed and indicated that the quantity of hydrogen absorbed by the steel substrates is critically dependent on the composition of the initial deposit. Large quantities of hydrogen were trapped in the coatings and continued to diffuse into the steel over extended times after the plating process was completed.

I trust this helps.
Comment: Thank you very much for taking time to answer my question. I tried again with alminium foil and copper into HCl. This time bubbles formed on copper and aluminium dissolved very fast. Your answer was very helpful!


Where to find instrumentals?

Question: I enjoy rapping along with the artist while listening to (Hip-Hop / Trap) music.
But sometimes I'd like to rap all myself over the beat.
In such an occasion I have to search for the instrumental, the beat only without the artist's voice. I usually do so on YouTube. But for certain songs there don't seem to be an instrumental at all or all I find are different versions or beat-remakes.
Are there web-services or databases which I can use to search for instrumentals? I'm talking about Hip-Hop or Trap beats here, but a general place for instrumentals may also be helpful if they have some Hip-Hop beats available.
It doesn't need to be for free. Some songs were released on vinyl with the beat on the backside. But some instrumentals may not be released officially and are hard to find.
Bonus points if the web-service/database can tell if there is an instrumental at all.
Answer: Generally speaking it's called "karaoke". There are many companies that sell rap karaoke tracks. These are re-creations or cover versions of hit songs, not the actual original instrumental tracks. Karaoke companies pay licensing fees to the songwriters and publishing companies that own the copyrights to the songs being covered. The quality of rap karaoke tracks varies a great deal.
Google search for "rap karaoke"
As for the original instrumental tracks, they are created by the producer of the original song, and the tracks are owned by the record company or production company that financed the recording sessions. The instrumentals are their property. Therefore the original instrumental of a specific rap song is only available to the public if the record company or the production company decides that they want to sell that particular instrumental or, in more rare cases, to permit that instrumental to be available on the Internet without having it removed as a violation of their copyright.
My point is that just because you like a particular rap song and want to find its instrumental, this does not mean that it is necessarily available.
Answer: At 8tracks they have a section with only instrumental music, most of them are not samplers to be reused, but might be useful here and there: http://8tracks.com/explore/instrumental
A very good way to find Instrumental samplers is on Soundcloud, most of them are royalty free and can be used freely: https://soundcloud.com/.
Looperman is a more professional option, they have really good tracks but most of them are paid, but you can stream for free: http://www.looperman.com/tracks
Even YouTube provides an audio library with some royalty free music, where you can filter by genre, tempo and others: https://www.youtube.com/audiolibrary/music - the only problem is that these songs are very used on Videos, so they might not sound "fresh" for your listeners.
Comment: Ah, I see. If you're willing to pay for samplers, on eBay you can find a considerable amount of 7" vynil singles with instrumental tracks on it. Some of them were just released for a short period of time, or just for a specific country, or are bootlegs, or even were just promotional stuff. Worth a try, you might find something you like.
Comment: 8tracks looks good. The only thing that bugs me is that there are only playlists. If I'm searching for a certain beat, I'd have to look through all the playlists found by searching for the artist. SoundCloud and Looperman seem to only feature independent beat-makers. This is **not** what I'm looking for. I know where to find beats, I need to know where I can find the beat to a song which is popular. I didn't know about that YouTube thing, but that's also not what I'm looking for. Those are beats that are freely available and released with none or very opened copyrights.
Answer: If you're able to get a file of the beat, PhonicMind is a website where you can take songs and it will extract the instrumental and remove the vocals from the song for a couple bucks. It is kind of hit or miss though, some songs it does great some songs it does sound like garbage.

Where to find instrumentals?


How do I convert a '.pages' file to something unix-y?

Question: I have a file with the extension '.pages´.  I think that means iWork, but I'm not sure.  Anyway, searching for "convert pages linux" produces a fair few false negatives!
Does anyone happen to know a way to convert it to something reasonable on Linux?
Comment: I'd be curious what the `file` command on Linux says about it.  Try `file my_odd_file.pages`
Comment: **file** reports: Zip archive data
Answer: Pages documents are zip-compressed archives. Unzip it and you'll find an index.xml file from which you can extract the contents. There is also a VB utility on sf.net that might have more information on the XML structure.
Comment: There is no index.xml
Answer: .pages extension designates a file created with the Apple's word processing software called "Pages". AFAIK, Pages can be bought along with other iWork (suite) tools like "Numbers" (spreadsheets) or alone.
It is able to produce PDF and RDF so if you can ask these format, just do it.
The .pages files are zipped archives. Extract it and you'll find several files, HTML, XML, images, ...
So you can't edit them but have a preview.
AFAIK there is no Pages2ODT converter.
Answer: As far as I know there is nothing that can read .pages documents on Linux. However, if you cannot obtain the document in another file format, you can register for free to Apple's iCloud service (https://www.icloud.com/), upload your document there, and download it in either .docx or .pdf format.
This is of course less than ideal, but at least you can view the document.
A more detailed step-by-step description of the process with screenshots can be found here.
Answer: A .pages document always contains a "screenshot" of the document. So you can just open that (usually called preview.jpg, in previous versions it was Preview.pdf) to view it:
Answer: emacs!
emacs evilapplefile.pages

then click on preview.jpg
(or if the force is strong in you, do it without a mouse)
I was rather impressed how my emacs setup was able to show the subfiles and then I could view the .jpg
I think this was all with default plugins.  My emacs-fu is not so great as to have customized it much.
Emacs even opens pdf files.  (sorry if this is obvious but it was such a pleasant discovery)
Comment: Welcome to the site. If you think `emacs` is a good candidate for the solution, you may want to expand a little on whether additional (non-default) plugins are needed for the task, and if the conversion process may need manual intervention. If possible, add a link to "further reading" sites.
Comment: You can open PDF and JPG files in default emacs.  _However_, emacs a) will not convert it (as the question asks), and b) only displays the first page (the preview) if you open the `preview.jpg` file.


MSDEPLOY - Migrate IIS6 - IIS8 and change content path from c:\inetpub\wwroot

Question: I'm currently trying to migrate an iis6 (server 2003) websites to iis8 (sever 2012R2).
All the content is currently residing on: C:\Inetpub\wwwroot. There are over a hundred web applications under the "Default Web Site"
On the IIS6 server I'm using web deploy 2.1 and on the ii8 server I'm using web deploy 3.6.
During the sync process in STEP 2 below, I would like to move the content from the C:\inetpub\wwwroot to d:\inetpub\wwwroot. Please help with the correct switches and statements to use to accomplish this.
I need a solution that has been tried and trued and is not just theory based.
STEP 1:
msdeploy -verb:sync -source:webserver60,computername=MyServerName -enableLink:AppPoolExtension -dest:package=c:\migration\ migration.zip,encryptPassword=xyz
On the destination I then do the reverse, but need to know what to use to change the content root path:
STEP 2:
msdeploy -verb:sync -source:package=p:\migration\migration.zip,encryptPassword=xyz -enableLink:AppPoolExtension -dest:auto,computername=MyNewServer
Answer: In theory you could take the archive.xml file (which is similar to a manifest file) from within the package you created and copy it to a new file then rename to destManifest.xml.  Then search for and change the paths you want.  You will also need to remove all the extra MSDeploy xml attributes.
In step 2 set the destination to the manifest like so:
<code>msdeploy -verb:sync -source:package=p:\migration\migration.zip,encryptPassword=xyz -enableLink:AppPoolExtension -dest:manifest=[path to dest manifest],computername=MyNewServer
</code>
I believe this could achieve what your wanting but its a lot of manual work and troubleshooting on the dest manifest file.


Why is the alpha particle in alpha decay considered to be in a potential well?

Question: I understand that when modelling alpha decay, it is useful to consider the $\alpha$ particle as being preformed, in a region confined to the daughter nuclei. I also understand that the term $V_{0}$ comes from the strong nuclear force.
My question is why this problem is treated like a potential well problem. The $\alpha$ particle's energy, $Q$, is stated to be less than $B$. But I don't understand why? Why does the Coulomb force drop off at the nucleus? Also since the alpha particles are positively charged, why wouldn't they spontaneously leave the nucleus once at the distance $a$? Why would they have to quantum tunnel to get across?
Comment: The Coulomb force does not drop off att the nucleus. The diagram gives the potential energy, a _sum_ of the Coulomb potential and the strong force.
Answer: The constant $V_0$ term is only an approximation to the strong nuclear potential, all that you need to know is that it is attractive (and thus the potential is negative) and this attraction is restricted to a finite range. The nuclear force is actually repulsive at very close distances and falls off with distance, but those are extra details to the problem that aren't relevant so we exclude them. It's not that the Coulomb force suddenly vanishes, it's that we are approximating the combined Coulomb and Strong interactions at that nuclear distance as just being flat, for simplicity's sake.
The particle's energy is $Q$ because it just is. An alpha particle in a nucleus has some non-zero energy, and that energy is less than the energy it takes to get another similar alpha particle to that same distance. You are correct in thinking that if the alpha particle had energy $B$ instead of energy $Q$, it would not need to quantum tunnel, it would simply just have the energy to escape. It is simply the case that the alpha particle just does not have this energy. If it did, well then it wouldn't be confined to being in the nucleus in the first place.
Comment: If this is the case, am I right in assuming the 'barrier' the alpha particle is trying to overcome is the strong force? In the sense that work is being done to overcome the strong force?
Comment: I don't think that would be a correct assessment. The particle escapes with the same energy that it had within the nucleus, so no work is being done.
Comment: I messed up, I'll rephrase. The strong force attracts the alpha particle, and wants it to remain within the nucleus, forming a local minima in potential. However there exists other position value with a lower minima, hence tunneling is possible.


Pareto Optimality and Core

Question: I know this is a basic question. Can I get a mathematical proof for "Any allocation in the core of an economy is also Pareto optimal." I found this statement on some PPT online.
Comment: If you define a game in terms of Cooperative Game Theory, you can show NickCHK's answer "mathematically". For a given game you have the characteristic function $v$ defined on all subsets (coalitions) of $C \subseteq N$ and some imputation $x=(x_1, x_2, . . . , x_n)$ (imputation satisfies usual definitions of individual and group rationality). From core property $\sum_{i \in S} x_i \ge v(C)$ for all $C$, thus $\sum_{i \in N} y_i \ge v(N)$. So all imputations in the core are Pareto Optimal.
Answer: An allocation is defined as being a part of the "core" of an economy if there's no coalition of people that blocks the allocation. A coalition will block an allocation if all of its members could be made better off by another allocation (or, more weakly, if at least one of its members could be made better off without others being made worse off).
And so, by definition, for an allocation to be in the core of the economy, there must not be another allocation which any coalition prefers to the given allocation. And since one coalition that could be formed is the "grand coalition" (i.e. everyone in the economy), any allocation in the core must be Pareto optimal, or else the grand coalition would block it.
This probably isn't much more involved or mathematical than the PPT you pulled it from, but that's because it's basically true by definition.
Answer: Not exactly, you need to assume locally non-satiated preference.
The following example is from Mark Voorneveld's lecture notes:
"Consider a pure exchange economy with two consumers and two commodities. The first consumer's preferences are represented by the utility function u1(x) = x1x2, the second consumer's preferences by a constant utility function: he is indifferent between all commodity bundles. If endowment is w1 = w1 = (1,1), then (p,x) = ((1,1),(1,1),(1, 1)) (i.e., prices are equal and each consumer sticks to the initial endowment) is a Walrasian equilibrium. The allocation lies in the core. But the allocation is not Pareto optimal: giving the total endowment to the first consumer makes him better off, while not affecting the happiness of the second consumer."

Pareto Optimality and Core


Error in skin config file with Mplayer

Question: Trying to watch a VOB file. Installed MPlayer but it isn't opening. I am getting an error message saying 'Fatal Error':
Error in skin config file at line 6: PNG read error in usr/share/mplayer/skins/default/main
What does this mean
Comment: I'm still getting this error when running `gmplayer` (mplayer-gui 2:1.3.0-8build4) in ubuntu 19.10 (eoan). As a work-around, I can run `mplayer` from the command-line, or use smplayer (a different gui wrapper around mplayer).
Comment: @michael - Please see answer I just posted. It worked for me.
Answer: The problem seems to be with the outdated Ubuntu skins package:
mplayer-skins

The PNGs are not in the correct format.
The Ubuntu packages mplayer and mplayer-gui are quite old.
Ubuntu has the outdated skin package.
I got it fixed with the following command:
cd /usr/share/mplayer/skins/default; for FILE in *.png; do sudo convert $FILE -define png:format=png24 $FILE; done

Comment: for FILE in *.png; do sudo convert $FILE -define png:format=png24 $FILE; done

solved the problem thank  you
Answer: The problem is in the skins.
Go to Beyond Linux' page about mplayer.
Scroll down to "Skins" and download Clearlooks-1.9.tar.bz2. This was the latest version when I checked, on 2017-11-27.
Then, scroll down to "Skin Installation" and follow the instructions, but first delete /usr/share/mplayer/skins/default (which was a link to clearplayer). The instructions create a link to Clearlooks, the new skin directory.
Answer: http://muhdzamri.blogspot.com/2016/01/mplayer-gui-error-error-in-skin-config.html
this helped me:
sudo add-apt-repository ppa:mc3man/mplay-skins
sudo apt-get update
sudo apt-get upgrade
#sudo add-apt-repository -r ppa:mc3man/mplay-skins # You can remove the repository this way again.

The error with skin disappered but a new error appeared:
Failed to open VDPAU backend libvdpau_i965.so: cannot open shared object file: No such file or directory
It seems that this second bug is not related to the skin's bug:
https://bugs.launchpad.net/ubuntu/+source/libvdpau/+bug/1300215
So as I see it, I have to return to GNOME-mplayer :-((
Well, I do not know whether this has helped you...
Answer: May be it is too late to share the solution/answer here.
I tried below command to install the mplayer and it worked absolutely fine for me.
sudo apt install mplayer mplayer-gui

May be it will help guys who might come here in future looing for the solution.
Answer: tl;dr still broken
I am also seeing
$ gmplayer
MPlayer 1.3.0 (Debian), built with gcc-7 (C) 2000-2016 MPlayer Team
...
Error in skin config file at line 6: PNG read error in /usr/share/mplayer/skins/default/main
Config file processing error with skin 'default'

Exiting... (Fatal error)

Using
$ dpkg -s mplayer-gui | grep '^Version:'
Version: 2:1.3.0-7build2

$ dpkg -s mplayer-skins | grep '^Version:'
Version: 3.2

Relates to Launchpad bugs

1218510 Fails to open due to: PNG read error in /usr/share/mplayer/skins/default/main
1340454 Error in skin config file
1575818 mplayer crashes on start
1693410 gmplayer is broken

According to bug 1218510 comment #32,

This bug was fixed in the package mplayer-skins - 3.2build1
mplayer-skins (3.2build1) cosmic; urgency=medium

Then in comment #33

The new package http://de.archive.ubuntu.com/ubuntu/pool/multiverse/m/mplayer-skins/mplayer-skins_3.2build1_all.deb still doesn't work

Check your version of mplayer-skins package with command dpkg -s mplayer-skins.
Answer: This solved the problem for me, overcoming all the "still broken" mentions.
(files in the repo are actually broken).
Taken from here.

Get the deb package with the right pngs

wget https://launchpad.net/~mc3man/+archive/ubuntu/mplay-skins/+files/mplayer-skins_3.2.1~xenial_all.deb

Install it.

gdebi mplayer-skins_3.2.1~xenial_all.deb

Others would add the ppa. It should work as well.
In addition, I would change the default skin.
Blue is nicer, and it removes the warning messages stemming from file /usr/share/mplayer/skins/clearplayer/skin
$ cd ~/.mplayer
$ mkdir skins
$ ln -s /usr/share/mplayer/skins/Blue default

(this overrides the soft link /usr/share/mplayer/skins/default -> /usr/share/mplayer/skins/clearplayer).
I do not know yet how to change the font size for the skin, if possible at all.

Error in skin config file with Mplayer


How to handle Dev and Production servers having different file structure

Question: I know you are not supposed to do this, but for reasons beyond my control the location of my web root is different on my Dev and my production server.  As a result everytime I copy the database from my production server to my Dev server, all of my modules become confused and point to the wrong file location. What is the recommended way to handle this?
Comment: What version of Drupal? From my personal experience (And from double checking the Systems table in a Database), D6 uses relative paths for Modules and Themes, so it doesn't matter where Drupal is located, just where your modules are stored relative to the Drupal root directory.
Answer: If you are using Drush you can run the following commands to fix the module path problem, if you are using multisites then make sure you are in the sites/mysite.com directory (this must not be a symlink) before running these commands.
Drupal 6
drush eval "module_rebuild_cache();"
drush cc all

Drupal 7
drush eval "system_rebuild_module_data();"
drush cc all

(though as I've not tested I'm not sure this is needed on Drupal 7 anymore)
If Drush is new to you then here is the description from the Drush project page:

Drush is a command line shell and
  scripting interface for Drupal, a
  veritable Swiss Army knife designed to
  make life easier for those of us who
  spend some of our working hours
  hacking away at the command prompt.
Comment: Decipher, I've corrected that now in my answer. Thanks!
Comment: If not running multisites you can run Drush from the root of the Drupal site, you don't need to be in `sites/default`.
Answer: The Alternative to the Drush approach, in the case you can not run Drush on your server, I have found to solutions for this sort of issue (when moving the modules to another directory):

Go to /admin/build/modules and hit the submit button.
Run update.php

While Drush is probably preferable, it's not always possible to have setup on your live hosting.
Answer: Absolutely essential to change the dev. server to be the same as the production server.
If you don't there will come a day when you wish you had...
Even if it is outside of your control I'd recommend making a good case to however is in charge to change the development server.
Answer: When necessary, I mimic the production server file structure using symlinks.


How can I create a bootable drive for ArchLInux on macOS?

Question: I'm trying to figure out how to do the equivalent of these instructions for creating an archlinux bootable drive on a Mac. (I'm using a Micro SD to USB adapter.) I found these instructions on partitioning a flash drive, but I'm not sure how to apply them, since the instructions I'm trying to "translate" into macOS terms talk about sectors, and that's very much a lower level than I'm used to working in. To be expressly clear, my question is this: how do I achieve the same stuff as in the instructions using macOS 10.12.6? Thanks!
Comment: @davidanderson I assume the OP wants to use a Mac to create a boot image for an ARM device on an SD card.
Comment: Is there a .iso image of ArchLinux available, for the platform you need? Would make things a lot easier :-)
Comment: I tried looking for one and didn't find one, but I got a lot of spurious search results as well. I found a discussion forum thread (https://archlinuxarm.org/forum/viewtopic.php?f=47&t=7996) from a few years ago that referenced downloading an ISO for a different platform, but the link it goes to (https://archlinuxarm.org/platforms/armv7/samsung/odroid-u3#qt-platform_tabs-ui-tabs2) no longer has an ISO.
Comment: Your link is for ARM architecture processors. Mac's use Intel processors which have a x64 architecture. Are you sure you did not mean [this web site](https://www.archlinux.org)?
Comment: @patrix: I figured that out. I am currently entering the procedure.
Comment: Yes, @patrix is correct. I wanted to use macOS to create a boot image for an ARM device on an SD card.
Answer: There is no command in macOS to format a partition to use a linux file system. In other words, there is no equivalent for the Arch Linux mkfs.ext4 command. There are many possible solutions to this problem. Below is one such solution.
I propose that the best way, to accomplish the creation of the bootable drive, is to boot the Arch Linux operation system on your Mac. This will allow you to use the commands shown in the web link you provided. This boot of Arch Linux will be done from a 1 GB or larger flash drive. The advantage to using a flash drive is that you will not have to install Arch Linux on any of your internal drives.
Manual Approach to Creating a Mac Bootable Arch Linux Flash Drive

Note: You can copy and paste each command below into the Terminal application window. This will reduce the amount of typing and the risk of type errors.

Download an .iso file. The Mac compatible file I chose to download is named archlinux-2017.12.01-x86_64.iso. You can find this file at this Arch Linux web site. This file was downloaded to my "Downloads" folder. I will assume you will do the same.
Open a Terminal application window. Enter the following command to navigate to your "Downloads" folder.
cd  ~/Downloads

Convert this .iso file to a format that is compatible with flash drives. The command below accomplishes this task.
hdiutil  convert  archlinux-2017.12.01-x86_64.iso  -format  UDRW  -o  target.img

The .dmg characters may be appended to the output file name. Enter the following command to check if this occurred.
ls  target.img.dmg

If file named target.img.dmg appears, then enter the next command to rename this file.
mv  -f  target.img.dmg  target.img

Enter the command below to get a before list of drives.
ls  /dev  |  egrep  ^disk\\d+$

Insert your flash drive.
Enter the command below again to get an after list of drives. Next, determine the identifier assigned to your flash drive (e.g. The identifier that did not appear in step 5)
ls  /dev  |  egrep  ^disk\\d+$

Note: In the subsequent steps, replace diskN with the identifier assigned to the flash drive.

Enter the command below to unmount the flash drive.
diskutil  unmountdisk  diskN

Note: If you see the error Unmount of diskN failed: at least one volume could not be unmounted, open the Disk Utility application and unmount the volume(s) (don't eject).

Enter the command below to copy target.img to your flash drive.
sudo  dd  if=target.img  bs=1m  of=/dev/diskN

Note the following:

This command will require you to enter your login password.
To view the progress of the copy operation, press the control+T key, while the command is executing.
Using /dev/rdisk instead of /dev/disk may be faster.
If you see the error dd: Invalid number '1m', you are using the GNU dd command. Use the same command but replace bs=1m with bs=1M.
If you see the error dd: /dev/diskN: Resource busy, make sure the drive is not in use. Open the Disk Utility application and unmount the volume(s) (don't eject).

When the 'dd' command completes, you will receive the following pop up message. You should select "Ignore".

Note: The the disk (flash drive) is readable by your computer. The message should have said: "The disk you inserted was not readable by macOS."

To continue to the next part of this procedure, you will need to leave the flash drive plugged in. If you do need to eject the flash drive, you can either use the Disk Utility application or enter the command given below.
diskutil  eject  /dev/diskN

Initialization of the Micro SD Card
The instructions, you referenced, assume the micro SD card is either uninitialized or has been MBR initialized with no partitions. You may want to preform the following steps to insure your micro SD card is properly initialized.

Enter the command below to get a before list of drives.
ls  /dev  |  egrep  ^disk\\d+$

Using the adapter, plug the micro SD card into the Mac.
Enter the command below again to get an after list of drives. Next, determine the identifier assigned to your micro SD card (e.g. The identifier that did not appear in step 1)
ls   /dev  |  egrep  ^disk\\d+$

Note: In the subsequent steps, replace diskN with the identifier assigned to the micro SD card.

Enter the following command to initialize the micro SD card.
diskutil  partitiondisk  diskN  1  mbr  free  none  r

Enter the command below to unmount the micro SD card.
diskutil  eject  diskN

Boot Your Mac to Arch Linux

If the Mac bootable Arch Linux flash drive is not plugged in, do so now.
Restart your Mac and immediately hold down the option key, until the Startup Manager appears.
Select the icon labeled "EFI Boot", then select the arrow below the label.
Select "Arch Linux archiso x86_64 UEFI CD" or wait for this to happen automatically.

A Note About Drive Identifiers
Hardware used by machines running the Linux, Unix, macOS and legacy OS X operating systems are given character string device identifiers. In the context of your question, we are only dealing with devices that are drives. The macOS operating system uses diskN to identify HDD, SSD, SD cards, micro SD cards, USB flash drives, etc. The value N is some integer greater than zero. The Arch Linux operating system uses a different scheme. Here, the form of the drive identifier is sdX, where X is a lower case letter in the English alphabet.
Micro SD Card Creation

Note: Since you are booting to a "Live" version of Arch Linux, I made some changes to the procedure you referenced.

Insert a micro SD card into your computer and record which device identifier it is (dmesg  |  tail)
Make sure it's not mounted (umount  /dev/sdX* or umount  /dev/mmcblk*)
Start fdisk to partition the SD card:
fdisk  /dev/sdX

At the fdisk prompt, create the new partitions:
a. Type n, then p for primary, 1 for the first partition on the drive, the return key to accept the default starting sectors, and +100M for the ending sector.
b. Type t to set the type, then c to set it to FAT.
c. Type n, then p for primary, 2 for the second partition, and press the return key twice to accept default values.
d. Exit by typing w.
Create and mount the vfat filesystem:
mkfs.vfat  /dev/sdX1
mkdir  boot
mount  /dev/sdX1 boot

Create and mount the ext4 filesystem:
mkfs.ext4  /dev/sdX2
mkdir  root
mount  /dev/sdX2 root

Download and extract the root filesystem:
cd  ~/root
wget  http://os.archlinuxarm.org/os/ArchLinuxARM-utilite-latest.tar.gz
cd  ~
bsdtar  -xpf  root/ArchLinuxARM-utilite-latest.tar.gz  -C  root
rm  root/ArchLinuxARM-utilite-latest.tar.gz

Copy boot files to the boot partition:
cp  root/boot/*  boot

Unmount the partitions:
umount  boot  root

Remove the micro SD card from your computer and insert it into the Utilite on the front panel
Comment: I really appreciate the thorough answer. Since I have access to a machine running Linux (a Chromebook with Gallium OS), rather than create a bootable USB drive for my Mac, I was able to use that.

The most useful part of your answer was `There is no command in macOS to format a partition to use a linux file system. In other words, there is no equivalent for the Arch Linux mkfs.ext4 command.`
Comment: Of course, I'm having issues unrelated to the partitioning (wrong version of `bsdtar`, among them), but it's a learning experience!
Comment: I did not get any indication that the `bsdtar` command failed, but I have no ARM machine to test on.
Answer: This is how you do it. This works with rpi of 1st, 2nd and 3rd generation.
I separated the code in bash functions to make it more readable, hopefully.
There may be extraneous mount/unmounts, but most diskutil action result in the volumes being auto-mounted by MacOS, so we need to unmount them before continuing otherwise the commands fail saying the resource is busy.
We need to install a few dependencies. This part is not as automated as I'd like it to be.
curl -OL https://raw.githubusercontent.com/yalp/homebrew-core/fuse-ext2/Formula/fuse-ext2.rb

Now edit that file and add to it after the caveat section:
  patch do
    url "https://github.com/alperakcan/fuse-ext2/files/2576060/0001-Fix-new-Xcode-compilation.patch.txt"
    sha256 "a2a8ff14f36754aead1745b4b5f53b0333376d1bf6abe659ec4eacdbb232aceb"
  end

Now we install the dependencies:
brew install \
    findutils \
    e2fsprogs \
    pv

brew install --head ./fuse-ext2.rb

sudo cp -pR /usr/local/opt/fuse-ext2/System/Library/Filesystems/fuse-ext2.fs /Library/Filesystems/
sudo chown -R root:wheel /Library/Filesystems/fuse-ext2.fs

sudo cp -pR /usr/local/opt/fuse-ext2/System/Library/PreferencePanes/fuse-ext2.prefPane /Library/PreferencePanes/
sudo chown -R root:wheel /Library/PreferencePanes/fuse-ext2.prefPane

Finally, this is the script to format the SD card. Copy paste this script, make it executable chmod a+x FILE and call it with two arguments DEVICE and MODEL.
The script is smart enough to propose you with correct values for DEVICE and MODEL.
#!/bin/bash

function require_device() {
    local device="$1"
    local usage="$2"
    local available_devices=$(get_available_devices)
    if [ -z "$available_devices" ]; then
        echo "$usage"
        echo
        echo "No compatible device found."
        exit 1
    fi
    if [ -z "$device" ] || ! contains "$available_devices" "$device"; then
        echo "$usage"
        echo
        echo "DEVICE must be one of:"
        echo "$available_devices"
        exit 1
    fi

    echo "/dev/$device"
}

function get_available_devices() {
    diskutil list external physical \
        | grep /dev \
        | cut -d" " -f1 \
        | cut -d/ -f3
}

function require_model() {
    local model="$1"
    local usage="$2"
    local available_models=$(echo -e "rpi\nrpi2\nrpi3")
    if [ -z "$model" ] || ! contains "$available_models" "$model"; then
        echo "$usage"
        echo
        echo "MODEL must be one of:"
        echo "$available_models"
        exit 1
    fi

    echo "$model"
}

function get_arch_filename() {
    local model="$1"

    if [ "$model" = "rpi" ]; then
        echo 'ArchLinuxARM-rpi-latest.tar.gz'
    elif [ "$model" = "rpi2" ]; then
        echo 'ArchLinuxARM-rpi-2-latest.tar.gz'
    elif [ "$model" = "rpi3" ]; then
        echo 'ArchLinuxARM-rpi-3-latest.tar.gz'
    else
        echo "Unsupported model $model"
        exit 1
    fi
}
function download_archlinux() {
    local model="$1"
    local filename="$2"

    echo "Checking if we need to download the latest ArchLinuxARM iso"
    curl --silent --location \
         --output "new-md5-$model" \
         "http://os.archlinuxarm.org/os/$filename.md5"
    local current_md5="$(md5sum "$filename")"

    echo "Newest md5:" "$(cat "new-md5-$model")"
    echo "Current md5:" "$current_md5"

    if [ "$(cat "new-md5-$model")" != "$current_md5" ]; then
        echo "We do, downloading in the background..."
        (
            if curl --silent --location \
                    --remote-name \
                    "http://os.archlinuxarm.org/os/$filename"; then
                echoerr "Download done."
            else
                echoerr "Failed to download."
            fi
        )&
        local process=$!
    else
        echo "We don't, continuing"
        local process=0
    fi

    return "$process"
}

function wait_for_download() {
    local process="$1"

    if [ "$process" -ne 0 ]; then
        echo "Waiting for download to finish."
        wait "$process" || exit 1
    fi
}

function untar_and_copy_arch() {
    local filename="$1"
    local device_dir="$2"

    echo 'Untaring into root.'
    if [ ! -f "$device_dir/root/root/.bootstrap" ]; then
        sudo sh -c "pv $filename | bsdtar -xpf - -C $device_dir/root" \
             && sudo touch "$device_dir/root/root/.bootstrap"
    fi
    sudo mv "$device_dir"/root/boot/* "$device_dir"/boot
    echo 'Running sync, can take a few minutes...'
    sync
}

function umount_device() {
    local tmp_dir="$1"
    local device="$2"

    diskutil unmountDisk "$device"

    if mount | grep "$tmp_dir/root" > /dev/null \
            || mount | grep "${device}s2" > /dev/null; then
        echoerr "Unmounting mounted root."
        sudo umount "$p2"
    fi
}

function mount_device() {
    local tmp_dir="$1"
    local device="$2"

    echo "Mounting $device root and boot on $tmp_dir"
    mkdir -p "$tmp_dir/root" "$tmp_dir/boot" || exit 1
    sudo diskutil mount -mountPoint "$tmp_dir/boot" "${device}s2" || exit 1
    sudo fuse-ext2 "${device}s2" "$tmp_dir/root" -o rw+ || exit 1
}

usage="$0 DEVICE MODEL"

device="$(require_device "$1" "$usage")" || exit 1
device_root="$("${device}s2")"

model="$(require_model "$2" "$usage")" || exit 1
filename="$(get_arch_filename "$model")"

download_archlinux "$model" "$filename"
process="$?"

umount_device "$tmp_dir" "$device"

diskutil partitionDisk "$device" 2 MBR \
        "MS-DOS FAT32" BOOT 100M \
        "MS-DOS FAT32" ROOT R \
        || exit 1
umount_device "$tmp_dir" "$device"

format_ext4 "$device_root" ROOT || exit 1

wait_for_download "$process"

sleep 3
umount_device "$tmp_dir" "$device"
mount_device "$tmp_dir" "$device"

untar_and_copy_arch "$filename" "$tmp_dir"

umount_device "$tmp_dir" "$device"


Synonyms to 'semi thick'?

Question: What is the synonym to 'semi thick' body? When someone describes their body shape as semi thick, what does he mean? Thank you.
Comment: Hello Veronica, welcome to EL&U. 'Thick' is not usually applied to bodies in English. German speakers often use 'thick' for 'fat' when speaking English as the German for 'fat' as in 'a fat man' is 'dick' so 'thick' becomes a False Friend for German speakers of English. I can only guess that a person who refers to his body as 'semi thick' means that he is 'a little overweight' but i really can't be sure. It's not something that a native speaker would say.
Comment: I would say "gooey".
Comment: ...maybe "stout", or "chunky"
Comment: Semi-thin perhaps?
Comment: I don't know what *semi thick* means. If it's somewhere between *thin* and *thick*, isn't that just *average*? Or does it mean somewhere between *average* and *thick*? Come to think of it, I don't know what *thick* means in this context. *Overweight*? *Obese*? *Heavyset*? *Muscular*? Before being able to determine a synonym for the term, you have to explain what the term itself means. And also why one synonym would be better than another.
Answer: Unfortunately, you're dealing with a "fad phrase"
We live in a funny world where we simply can't stand using the words and phrases our ancestors (read: "parents") used.  Part of the problem is we increasingly want to avoid insulting, offending, or otherwise shaming people who might not (or do not) fit the concept of "perfect" (whatever that actually is).  Thus, what was once "fat" or "heavy" became "curvy" or "dad bod" because the earlier words grew increasingly negative in context.
This is a common practice in the marketing industry as advertisers look for ways to pleasantly sell products intended for heavier body shapes.
I believe this is the case with the phrase "semi-thick" in relation to body shape.  I see the phrase "thin-thick" more often, usually to describe the combination of an impossibly thin waist with overweight wide hips and buttocks.
"Semi-thick" appears to be most often used to describe a person who has a square body shape and/or is somewhat overweight (as Cascabel said, "stout" or "chunky") such that the body appears to be a bit more than it normally would be (like using bold type) but does not favor actual obesity.
To make matters worse, the phrase has been used for a much longer period of time to describe fluids and objects.  A syrup or shampoo has a "semi-thick body" meaning it will pour slowly or can be manipulated somewhat like a cream once dispensed.  Writing instruments, art brushes, even drum sticks will be described as having a "semi-thick body" meaning the objects can still be used comfortably like their thinner counterparts but carry greater weight or fit more fully in the crook between the thumb and the palm.  Because it's been used this way for a longer period of time, it's more difficult to narrow down how the "fad phrase" use for body shape is used.
Which is the problem with "fad phrases" (words or phrases invented for the moment).  Their definition is rarely specific and often modulates over time.  A semi-thick body shape this morning could be more or less when compared to the use of the same phrase later in the evening.  (In this regard, social media is having a profound affect on how language is used.)

Synonyms to ‘semi thick’?


Query polygon layer by geometry size

Question: This is something I know I can do with ArcGIS but I don't know how to perform on QGIS.
I have a layer containing multiple polygons of size x. I want to query the layer to remove every polygon of size less than 1 km2. How do I accomplish this on QGIS?
Comment: If you wish to merely not show them then you can apply a definition query either by right clicking on a layer and choosing Filter or in the Layer Properties - Source - Provider Feature Filter create a Query on your area field  You can also click on the tables Show All Features and instead apply a filter .  If you wish to select polygons for deletion use a selection query in the table on the area field and delete in an edit session.  There is also a Select by Attribute Processing tool.  This all assumes you have an area field to use in the query.
Comment: If you want to modify the layer: use the Select by expression tool. In the Expression textbox type the following: $area/1000000 < 1
Once, selected, edit layer and delete the features.
Answer: Right click on the layer --> Filter

Enter your query

It doesn't work if your layer is in the edit mode
In Arcgis it is a little bit more logical that the defintion qurey is in the property window/menu.

Query polygon layer by geometry size


Inviting my fiance and Family members to the US when I am on a Study permit

Question: Suppose I move to the USA on F-1 Visa , How can I invite my girlfriend (whom I want to marry) and other family member? Is there a way to invite her or any of my family members to come to the US on F-1 Study permit, or do we have to wait for an adjustment of status, before I can have to invite her or any family member over?
Answer: On F1 visa you can have your immediate family (spouse and minor dependent children) accompany you. You do not have a privilege to "invite" anyone. They may be able to come to the US on their own accord based on their own eligibility, but your "invitation" doesn't mean much in that regard.
Comment: @CleverTammy as Traveller said - spouse is someone you're legally married to. Dependent children are someone whom you're legally a parent/guardian to. "Girlfriend" and "other family member" are complete strangers to you as far as the US government is concerned.
Comment: Really, so on the document , i can put their names and passport numbers and they will also have to give them visas as well (since they accompany me), is that what you mean?
Comment: @CleverTammy No, the answer means the exact opposite. A girlfriend is not classed as a spouse. The only way your girlfriend can go to the US is if she herself is eligible to visit either with an ESTA or by applying for a visa herself.
Comment: @Traveller, thanks for the clarification.


Change the PS1 color based on the background color?

Question: I learned that I can change the format of PS1, especially the color of the string. Then, is it possible to change the color based on the background color of the shell? Or, how can I detect the background color of the shell?
Answer: As far as I know, there's no way to query the colors of the terminal emulator. You can change them with \e]4;NUMBER;#RRGGBB\a (where NUMBER is the terminal color number (0–7 for light colors, 8–15 for bright colors) and #RRGGBB is a hexadecimal RGB color value) if your terminal supports that sequence (reference: ctlseqs).
Powerful color scheme mechanisms often have a dark or light background setting that you must supply to indicate whether you have a black or dark gray background, or a white or light gray background.
When you're configuring for yourself, it's usually enough to decide you'll always use the same background color.
Comment: @slacy For >99% of today's terminals, termcap/terminfo data is irrelevant: they're all minor variations of xterm, and the details that differ, such as the number of colors, are not reflected in the value of `TERM` and so cannot be obtained from the environment.
Comment: You can get the supported number of colors in the termcap entry by looking at "tput colors" but in many cases that will say a low number, like 8, because the termcap support for 256-color terminals is really weak.
Answer: If you are using gnome-terminal you can get the background color for any profile, in this case for the Default profile as
   $ gconftool-2 --get /apps/gnome-terminal/profiles/Default/background_color
   #E12FE12FC74D

then you can decide how to set your prompt accordingly.
Answer: With xterm, you can query the background color with the \e]11;?\a escape sequence. You need to read the response from the terminal. There is a xtermcontrol command that does that for you:
~$ xtermcontrol --get-bg
rgb:b0b0/b0b0/b0b0

Comment: The same works in gnome-terminal and probably some other terminal emulators too (but definitely not all of them).


The nature of illogic

Question: For many years, it deluded my mind.
Someone told me there has to be more to life than logic.
Through many years of analysis. I came to the conclusion that, it is impossible to understand illogical statements through a logical framework.
They vary in nature.
Since my computing notion is bound to logic.
How can I become illogical?
How can I study my illogical nature by its own nurture?
Comment: If one of the answers received satisfies you, please accept it :-)
Comment: Avoid mixing metaphysics (what is rational, what is ideal, like logic) with physics (life, sense experience, nature). Understanding logic is understanding an ideal order, a set of patterns. There is no sense or possibility of understanding "illogic". "How can I become illogical"? you do what is not logic, which will lead you to pain and death (e.g. smash your head against the wall expecting pleasure) (DO NOT DO IT!). Dying implies destroying reason and logic. But then you can't understand nothing, because your mind don´t exist anymore. Worst even, you don't exist anymore. Don't!
Answer: Logic is best understood as a tool used in service of desire. We know (more or less) what our situation is; we know (more or less) what we want; we know (more or less) the way the various pieces around us move. Logic is the act (or art) of manipulating those pieces to get things from where they are to where we want them to be,
There isn't a singular 'logic'. There are modes of logic that share some basic structural primitives, but otherwise function divergently. Whenever we see or hear something we think is illogical, it only means we haven't grasped the worldview that makes that thing logical.
You don't want to be illogical. You want to be trans-logical: to ee across a worldview, not try to assess things within your native worldview.
Answer: If someone says you should believe things to be true for reasons other than logic and empirical evidence... I'd suggest not putting much weight into what they say (at least not if you care about believing as many true things and as few false things as possible). Although of course you could also have a discussion about how they can justify and validate their belief, because logic and science has proven to do that through consistent and reliable results, whereas what people have presented as other reasons for belief has not shown to have any degree of consistency or reliability.
Logic can also be contrasted with emotion. We can't purely logical beings - we feel joy and sadness and happiness and pain and love, and many would say that those are some of the most important things in life. Logic, disregarding emotion, is ineffective at leading one to joy and happiness. Trying to logically analyse everything can put a strain on relationships. But logic can also be very helpful in finding joy and in relationships, if applied responsibly (e.g. it can help you identify things that bring short-term joy, but causes suffering on the long term, or it can help you identify things that damages relationships, so you can potentially stop doing that). But those would still be things that life offers that go beyond logic.
So I guess the question is whether you feel happy and fulfilled. If so, I'm not one to prescribe how you should life your life. If you aren't happy and fulfilled, you might want to reflect on what brings you joy, what a fulfilling life would look like for you, and what your ideal life circumstances would be in the long term. You might want to also consider speaking to a mental health professional, to help you with that process.
Answer: Illogic means reasoning or thought which is not logical.  Logic and reason are basically, deductively the same.  The basis of reason, however, is not reason.  E.g. from Heidegger's The Principal of Reason (1957):

[p.11] In its short formulation [Leibniz's 1686] principle of
reason reads:
Nihil est sine ratione; nothing is without reason. ...  Therefore, according to what the principle itself tells us, it is the sort of
thing that must have a reason. What is the reason for the principle of
reason?
[p.12] But what are we getting ourselves into if we take the principle
of reason at its word and move towards the reason of reasons? Does not
the reason of reasons press forward beyond itself to the reason of
reason of reasons? If we persist in this sort of questioning, where
can we find a respite and a perspective on reason? If thinking takes
this path to reason, then surely it can't help but fall intractably
into groundlessness.
[p.44] The subject of the principle of reason is not reason, rather:
"Every being"; this is predicated as having a reason. The principle
of reason is, according to the ordinary way of understanding it, not a
statement about reason, but about beings, insofar as there are
beings.

After much ado the principle of reason is revealed as a principle of being (note, not 'beings').

[p.51] Ground/reason and being ("are") the same—not equivalent—which
already conveys the difference between the names "being" and
"ground/reason". Being "is" in essence: ground/reason. Therefore being
can never first have a ground/reason which would supposedly ground it.
Accordingly, ground/reason is missing from being. Ground/reason
remains at a remove from being. Being "is" the abyss [literally ab-grund =
ground-less] in the sense of such a remaining-apart of reason from
being. To the extent that being as such grounds, it remains
groundless.

Cutting to my conclusion, reason itself (and likewise being), is without reason.  Uncaused and groundless.  And there is the link to illogic: without logic, without reason, without ground.
Switching to Heidegger's 1929 treatise On the Essence of Ground in Pathmarks, p. 132:

it has become clear with respect to the principle of
reason  [ground] that the "birthplace" of this principle lies neither
in the essence  of proposition nor in propositional truth, but in
ontological truth, i.e., in  transcendence itself. Freedom is the
origin of the principle of reason [ground];  for in freedom, in the
unity of excess and withdrawal, the grounding of  things that develops
and forms itself as ontological truth is grounded.

Additionally
Transcendental signifieds are ungrounded, which makes this soundbite from literariness.org highlight an interesting point on logocentrism.
Comment: Is the claim reason is without reason to say that our freedom to choose is fundamental to its application and thus its nature?
Comment: @JD perhaps this: freedom to be means it's without a wherefore.
Answer: Welcome Danish!
I would simply ask you to reflect on the idea that the logical is one aspect of the psychological. In philosophy, this position is related to the term psychologism. The human mind has other capacities other than logic. In fact, contemporary research tends to suggest that logic is impacted by bodily functions and that it is also susceptible to psychological factors and phenomena like cognitive bias.
You mention the term delusion. Delusion, for instance, might be seen as a systemic failure of logical consequence of the mind. Severe physical and mental abuse of children, for instance, results in profound affects on the medial prefrontal cortex and executive function associated with it. In effect, it is possible to make people unreasonable by traumatizing them or their emotions.
The somatic marker hypothesis is one example of an evidence-based hypothesis that suggests that logic, say the adoption of premises, which is a question of preference and not subject to a logic of its own necessarily, is determined by emotions. From WP:

The somatic marker hypothesis, formulated by Antonio Damasio and associated researchers, proposes that emotional processes guide (or bias) behavior, particularly decision-making.

This of course is consistent with the views of philosophers who explore rationality. Intuition plays an important and unavoidable role in logic. And if there's one finding that comes from psychology and logic that is afforded credence by practical experience, people struggle with being rational. As for exploring your own illogical thinking, both the philosophy of psychology and philosophy of mind have many ideas related to rationality and irrationality. Start with topics like fallacy, argumentation, reason, cognitive bias, and mental illness.

The nature of illogic


What does the +X on a magic weapon apply to?

Question: What does the e.g. +1 on a magic longsword count for in Advanced Dungeons & Dragons? Is it a bonus to damage, or is it to attack?
Comment: [Related: D&D 4e] [Is the hit and damage bonus the same as the +X of a magical weapon?](http://rpg.stackexchange.com/q/45363)
Comment: Amazing thank you and sorry for the confusion especially since you took time to answer this even though you didn't have too.
Comment: No worries! But that's just a link to a similar question about a different edition. It doesn't quite answer this question, but I'm sure we'll see some answers roll in for this before long. Welcome to the site, meanwhile! Maybe check out the [tour] while this is waiting for answers to be submitted.
Answer: Both!
The Dungeon Master's Guide (1979) for Advanced Dungeons and Dragons says that

All magic swords receive their stated bonus both for purposes of hitting (as a bonus to the "to hit" die) and for damage (as +1, +2, +3, etc. addition to hit points of damage scored). (165)

Thus, consider a fighter armed with a longsword +1, +2 vs. magic-using and enchanted creatures:

Against mundane creatures, the fighter rolls 1d20 to hit and, because of that sword, adds +1 to the result.
If he hits and deals damage with the same sword, he rolls the sword's damage and adds +1 point of damage (in addition to any other modifiers).

Further, if he's facing, say, an annoying unicorn, then (because of the +2 vs. magic-using and enchanted creatures) the fighter instead rolls 1d20 +2 to hit, and, if he hits, adds +2 to the damage dealt by the sword.


JFBConnect and jfbclogin module in joomla 3

Question: Hi everyone I've been used JFBConnect in joomla ver 1.5 and jfbclogin module but I am migrating in joomla version 3 the jfbclogin module are not working. Any idea will appreciated and if there an alternative to this jfbclogin module. Thanks
Comment: Assuming you have a current license for JFBConnect and you are trying to install the correct version for Joomla 3.x, it is probably best to ask for support directly from the developer and/or check out the SourceCoast support forums. You may elicit better or improved answers here if you can describe what you have tried and what the results are (e.g. at what point you see an error message and what the error message is, for example).
Comment: Sorry -1 because this question needs more details regarding versions installed and what exactly the problem is. Currently this question is too vague.
Answer: Hard to tell.
It's most likely still using old deprecated and removed code that Joomla 3.x doesn't support. The only thing you can do is check the developer site to see if there is a Joomla 3.x compatible version of the modue, else find an alternative extension with similar features.
Update:
According to the developer site, the later versions support Joomla 2.5 and 3.x, however I'm aware this is a commercial extension therefore you may not wish to purchase it. Perhaps someone else who has used a similar extension could provide an alternative if need be.
Comment: Hi Lodder thank you for the time answering and giving a idea about my question.
Comment: Lodder is correct. JFBConnect has versions specifically for Joomla3. If you are using the Joomla1.5 version on a Joomla3 site then it will not work. You will need to install the JFBConnect version that is made specifically for Joomla 3. If you have already done that then it is likely you've found a bug or similar gremlin.<- The best course in that situation is to contact the developer.


windows service msi installer created in vs2003 hangs in win7 while installing

Question: We have few windows services developed using .Net framework 1.1(VS2003).For each windows service an msi installer(set up project) is created to make installation easier.These installers are able to install windows services successfully in windows XP.But these installers unable to install windows service in WIN7 though I have admin privileges on the machine in which I am trying install them.While I am trying  to install the windows service in win7, Through msi installer,installation is progressing till 90%.After that it is neither completing nor throwing an error.I am unable to understand what the problem is.
I tried following ways.
1.Opened cmd window in admin mode and tried to execute the msi with the command msiexec -i  --Din't work
2.Right clicked on the actual exe(windows service exe) file and tried to run it in admin mode.--Din't work
3.Changed the UAC to never notify, restarted the machine and then tried to install--Din't work
4.Right clicked on both exe and msi and open their properties and changed the compatibility to lower version of windows and tried to install--Din't work
One thing I have noticed is that for all the custom actions of our windows service installer, primary output of our main project(exe) was given as input.I build the msi installer by removing all the custom actions.Then i tried to install it in win7.Then it was installed.But during the installation system not prompted for account details  (which is the actual case while installing windows service) and also the service was not appeared in services manager window.
I spent somuch time to identify the cause and resolution.But I dint find any posts on this issue.I suspect that the problem is with custom actions.But not sure.If the problem is with custom actions please let me know how to overcome it.
Please provide a resolution for this issue or share me if there are any links which talks about this.
Answer: FWIW, .NET 1.1 isn't supported on Win7.  Also I'm guessing you are using InstallUtil custom actions to drive the setup of your .NET Windows Service.  These are very fragile and you can eliminate all those brittle points by refactoring and using the ServiceInstall ServiceControl tables in MSI.