My Russian Teacakes are too crumbly

Question: I am making Russian Teacakes.  They have been refrigerated per the recipe for approximately 4 hours.  I cannot roll the Teacakes into balls as the dough is too crumbly.  Help!
Comment: Welcome to Seasoned Advice! Could you share the recipe you're using? It will be hard for others to offer advice otherwise.
Answer: If you do not let this sort of dough warm up a bit after refrigerating, it will frequently crumble.  Let the dough sit on the counter for 10-15 minutes and see if it's workable then.  I sometimes let a dough like this come nearly all the way back up to room temperature in order to be able to shape it.
If after letting it warm back up, it's still too crumbly to shape, then add a little bit more butter, like mattm suggested.
Answer: In the Russian teacake recipes I have seen, there are four main ingredients:

flour
butter
nuts
powdered sugar

If you cannot get your cookies to bind, you need to add more butter (the only ingredient with moisture). If you are refrigerating your dough, make sure to cover it so it does not dry out.
Comment: You missed the important bit: *add more butter*  @Suzanne  Please feed back after you've tried and if this answer helped, please don't forget to [accept](/help/accepted-answer) it...  **;-)**
Comment: Those are the ingredients in my recipe, and I have the dough covered.
Answer: Funny you ask this question; I just finished making Russian tea-cakes.  A bit of vanilla flavouring helps; I usually put in around 2 teaspoons for a batch of 40 (equivalent to 1 cup of butter and 3/4 cup of confectioner's sugar, if my memory serves me).
The trick that I use, which really helps, though, is actually a technique in rolling.  We generally think that the way to make roll cookies is to take a blob of batter and simply roll it between the palms of one's hands.  This technique works very poorly for Russian Tea Cakes, however, even if the batter is moist enough to work.
It works much better to take a blob of batter of the correct size to make a cookie and squash it flat between the palms of the hands.  With the palms squashed against each other, start rolling them around as though you were rolling a cookie, but with your hands virtually touching each other.  Slowly release the pressure while continuing to roll until the cookie is round and smooth, and voila!
The advantage of this technique actually also has a hidden benefit: the cookies (form my experience) tend to disintegrate less while coating them in icing sugar after cooking.
Answer: I made these cookies for years. This last time, I refrigerated the dough which I have never done before. Cookies are very crumbly. Perhaps letting the dough come to room temp would do the trick but why refrigerate in the first place.
Answer: Make sure the nuts are cut very fine.  I never chill the dough, and also rely on the warmth of the hands to hold the dough together.  I don't really roll the dough around, but sort of pinch and dough into ball shape.
Comment: Welcome to SA!  To make this a better answers, perhaps you could structure it as advice to the asker?  What should they specifically do differently?
Answer: Your dough is missing liquid. While the recipes frequently don't list any liquid, if it won't come together, you have to add a few drops (!) for it to form a workable ball.
The amount you need is really tiny. I usually take a teaspoon, fill it half, drizzle it in, and knead for several minutes until I have seen a change in the dough. Only if the dough is still tearing instead of sticking after that do I add a second half teaspoon. If you have a pipette handy, that might work even better. Remember, you want to have the least amount of liquid you can get away with, and you can never take out water after you have added it, so go very cautious with it.

My Russian Teacakes are too crumbly


credit report on decedent

Question: As the estate executor, is it ill-advised to try to obtain credit report on decedent? I am unsure if the ramifications of doing this are good or may result in potential legal issues? The estate is currently in probate. I presume that the credit reporting agencies will provide a report upon proof of being appointed.
Comment: What do you hope gain or learn by having a credit report on the decedent?
Comment: Credit reports show obligations (debts, mortgages, revolving credit, etc.) _owed by the subject of the report_. I've never seen one (here in the US, might be different elsewhere) that showed obligations owed _to the subject_.
Comment: Might a credit report show debts owed to the decedent?  I doubt it will., but if it does-- this is what I hope to gain. I have no idea how else I might find out what others may have owed the decedent. The creditors are known in so far as bank statements and other statements have revealed. But I worry it may reveal habits or debts that I'd really prefer not to know about from a personal perspective (i.e. letting dead dogs lie). I hope that makes sense.
Comment: @DavidSupportsMonica-- that was my suspicion. How to find debtors?
Comment: Review the decedent's documents and files. Ask the decedent's relatives and friends.
Comment: Those were dead ends. I guess my conclusion has to be there aren't any. Unfortunately, the decedent had Alzheimer's /dementia and the records are a bit discombobulated. Some, I know, are completely missing.
Answer: As executor, you have a duty to settle the debts of the decedent. A credit report could reveal unknown debts. The typical death-notice publishing may also reveal debts, but I'm not persuaded that all creditors are actually notified. From the legal perspective, they have been "notified" when you publish the announcement, so some debts might have to be written off by the creditor, if they don't subscribe to the local paper. The law does not require you to do the least you possibly can in settling those debts, and does not require you to maximize the benefits to the those who inherit part of the estate. You can go from this to a personal decision about whether it is ill-advised.
Comment: That was not evident from the original question.
Comment: True enough, and I see now that your answer predated the comments that revealed it. I'll delete my comment.
Answer:
I presume that the credit reporting agencies will provide a report
upon proof of being appointed.

Generally, they will.

As the estate executor, is it ill-advised to try to obtain credit
report on decedent? I am unsure if the ramifications of doing this are
good or may result in potential legal issues? The estate is currently
in probate.

Generally speaking, notice to creditors by publication is effective to bar the claims of creditors who are unknown to the executor, but not to those who are known to the executor, who are only barred when given a notice of the deadline for filing claims in an individualized letter giving the creditor actual notice of the deadline. So, obtaining a credit report expands the number of creditors who must be given an individualized notice and greatly increases the likelihood that creditors who are given a notice that wouldn't otherwise be given a notice will file a claim against the estate.
But, the duty to give an individualized notice to known creditors in order for them to be barred, only applies to creditors who are known to the executor before the creditors are barred by publication of a notice to creditors setting for a deadline or a statute of limitations. If you only obtain a credit report for the decedent after unknown creditors are barred by publication or some other non-claim statute or statute of limitations, the downside of obtaining a credit report is avoided.
There are two reasons that you might want to obtain a credit report, and one of those reasons is a reason to attempt to obtain a credit report even before unknown creditors are time barred by a publication or other deadline.
Both reasons relate to debts that are secured by collateral, also known as secured debts.
The first is that a credit report may disclose a secured debt which has as its collateral an asset not otherwise known to the executor, such as a mortgage house or vehicle in another state, or a small business asset of which the executor was unaware.
The second is that while the death of a decedent usually bars unsecured creditors from taking legal action to collect their debts outside of filing claims in the probate process, the death of a decedent usually not bar bar secured creditors from enforcing their debts against collateral owned by the decedent. Indeed, it is common for secured debts to define the death of the secured debtor as an event of default which can be used to authorize the foreclosure of the collateral to pay the debt even though payments on the secured debt are current.
On the other hand, if secured debts are kept current on their payments, often a secured creditor will never even think to determine if the secured debtor has died and will not declare the debt to be in default or attempt to foreclose on it, while if payments are missed, the secured creditor is very likely to learn this fact and to attempt to foreclose on the debt as soon as possible, rather than forbearing until the collateral is sold commercially to pay their debt.
While the proceeds of a foreclosure of collateral for a secured debt are applied towards payment in whole or in part of the debt, the amount of credit that the secured debtor receives against the debt owed to the secured creditor is almost always much, much less than the value that the secured debt could have received for the collateral if it was sold instead in an ordinary commercial manner. Indeed, it is very hard to obtain fair market value of real estate that is being foreclosed upon even in an ordinary commercial sale conducted before the foreclosure date, because potential buyers usually low ball their offers to purchase the property knowing that the seller is under economic duress.
For example, suppose that the decedent owned a vacation house with a fair market value of $300,000 subject to a $200,000 mortgage. If it is foreclosed upon, the mortgage would probably be extinguished, but there would be little or nothing left over for the estate. In contrast, if the vacation house were sold through a realtor by the executor, the estate would probably be able to net $80,000 or more for the estate after paying off the mortgage and paying for the costs of sale and a realtor's commission.
Obtaining a credit report that alerted the executor to the existence of the vacation house and the mortgage on the vacation house could add a great deal of value to the estate as a result.
There are other ways to learn about secured debts, especially those which are paid on a regular monthly basis, such as reviewing the decedent's bank records and reviewing the decedent's tax returns. But a credit report can sometimes reveal other assets and secured debts.
Another way that a credit report can reveal missing assets is by showing histories of payments of unsecured or secured debts that don't match up to any of the bank records available to the executor. This is a clue that there are additional financial accounts in the estate of which the executor is unaware. Then, the executor can contact one or more of the unsecured creditors who was being paid from the unknown account and use that information to locate the unknown account.

credit report on decedent


How can I calculate tax using a product's "price" instead of its "special price?"

Question: So, for example, let's say I have a product with a price of $10 and special price of $0, I want to calculate the tax based on the $10 price and not the $0 special price. I can't seem to find any way in Magento to do this.
Answer: you can create your own function to calculate product price with
Here i can give you sample code
 $classId = $product->getTaxClassId();
 $this->_allTaxClass = $this->getAlltaxClass();
 $vat =    $this->_allTaxClass[$classId];

where $this->_allTaxClass wil be tax class in system which can be find like below
protected function getAlltaxClass() {
    // Get all tax classies and its percentage
    $allTaxClass = array();
    $taxClass = Mage::getModel('tax/class')->getCollection();
    $store = Mage::app()->getStore('default');
    $request = Mage::getSingleton('tax/calculation')->getRateRequest(null, null, null, $store);
    foreach ($taxClass as $class) {
        $taxClassId = $class->getClassId();
        $allTaxClass[$taxClassId] = Mage::getSingleton('tax/calculation')->getRate($request->setProductClassId($taxClassId));
    }
    return $allTaxClass;
}

then finally call
 $_price = number_format($objProduct->getPrice(), 2, ".", "");
 $price = $this->priceWithVat($_price, $this->_allTaxClass[$classId]);

where actual function to get price with Vat
 /**
     * get price with vat
     * @return  price including vat
     * */
    public function priceWithVat($price, $vat) {
        return $price + (($price * $vat) / 100);
    }

Comment: Where should I add this bit of code?
Comment: where you want this ? if in all pages then could be some module or helper
Comment: Sorry, I don't have high enough cred to upvote here yet, but thanks for your help!
Comment: hello liyakat,
Can i apply the tax on the price after some deduction from the product price? Example-i m using a subscription method if customer is subscribed than we deduct some amount from the price of product,  i want to apply the tax on the (product_price - some_deduction)

please help
Comment: yes you can pass price after deduct your subscription
Comment: how can i achieve this functionality??

by override model or using event???
Answer: Here's what I ended up doing :

Created a product attribute called 'taxable_value' and set this to the taxable price.
Created a Magento extension and extended Mage_Sales_Model_Order_Invoice_Total_Abstract and Mage_Sales_Model_Quote_Address_Total_Abstract (extending these gave me the behavior I needed, not sure if this is the best approach)
I opted to treat taxable value as an additional tax (ie, an additional row in the totals array) so as to avoid Magento's tax behavior. This made it simple to get the numbers right, but the presentation can be rather wonky (concatenate values in Block models to suit).
Quick and dirty example:
class BrainBytes_TaxableValue_Model_Sales_Order_Invoice_Total_Taxablevalue      extends Mage_Sales_Model_Order_Invoice_Total_Abstract
{
    public function collect(Mage_Sales_Model_Order_Invoice $invoice)
    {
        $invoice->setTaxableValueAmount(0);
        $invoice->setBaseTaxableValueAmount(0);

        // Get any amount we've invoiced already
        $prevInvoiceTaxableValueAmt     = 0;
        $prevInvoiceBaseTaxableValueAmt = 0;
        foreach ($invoice->getOrder()->getInvoiceCollection() as         $prevInvoice) {
            if ($prevInvoice->getTaxableValueAmount() && !$prevInvoice-        >isCanceled()) {
                $prevInvoiceTaxableValueAmt += $prevInvoice-        >getTaxableValueAmount();
                $prevInvoiceBaseTaxableValueAmt += $prevInvoice-        >getBaseTaxableValueAmount();
            }
        }

        $customSurchargeAmt  = 0;
        $baseTaxableValueAmt = 0;
        $invoiceIsLast       = true;
        foreach ($invoice->getAllItems() as $item) {
            $orderItem = $item->getOrderItem();
            if ($orderItem->isDummy()) {
                continue;
            }

            if (!$item->isLast()) {
                $invoiceIsLast = false;
            }

            $orderItemQty          = $orderItem->getQtyOrdered();
            $orderItemPrevInvoiced = $orderItem->getQtyInvoiced();

            if (($orderItemPrevInvoiced + $item->getQty()) ==         $orderItemQty) {
                $customSurchargeAmt += $orderItem-        >getTaxableValueAmount();
                $baseTaxableValueAmt += $orderItem-        >getBaseTaxableValueAmount();
            }
        }
        if ($invoiceIsLast) {
            $customSurchargeAmt  = $invoice->getOrder()->getTaxableValueAmount() - $prevInvoiceTaxableValueAmt;
            $baseTaxableValueAmt = $invoice->getOrder()->getBaseTaxableValueAmount() - $prevInvoiceBaseTaxableValueAmt;
        }

        $invoice->setTaxableValueAmount($customSurchargeAmt);
        $invoice->setBaseTaxableValueAmount($baseTaxableValueAmt);

        $invoice->setGrandTotal($invoice->getGrandTotal() +         $customSurchargeAmt);
        $invoice->setBaseGrandTotal($invoice->getBaseGrandTotal() +         $baseTaxableValueAmt);

        return $this;
    }
}


Exchange 2010 - SSL Certificate

Question: I've generated free certificate at StartCom for external OWA usage remote.domain.com. Problem is after installing it in Exchange, local users started getting errors from Outlook that Exchange.domain.local doesn't match the certificate name. Is there a way to use 2 different certificates. One for local usage thru Outlook MAPI and one for external usage thru OWA? It seemed to work fine with Exchange 2003 without a problem.
Answer:
NETBIOS name of Exchange   :      ExchangeServerName
  Internal FQDN (AD name)     :      exchangeserver.local
  External FQDN (Public name) :      remote.domain.com
  Autodiscover name       :      autodiscover.remote.domain.com
  SubjectName         :      cn=smtp.remote.domain.com

You should have the above on a Self Signed Certificate to work properly and you won't have that warning. Internal FQDN Name should be there.
In Exchange 2010, there is a certificate wizard via EMC (Exch. Mgmt. Console)
I would recommend to follow the tutorial on the link below (good one) :
http://exchangeserverpro.com/configure-an-ssl-certificate-for-exchange-server-2010
Hope that Helps
Comment: Well problem is the self signed certificate works fine alone. Just when i generate new certificate request and validate it on outside and then assign the new certificate it stops working (well it still works just claims the the certificate is ok, just doesn't match the name). The remote access works fine with new certificate thou.
Comment: follow the link - as when you generated the certificate you forgot to mention the internal exchange fqdn - hence it's prompting you. once you have followed the link tutorial and generated one accordingly, enable it and the error should go away.
Comment: Well I did follow similar link and all the settings were correct, i even did it once again using other domain name (since i can't revoke cert for free) and the problem was the same. I was using exchange.domain.local for Local access and remote.domain.com for Internet, for autodiscover i had autodiscover.domain.local i think
Comment: Seems like i will need SAN Certificate to cover all domains (internal + external) and your answer touches Self Signed certificate. http://www.digicert.com/unified-communications-ssl-tls.htm
Comment: Correct - even if you are using self signed or trusted authority cert, you would need a SAN certificate (Subject Alternative Names) so your domain listed in all its possibilities used on your internal / external network. I thought you were intending to use a self signed one - hence the link or you could use digicert and generate a san cert request.

Exchange 2010 - SSL Certificate


Nissan Sentra SE-R p1490

Question: I have a 2002 Nissan Sentra SE-R with a P1490 Code. What's wrong with the car?
Comment: What do you mean by that I was asking what cars and parts are compatiable with mine
Answer: The OBDII system on your vehicle has an EVAP sub-system. The EVAP system vents the fuel tank fumes to the vehicles inlet manifold and are burnt by the engine. This prevents HC's being released to the atmosphere. The system will have a vent valve, purge valve, charcoal canister, control valve and hosing with its associated wiring to operate the valves. P1490 is an indication that the control valve is not operating correctly. You need to check the operation of the system. The easy way is with a bi-directional Nissan scanner, repair shop. The scenic route involves a full inspection of the wiring and components and jump wiring the valves with an external voltage to check operation, NOT recommended unless you are totally familiar with the system and the fire risks.
Comment: Ok what vehicles are compatible with mine its a 2002 nissan sentra se-r
Comment: Here in the UK we have a range of scanners, Snap-ON, Autel, Sealey, Carsoft etc etc. I have two laptops with various software, an Autel DS708 for everyday use, five hand held computers, and a couple of data loggers. To recommend any particular scanner would depend on the use it is going to be put too. For a one off job on your EVAP I would recommend a scan at your local repair shop. The alternative would be an expensive scanner, thousands of pounds for Snap-ON, which may only be used the one time, making it econmomically un-viable.
Comment: One thought I have just had. I bought an ELM obdII-andoid interface and a copy of Torque-Pro. Together they came to under unde £15. I regard it as a highly sophisticated toy, but it will give you codes and a lot of fun. A couple of customers of our's have used it lately and I got involved with it so I could read their song sheet.

Nissan Sentra SE-R p1490


Hamburger menu desktop

Question: I have a really simple question: in what occassion should I use the hamburger menu on desktop websites. Or is there no situation that this is usefull? I am really curious about your opions about that!
Answer: (Design perspective) No situation. With a desktop application you should have ample space to provide some type of visually appealing menu that can accordion or swipe off, spin and disappear the possibilities are endless. However, for mobile this is an icon that is easily understood and takes up little space. A user automatically knows AH there is the menu. For a generic menu not just the button Apple is notorious for providing a long list of things to swipe on.

Hamburger menu desktop


How do I trigger a webhook for transaction settlement in sandbox?

Question: I am trying to create a new webhook endpoint for my braintree integration. I added an endpoint to the Control Panel. I am using the Python library and created a a bunch of transactions. Also, I manually settled the transaction using the testing gateway. But I do not get a webhook notification. When is the webhook triggered and I=is there a way to trigger it manually?
Comment: Sorry noob question. Does Transaction -> Disbursed webhook cover voided transactions?
Comment: What kind of webhook triggers did you set up? There isn't any webhook trigger for a settled transaction if that is what you are looking for.
Comment: I am using the "Transaction -> Disbursed" webhook. I got the webhook notification later in the day. I can always create the test notification from the SDK but that doesn't seem to have all the data in the actual notification.
Comment: @jerry a settled transaction - or even a pending one would be a great candidate for a webhook. What happens if my internet connection times out when charging a customer? We get an email a month later from an angry customer because we charged them and didn't ship anything! A webhook would be a perfect way to reconcile everything and make sure all our locally maintained transactions are in sync.
Answer: Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.
The Transaction -> Disbursed webhook fires when the transaction has settled, and braintree has begun to move funds from their account to yours. While settling the transaction manually in the control panel would start the process, it does not fire the webhook right away.
There isn't any way to trigger this manually, instead braintree has sample payloads and a way to trigger a "Check" webhook in the control panel.
To answer the question in your comment, this type of webhook does not cover voided transactions.
Comment: This is the second reference I've seen to sample payloads that points to a seemingly dead link. Do you know if they still exist and if so where I can find them now?
Answer: I also asked a similar question to Braintree support, and the answer may be useful for others, even if I decided to go with Stripe (I found stripe much better after all my tests ;).
Question
Hi,
Just integrating Braintree, but can't find how I'm supposed to get a transaction confirmation (meaning it has correctly been 'charged'). When I create a 'transaction.sale' (including submitForSettlement) I always get (sandbox) a response indicating the status 'Submitted for settlement', and the transaction doesn't go to settled until Braintree globally process it (at night, etc.). I also can't find a related webhook to get payment confirmation (as I currently get using PayPal - IPN).
When/how can I get a payment confirmation so I can then 'deliver' the purchased item? By checking your docs, it's like you can't get a confirmation until the next day… how does it work exactly?
Thank you!

Answer
Hi Nacho,
Thanks for reaching out!
A Braintree transaction goes through several steps, the second of which is submitted for settlement. This means that the money has begun to move from the customers account, and is the immediate state of a transaction after being submitted; it's not possible to get an immediate 'settled' or 'complete' status on submission. Transactions in this state will generally move to settling, then settled, within 24 hours, although it can depend on your processing bank.
It is very unusual for a transaction to fail when moving from submitted for settlement to settled, as the amount will have been authorised prior to submission for settlement. Authorising a transaction means the funds are put on hold within the customers account, for a certain timeframe depending on payment method, until they are settled. We get an immediate response from the processing bank as to whether an authorisation is successful, which you'll see in the Braintree_Transaction response object.
As such, you can generally rely on the status of submitted for settlement to reflect a valid, successful transaction.
We don't offer webhooks for transactions - instead, our API is designed to give instant feedback via the response object. Because of this, we only provide webhooks for asynchronous events that aren't triggered by an API call (such as billing a subscription or disbursing funds). We encourage our customers to avail of our API responses, in addition to our reporting system and comprehensive search call options, for any extra functionality they require.
If you wanted to pull updated statuses for transactions, such as to confirm a payment has settled, you could use the Transaction.find() API request, pass in the transaction ID and read in the status from the response object. This could easily be run as a script that iterates through the previous days transaction IDs and updates the status of each on a daily basis.
I hope this explains the transaction process with more clarity and offers you some options!
Kind regards,
Braintree

Just in case it helps!
Comment: so what about the case where I call `Transaction.Sale` and the internet connection times out or goes down - but the charge went through? I wouldn't have the ID to check for it! Which report could I use for this. I was hoping for a PayPal IPN style verification 'ping' and it's a shame it isn't available.
Answer: I also asked kind of the same question to Braintree I got the same answer to check the transaction with Transaction::find() and then asked about the possibility of having a transaction not settled after having a SUBMITTED_FOR_SETTLEMENT status, here is the response, very clear and complete:

Hi Alban,
Thanks for reaching out with this question! Happy to help.
Settlement Declined:
In rare cases, a transaction that has been submitted for settlement will reach a status of settlement declined. For sales, this will only occur with a PayPal transaction. For refunds, this can occur with both PayPal and credit card transactions.
This occurs if the processor declined to settle the sale or refund request, and the result is unsuccessful. This can happen for a number of reasons, but the processor settlement response code may have more information about why the transaction was declined. Again, this status is rare, and only certain types of transactions can be affected.

PayPal sale: We recommend checking the settlement status of all PayPal sale transactions before shipping goods or providing services to customers. To reduce these types of declines, submit your PayPal transactions for settlement either upon creation or within 3 days of creation.
PayPal refund: We recommend contacting PayPal for details on refunds that are Settlement Declined.
Credit card refund: Settlement declines can be hard or soft, just as with authorizations. In regions that support an immediate decline response for refunds, we will return Settlement Declined if the processor responds with a hard decline.

Settlement Pending:
This status indicates that the transaction has not yet fully settled. This status is rare, and it does not always indicate a problem with settlement. Only certain types of transactions can be affected.
--> PayPal sale:

If using multiple partial settlements: Settlement Pending is a normal part of the transaction flow. The parent authorization will remain in this status until all child transactions are settled or the authorization expires. See the multiple partial settlement reference for more details.
If not using multiple partial settlements: Almost all Settlement Pending PayPal transactions will settle without intervention, so we always return a successful result. In general, you can expect these to be updated to Settled within a few days as we confirm their status with PayPal. In the rare case we can't settle a Settlement Pendingtransaction, we'll contact you to resolve the issue.

--> Credit card, Android Pay, and Apple Pay sales: You will only see Settlement Pendingauthorizations if you have contacted us to enable a specific API feature that uses this status.
I hope that provides insight, Alban! Let us know if further questions arise.
Best,
xxxxx.
Braintree


Creating histogram/statistics/scatterplot by classification tool in ArcMap?

Question: I'm currently working on a land cover classification with Landsat 8 imagery. I already subjected the imagery to pre-processing (atmospheric and topographic correction) and I mosaiced two images.
Now I want to apply a classification in ArcMap. I understand what I should do, but somehow I cannot mannage to create the statistics/histograms/scatterplots. When I click on the statistics, all values are zero. When I look at the properties of the raster layers on the other hand, I can see the statistics, calculated with the 'calculate statistics' tool. It doesn't create a histogram at all and the scatterplots are just 1 dot in the middle of the screen.
Does somebody know what my problem is and how I can fix this?
Answer: The problem might be that you have not selected the proper raster layer in the classification toolbar.
Just check the raster layer highlighted in the classification toolbar and verify that the it is the same raster that you wanted to classify.
Answer: If your raster is floating point then you will have this problem. So you need them to be in integer, the Math tool Int() will help you with that.
Comment: Welcome to GIS SE!  We're a little different from other sites; this isn't a discussion forum but a Q&A site.  Please check out our short [tour] to learn about our focussed Q&A format.


How to include a work item custom field in a TFS 2010 Report

Question: I want to use a custom field I have created in the Task work item in the "MSF for Agile Software Development v5.0" template in the built in reports for this template. I know how to open and edit a report from the template, but I don't know how to find the field I have created.
Answer: Although I can't comment on how to find the field exactly in the report editor, I would think you should be able to use the "Ref Name" you've set in the work item editor/XML.  I'm guessing you've used your own namespace for this, something like: MyCompany.Common.MyFieldName.  You'll also need to set your work item to be Reportable so it is included in the data warehouse of which the reports run.  Also note that the data warehouse doesn't get updated instantly, every 2 hours I believe so if you want a quicker update you can rebuild the warehouse manually.
This link explains the different reportable settings well: TFS Reporting Architecture Notes
Comment: Interesting will take a look at it. Yes, I used a namespace like you are describing. I think the field/work item is reportable. Thanks


Get the last revision id of any given entity?

Question: Is there a single, unified method in Drupal 7 to get the last revision id for any given entity object?  If so, what is that method?
Answer: I think entity_extract_ids() is the quickest you'll get:

Helper function to extract id, vid, and bundle name from an entity.

e.g.
list($nid, $vid, $bundle) = entity_extract_ids('node', $some_node);

Comment: My issue with this is that it gives the *next* revision of an item.  I'm looking for the last revision stored in the database.
Comment: That will give you the _current_ revision ID, which by normal definition is the last in the database - what are you looking for if not the current revision?
Comment: Well obvioulsy you're right :) I was doing something really dumb.
Comment: A minor clarification. When you call `entity_extract_ids` in hook_entity_update, `$vid` will be equal to the new revision of the entity. So, while this answer is technically correct, you might be using logic in `hook_entity_update` that acts as if the new entity revision id has not been determined yet, when in fact it already has. A better name for `hook_entity_update` might be `hook_entity_updated`...
Answer: Calling {entity_type}_load for any entity will load the most recent version (caution - see comment below)
For example for a node calling node_load(1) will load the most recent version of that node.
The revision id will be found in the vid property.
$node = node_load(1); // load the most recent version of node with id 1
$most_recent_version_id = $node->vid; // this is where you find the version id

Or for a user:
$user = user_load(1);
$most_recent_version_id = $user->vid; // this users version id

Comment: This is not quite true node_load(1) will load the published version of the node. Which might not necessarily be the most recent.
Comment: Great point @DavidCoote
Answer: $nid = 1;
$vid = db_query('SELECT vid FROM {node_revision} WHERE nid = :nid ORDER BY vid DESC LIMIT 0,1', array(':nid' => $nid))->fetchField();
$oNode = node_load($nid, $vid);

The above code will load the latest revision for NID 1 ($nid = 1, in this case) by finding the highest node_revision.vid.  It then loads that revision into $oNode.
Comment: Though this may be an answer to the question, please include some explanation of what the code does.


Why not all data traffic is going through the 3GDT in 3G data network

Question: What is the reason for only part of the 3G data traffic to be going through the 3G Direct Tunnel and another part is going through the SGSN. There are counters for traffic in IuPS interface which still show there is data traffic in the SGSN. The greater part of the traffic is going through the Direct Tunnel, but not all.
The Iu user plane traffic should go through the Direct tunnel and the Iu control plane traffic should go to the SGSN. And counters still show user pane traffic going through the SGSN. There must be a reason for this.
Answer: Yes, there is a reason to it.
Be advised that even if the 3GDT is set up between RNC and GGSN, the "2G non home public" users , ie "2G roamer users" only use IuPS on your picture, and don't use 3GDT.
We both know that 2G users can access 3G Core network depending on the policy of authorization mode based on IMSI or based on algorithm mode in SGSN.

The SGSN does not enable 3GDT for 2G Data user: for 2G data subscriber, the SGSN sends a RAB message request information containing user-plane IP address and TEID of the SGSN, not GGSN to the RNC.

To do:

Please export the number of 2G Data Subscriber in your
  network and
  export also the number of 2G PDP Context,
  there are chances they will correspond.
Answer: SGSN does have data traffic on IuPS interface with 3GDT implemented . This payload is 3G inroamer subscriber , as inroamer subscriber would go to thier home ggsn and not visited plmn ggsn (if vplmn not allowed) .
Answer: I think 2G Data user(Home subscriber) also can use 3GDT,
For BSC-------lu-u------GGSN  (for 3GDT)
    BSC--------Gb----SGSN-----Gn/Gp-----GGSN  (For Non-3GDT)


Weather my comments committed coercion in the second degree in NY?

Question: I disputed with my roommate regarding the noise issue. During a dispute, I said "If you keep making noise in the future, I will 1. contact the leasing office for feasible solutions 2. report this case to your professor(advisor) 3. cut off the in-room Internet". He said it was illegal verbal threat and wanted to sue me. May I ask if what I said regarded as an illegal verbal threat? Does "2.report this case to your professor/advisor" commits coercion in the second degree in NY? We are in NYC.
Answer: Probably not.
Based on this, you need to threaten someone so they will do something they are legally entitled to refuse to do or to refrain from doing something they are legally entitled to do. It may be that your roommate is not legally entitled to make the noise you are disputing about.
Secondly, for your purposes, the relevant threats must fall within the scope of:

Accuse some person of a crime or cause criminal charges to be instituted against him or her; or

Expose a secret or publicize an asserted fact, whether true or false, tending to subject some person to hatred, contempt or ridicule; or ...

Its certainly not clear to me that you have done either of those things and even if you had it is not clear that they are a threat. These are things you are entitled to do in the context of resolving the dispute and pointing out to the other disputant where you are thinking of going if the dispute is not resolved between you is not a threat.


Is there an idiom or phrase set for completing a task, or completion of an event?

Question: I actually know quite a few idioms and other phrases for completion already as I am a native speaker. I am just wonder if there are any examples that relate to something that is formal such as an event. EXAMPLES: Round out, wrap up, finish out, finish up, sum up, end of the road, come to an end, tail end, end of the line, and let out.
Comment: Are you looking for a list of idioms such as "putting a finishing touch" ?
Comment: *Is there perhaps a site, a list, or a book, where more of these can be found?* – Do you know [thesauri](http://en.wikipedia.org/wiki/Thesaurus)?
Comment: Yes, idioms similar to "putting a finishing touch" would be helpful.
Comment: Just curious, do you believe that the EXAMPLES you listed in your question all "correlate with death"?
Comment: @Jim - Sorry to have confused you. I am new. I had stumbled upon this site a few days ago without the slightest inclination as to what I was about to unearth. This community has certainly captivated my attention. In an effort to elucidate the misunderstanding, I will edit my post accordingly.
Answer: top off

: to finish something appropriately: The couple topped off the
  romantic evening with a walk along the river. The American Heritage®
  Dictionary of Phrasal
  Verbs
: to end or terminate something (with something). They topped the
  building off with a tall flagpole. McGraw-Hill Dictionary of
  American Idioms and Phrasal
  Verbs

wind up

: to bring something to a finish; end something: We need to wind up
  this project before January. This card game is fun, but let's wind
  it up before dinner.`The American Heritage® Dictionary of Phrasal
  Verbs

wind down

: to end or cause something to end gradually The storm finally began
  to wind down after four hours of heavy rain. We wound down our
  affairs in Europe and left for home. Cambridge Dictionary of
  American Idioms
Comment: Wonderful! Thank-you for the references as well, I will surely emerge myself into into these tomes of knowledge as soon as I get a chance.
Comment: I suppose "wind down" would also achieve the same end.
Answer: Perhaps you could modify "It's not over until the fat lady sings" in such a way that says it is over.
For example:  "That's it! We can go home now!  The fat lady just sang."
Wikipedia: "It ain't over till (or until) the fat lady sings (emphasis added) is a colloquialism and has been classified as a proverb. It means that one should not presume to know the outcome of an event which is still in progress. More specifically, the phrase is used when a situation is (or appears to be) nearing its conclusion. It cautions against assuming that the current state of an event is irreversible and clearly determines how or when the event will end. The phrase is most commonly used in association with organized competitions, particularly sports.
"The phrase is generally understood to be referencing the stereotypically overweight sopranos of the opera...."
Comment: Upon a re-examination of my question, I believe that my main issue derives from either laziness or a lack of creativity and not necessarily from a lack of understanding. This is a very clever and also literal answer to my question as the idiom you have presented here pertains to an event. Thank you for your insight, I will certainly look into the situation further.
Answer: One idiomatic expression meaning "It's finished" that has emerged in the past decade or so is "Stick a fork in it; it's done." The original sense of the phrase was "It's ready to take out of the oven or off the grill because it's fully cooked." In the context of sports, politics, and business, the phrase is sometimes used to suggest that something is hopelessly lost. From Will Meyerhofer, Way Worse Than Being a Dentist: The Lawyer's Quest for Meaning (2011):

There's slow at the office. Then there's moribund. Like, stick a fork in it, parrot in the Monty Python skit, no longer viable, kaput, over and out, flatlining...dead dead dead.

But it continues to be used in positive settings as well. From Debbie Stoller, Stich 'n Bitch: The Knitter's Handbook (2003):

You probably won't believe this, but when you come back to it, about twenty-four hours later, your piece will actually be the shape that you blocked it to. It will be perfect, and even, and lovely. Stick a fork in it, baby, because it's done.

From Allan Wolf, Immersed in Verse (2006):

Revising Your Poems
I can almost hear your groan at the very mention of this despicable "revising" word Teachers say it a lot, and they seem to say it just when you're feeling so proud of your perfectly perfect, finished final- draft, stick-a-fork-in-it-'cause-it's-done poem.

From Gigi Gates, I Made It (2013):

When you decide to allow God to order your steps in all you do it is when the devil will attempt to attack you at all turns. We have to have faith to know when we forgive then it is done—I mean you can stick a fork in it because it is done, never to be brought up again. Bottom line forgiving is not for the other oerson it is to free you up so God can move you to another level in His Word.

From Robert Gifford, Research Methods for Environmental Psychology (2015):

The values of χ2 and its associated df [degrees of freedom] express the heterogeneity of the data used to test a comparison. If the ci [confidence interval] does not include 0.0 and if this χ2 is significant, the interpretation is that there is a solid overall finding for the claim in question but there is also a lot of variety in the data and so further, more focused research would probably be worth doing. If the respective ci does not include 0 and respective χ2 is not significant, more detailed work would probably not be worth doing. Stick a fork in it: it's done. Move on to another topic that is not already so firmly established.


How much do eccentricities of different satellites in GSO vary?

Question: It's improbable to get a payload into a perfect orbit, but obviously there is room for error, otherwise payloads in GSO would not work as well as they do. If the target eccentricity for a payload in GSO is 0, what is the margin of error? Have there been any egregious errors when maneuvering a payload to GSO?
Answer: Once in GSO, the eccentricity is perturbed by a few effects, particularly the pressure of sunlight (not the solar wind), on the satellite.  It accelerates the satellite at 6PM local and decelerates the satellite at 6AM local, forcing the orbit to become elliptical.  The eccentricity causes the satellite to oscillate east-west on a 24 hour cycle.  Its control is part of the normal east-west stationkeeping.  Generally the box is $\pm 0.05^\circ$ in longitude, but this can vary.  A reasonable target eccentricity is $0.00028$ in this range.
Answer: @Stu, here is an example of a satellite in GSO, and the impact of slight eccentricity coupled with high inclination with the JAXA description of QZSS .
With that example in mind, you can almost visualize the space of trajectories with varying eccentricity in GSO.  If an egregious error were made, you could expect to see variations in both, but will depend on the magnitude the error creates in the initial conditions of inclination and eccentricity.  Other perturbations could make the situation only go downhill (pun?) from here, based upon the type of error made and ability to control north-south / east-west station keeping.  An older (1982) UT Austin conference paper on inclined/eccentric GSO is cited here


Which adventures feature Illithids?

Question: Does anyone know which adventures have Illithids?
I am looking for a tier two adventure or one for levels 7-9 in other editions. I am looking for adventures that primarily focus on Illithid as a faction, major plot part, side quest, etc.
Answer: "Adventure Lookup" lists 25 modules containing illithids, although a number of them are re-releases of the classic first edition GDQ series.
In G3 (first edition, Hall of the Fire Giant King) there was a chamber on the third level (cave level, more like a 'dungeon' then part of the Hall proper) with a group of illithids who are there observing the drow - they have little affect on the plot or story arc.  This encounter is then repeated in G1-3 (first edition), GDQ1-7 (first edition), Against the Giants: The Liberation of Geoff (second edition) and Against the Giants (fifth edition, as contained in Tales of the Yawning Portal).
In D3 (first edition, Descent into the Depths of the Earth, there is a second illithid observation point.  This one is more significant, as one of only three planned encounters for the module.  The illithids have wererat minions , a drow prisoner, and substantial treasure.  This encounter is reprinted in GDQ1-7 (first edition).
S3 Expedition to the Barrier Peaks features a single illithid as the BBEG for the adventure on the deepest level of a crashed spaceship.  If you are looking for spelljammer connections this module has many tie-ins, but the illithid itself is not particularly well-developed.  I keep a campaign journal of one of my games, so if you are interested in how that adventure could play out you might have a look.  It is pretty true to the first edition original but adapted for fifth edition rules; the module starts in Post 157.
I do not have first hand experience with any of the other modules listed, but many of them appear to have illithids as much more central elements rather than one-off encounters.
Answer: Waterdeep Dragon Heist for 5e
The hard part for your request is the tier of play. Mind flayers are pretty nasty, so adventures that sport them as an entire faction tend to be higher level. For example Waterdeep: Dungeon of the Mad Mage, has an entire level dedicated to them, but it is for character level 14, well beyond your tier 2 or level 7-9 target.
Waterdeep: Dragon Heist does have a prominent Mind Flayer in one of its factions. The recommended range just barely touches tier 2 towards the end, but as the villain lair for this faction sports Xanathar himself as a possible opponent, it should not be an issue to play this adventure with a higher level group. We ran a heist mission against Xanathar's operation with 7th level characters, had a blast of fun doing it, and barely made it out alive. And that mind flayer with his kaggle of Intellect Devourers was a scary, scary opponent, that nearly killed two of our characters, and made our escape very difficult.
Comment: A "blast" of fun.  I see what you did there.
Comment: Parts of *Waterdeep: Dungeon of the Mad Mage* feature mind flayers as well.
Answer: The Speaker in Dreams
Its a bit below the level range you specified, but the Speaker in Dreams is a DnD 3.0 adventure for 5th-level characters that features an illithid as the primary behind-the-scenes villain and final boss.
It's the third adventure in the 3.0 adventure path that begins with The Sunless Citadel and the Forge of Fury (which were reprinted in 5e in Tales from the Yawning Portal) and ended with Bastion of Broken Souls.

Which adventures feature Illithids?


converting to fixed gear, chain problem

Question: I just got a 16 tooth and tried to put on the old chain, BUT while it fits on the pedal cog (46 tooth), it does not on the rear cog. How can I solve this? a different cog in the back or a different chain? (on the rear cog, the chain has bigger "holes" than it should, so it doesnt fit...)
Thank you so much for any advice...!
Comment: Check chain length. Ten chain links should be ten inch on a new chain. If they are more than 1/10" off, you'll need a new chain and probably new front chain ring, if the teeth are worn.
Comment: Ok, so i figure the spaces are to small on the rear cog, compared to the front one (a difference of about 3mm) so should I get new chain or new a different rear cog? Thank you
Answer: You might have bought the wrong width chain. For road bikes/fixie there are two possibilities. These are the width of the chain.
3/32" and 1/8"
a 3/32" chain will not fit on a 1/8" cog but a 1/8" chain will fit on a 3/32" cog (but with extra space around the teeth).

If it is the length of the chain you are talking about then get a new chain. but the pedal cog might also need to be replaced.
More economic route might be buying a used rear cog (be warned this might be unsafe if you end up riding a lot wear will be faster)
Comment: Buying worn parts to match other worn parts is a reeeeeeally bad idea. New chain: Wippermann 1Z1, Sram PC1 or KMC S1 are three good 1/8th options, less than 10GBP each. New chainring: 1-speed (no ramps) for 5-bolt 130mm about 25GBP.

converting to fixed gear, chain problem


How to calculate time needed by an object to change its state of motion when an net force applies to it (inertia)?

Question: (Newton's first law states that every object will remain at rest or in uniform motion in a straight line unless compelled to change its state by the action of an external force. This tendency to "resist" changes in a state of motion is inertia.)
How to calculate the time an motionless object will "resist" to changes when an net force applied?
Comment: The acceleration is the applied force divided by the mass of the object. There is no 'delay'.
Answer: Newton's second law of motion says that the net force on an object is equal to the object's acceleration multiplied by its mass. So, if a net force $\vec F$ is applied to an object with mass $m$, its acceleration is
$\displaystyle \vec a = \frac {\vec F} m$
If a net force $\vec F$ is applied to an object that is initially at rest then the object begins to move immediately. If the force $\vec F$ is applied for a time $t$ then at the end of the time $t$ the object's velocity $\vec v$ is
$\displaystyle \vec v = \vec a t = \frac {\vec F t} m$
Answer: As noted in @gandalf61's answer, for an ideal point mass subject to a single force with no friction or other resistive forces, the object starts moving the instant the force is applied. There is no delay.
For a real macroscopic object, the side of the object where the force is applied will start to move instantaneously, but it takes time for the force to propagate throughout the object. The force propagates at the speed of sound ($v$) in the object's material, so for an object of size $L$, it takes a time $t\sim L/v$ for every part of the object to start moving.
Answer: Theoretically, the time is zero as the effects of a force are felt instantaneously. As soon as the force is applied, the center of mass of the object is going to start squirting some velocity and the body will proportionately have momentum.
In practice, each object is neither a point mass, nor a rigid body, and thus as soon as a force is applied at some location, local deformation occurs. At this instant deformation waves, or stress waves start to travel throughout the body at the speed of sound inside the body.
As a result, the effect of the force is felt by each part of the body at different times. And this situation is measurable with simple experiments.

Paper describing experimental setup to measure speed of sound in a metal rod
Video explaining the concept of speed of sound inside materials
Answer: Resistance to changes should not interpreted as if, at some time, there is a sudden drop in the ability to resist. Instead, it means that the larger the mass, the smaller the resulting acceleration in the presence of the same force.


Gnome disk tool for HDD or SSD image creation & restore

Question: My question: Can Gnome utility create an image of complete HDD or SSD irrespective of whether HDD contains partitions or not? For example I have a HDD which has three partitions  , can I use Gnome to create an image & then restore it. I will use a bootable Linux  USB for this.
thanks
Answer: Gnome Disks includes the option Create Disk Image. This does just that: make a file of all numerical data on the disk. This includes all partitions on the disk.
You intend to use a "bootable Linux USB". It does not work this way. You restore the image to a disk, which can be an USB disk. Its contents will be fully overwritten by the disk image, so whether you use a "bootable Linux USB" or any other USB drive with sufficient capacity does not matter.


First authorship in different fields

Question: In most fields I'm familiar with, first authorship is for the lead author. But I've heard that it wasn't the case in some fields. Is that true?
Comment: Math seems to generally have an alphabetical listing of authors.
Comment: @JonCuster that's what I heard! Any other fields? I'm quite curious, as in some fields it even seems that the last author is important too!
Answer: In different fields, the order in which authors are listed may be interpreted differently, that is true. In some (math, CS) authors are generally listed alphabetically, so you can't conclude anything from the order. In some fields the final author listed is the head of the lab in which the work was done. This person may be responsible for a lot or a little of the actual contributions.
In some fields the first author listed is understood to be the one that did the majority of the work, but in some of those fields the first author listed is also just assumed to be riding on the coattails of the last (supervisor) author.
It is very complicated. In some fields people fight over the ordering very bitterly and many questions come here for "resolution", which we can't provide.
In some fields, sole authorship of work derived from doctoral studies is the norm and others who help get acknowledged, but are not co-authors.
There have been a few papers, in the sciences, in which the list of authors is longer than the paper itself. I think there was one case where there were so many authors that it ran afoul of the journal's page limit. Imagine how many people contribute to major work at CERN, for example.
Comment: *Imagine how many people contribute to major work at CERN, for example* --- [This paper](https://journals.aps.org/prl/pdf/10.1103/PhysRevLett.114.191803) has 5,154 authors.

First authorship in different fields


SVN - What are all the benefits we have if we commit a huge files list in a single shot rather than multiple commits?

Question: I woud like to understand what are all the benefits we have if we commit a huge files list in a single shot rather than multiple commits?
Answer: One of the big advantages of Subversion over CVS is its ability to keep related changes as a single change set rather than a dispersed set of individual file changes. Let's say you're working on a new feature which involved a dozen files. Now, you're told that the change must be reverted.
If you used a system like CVS, those changes are treated as a dozen individual and independent changes. Tracking them all down can be quite difficult. You could use timestamps, but you'll still have to search your entire repository. You can try tagging your changes, but you still have to move across the entire repository looking for that change.
In Subversion, that change was a single change set. Backing on that change simply means backing out that single changeset.
Another advantage is that Subversion can do atomic changes on a change set. Imagine if you have 20 files that are all related to a single modification. Now, imagine in one of those files, someone did an update while you were testing your changes. In CVS, if you did a commit, 19 of those files would be committed, but not the last.
Now, your repository is in an untested and probably unstable state. In fact, there's a good chance that your software won't even build. Your instinct is to quickly do an update on that one file, and then run some rough tests, and commit that one file.
In Subversion, not one of the files you changed would be committed. The repository is still in a stable and tested state. You don't have to worry about the repository and can update that one file, and run a complete regression test before attempting to do your commit again.

So, in the answer to your question, should you commit all those files in one big list: It depends. Commit file changes as discrete change sets. It might be that all of those files changes you've made are not related to each other. In that case, feel free to make each one a separate change list. Don't worry about the revision number being to high. I never understood this concern since the revision number has no effect on the quality of your software.
Then again, if all of the changes are one set, make a single commit of your changes. The idea is if someone is trying to analyze a change, then can quickly see all of the files involved. A change could be a single feature, a bug number, or however you want to measure your change. The point is to make commit your changes in logical units.
Answer: easier to see what files were related for the task,
e.g. possible to see which files were modified for performing the fix for bug #123
oh, and make sure you add the bug number in the commit comment, it makes life so much easier when you want to go back in time to see what you changed
e.g.
"hm, we fixed this bug about a year or two ago, strange that it was reopened, lets check the commit history what we did back then"
and then you simply search for the bug number and you find it in an instant.
and the other way around: in your bugtracking system, add a note which commit number that fixed the bug, makes life so much easier.
Answer: Size matters not.
One commit should cover one logical change that may or may not span over several files. If you combine several logical changes into one commit then it may be difficult later to find or revert one of those logical changes. If it's too late to separate changes into logical units then commit all at once and hope you'll not regret it.
Answer: better for keeping Version number smaller, easier to track your changes ,
** leave comments when you commit, because you may forget why you did that commit


How to enter view-only mode when browsing Emacs source code from help?

Question: When I browse Emacs help for functions via C-h f, I often want to peek into the Elisp/C implementation. I want to enter view-mode automatically when I access source code this way to avoid unnecessary modification. Is there a hook or function I can advise to accomplish this?
Comment: Here is what I use to prevent accidental modification of any of my files that open in `emacs-lisp-mode` and I just do `C-x C-q` if I want to edit the source code.  `(defun set-buffer-read-only () (setq buffer-read-only t)) (add-hook 'emacs-lisp-mode-hook 'set-buffer-read-only)`
Answer: You can use directory-local variables to make Emacs' source files read-only by default. (See also C-hig (emacs) Directory Variables RET).
Create a file called .dir-locals.el at the root of the directory tree you wish to protect, with the following contents:
((nil . ((eval . (view-mode 1)))))

Edit: Michał Politowski points out in the comments that enabling view-mode in this way is problematic, because when you dismiss the buffer with q it also disables the mode, meaning that the next time you visit that buffer view-mode will not be enabled.
Edit 2: Constantine has provided a solution to that problem in the comments below:
((nil . ((eval . (when buffer-file-name (view-mode-enter nil #'kill-buffer))))))

This usefully adds a test to ensure that the buffer is already visiting a file, but the key change is the use of view-mode-enter instead of view-mode, as the former takes an EXIT-ACTION argument which determines what to do when q is typed. In this case the exit action is to kill the buffer, ensuring that the next time the file is visited it will again end up in view-mode.
Edit 3: Following that path, we can also see that the specified EXIT-ACTION is ultimately passed to the view-mode-exit function, and its docstring gives us an alternative solution:
view-no-disable-on-exit is a variable defined in `view.el'.
Its value is nil

Documentation:
If non-nil, View mode "exit" commands don't actually disable View mode.
Instead, these commands just switch buffers or windows.
This is set in certain buffers by specialized features such as help commands
that use View mode automatically.

Hence we can use the following:
((nil . ((eval . (when buffer-file-name
                   (setq-local view-no-disable-on-exit t)
                   (view-mode-enter))))))

I use the alternative approach which you can specify entirely in your init file (as opposed to creating a .dir-locals.el file), and I simply make the files read-only rather than using view-mode. My config looks like this:
;; Emacs
(dir-locals-set-class-variables
 'emacs
 '((nil . ((buffer-read-only . t)
           (show-trailing-whitespace . nil)
           (tab-width . 8)
           (eval . (whitespace-mode -1))))))

(dir-locals-set-directory-class "/usr/local/src/emacs" 'emacs)
(dir-locals-set-directory-class "/usr/local/share/emacs" 'emacs)
(dir-locals-set-directory-class "/usr/share/emacs" 'emacs)

Obviously you can do the same thing for your elpa directory, and any other directory which contains third-party source code.
Comment: Today I figured out that I need a workaround for the issue pointed out by @MichałPolitowski --- and I found one: use `((nil . ((eval . (when buffer-file-name (view-mode-enter nil #'kill-buffer))))))` (note `(view-mode-enter ...)` instead of `(view-mode 1)`). This way pressing `q` kills the buffer and `view-mode` *is* enabled the next time I visit the same file.
Comment: Great! This is clearly better than what I came up with. (What was I thinking of? I know about and use `.dir-locals.el` myself...)
Comment: I've been something along the same lines based on a `find-file-hook` and a `read-only-dirs` list, but I like this approach.
Comment: This looks like a very clean approach. I have one minor problem though. With `((nil . ((eval . (view-mode 1)))))` what is the simplest way to make `View-quit` kill the buffers accessed via help? Otherwise after exiting the source view by pressing `q`, the buffer stays behind and when later accessing sources from the same file from help again view-mode is not started.
Comment: Michał Politowski: Right you are. I've updated the answer to incorporate that fact, but I don't have a workaround. Constantine's (edited) answer may be the best solution for using `view-mode`.
Answer: Update (after a night of sleep): This answer has a major flaw: it enables view-mode when navigating to any function, not just Emacs sources. This can be fixed, but you're better off using the answer by @phils.
By doing C-h f describe-function RET and then reading the source code of describe-function I discovered that it creates a "button" of a special type for links to function definitions: help-function-def.
Running zrgrep with this string ("help-function-def") pointed me to help-mode.el.gz.
After all this digging around we can replace this button type with our own (note the comment in the code):
(define-button-type 'help-function-def
  :supertype 'help-xref
  'help-function (lambda (fun file)
               (require 'find-func)
               (when (eq file 'C-source)
                 (setq file
                       (help-C-file-name (indirect-function fun) 'fun)))
               ;; Don't use find-function-noselect because it follows
               ;; aliases (which fails for built-in functions).
               (let ((location
                      (find-function-search-for-symbol fun nil file)))
                 (pop-to-buffer (car location))
                 (if (cdr location)
                     (goto-char (cdr location))
                   (message "Unable to find location in file")))
                   (view-mode t)) ; <= new line: enable view-mode
  'help-echo (purecopy "mouse-2, RET: find function's definition"))

As far as I can tell there is no function to add advice to: Emacs uses a lambda here. On the other hand (as pointed out by @rationalrevolt) one can replace the help-function property of the help-function-def button type:
(require 'help-mode)
(let ((help-func (button-type-get 'help-function-def 'help-function)))
  (button-type-put 'help-function-def 'help-function
                   `(lambda (func file)
                      (funcall ,help-func func file) (view-mode t))))

Comment: I think I can try to use `button-type-get` and `button-type-put` to replace the lambda with my own that forwards to the existing lambda.
Comment: @rationalrevolt: Good idea! (Seems a bit fragile, but I suppose this is fragile too.)
Comment: @rationalrevolt: Please see the updated answer. (Can't have newlines in comments, it seems...)
Comment: Thanks! I was trying something similar but being a newbie to elisp I was bitten by the dynamic binding and couldn't get my closure to work :)
Answer: I think all you need is to add a hook:
(add-hook 'find-function-after-hook 'view-mode)

Comment: This is better than my monstrosity, but still does not really match the question: it turns on `view-mode` when navigating to *any* function using `C-h f`, not just Emacs sources.
Comment: Experimentally, the help links don't actually run this hook. It looks like only the interactive `find-THING` commands utilise this hook, and the help buttons bypass it.
Answer: This does not address your specific case, but the more general case of switching to view-mode whenever you visit a source file from a help buffer. I'm offering it as an alternative  to @Constantine's answer, since it wasn't readable as a comment.
I looks like I originally got this from the EmacsWiki.
(defadvice find-function-search-for-symbol (after view-function-source last (symbol type library) activate)
  "When visiting function source via Help, switch to view-mode"
  (with-current-buffer (car ad-return-value)
    (view-mode 1)))

(defadvice find-variable-noselect (after view-var-source last (variable &optional file) activate)
  "When visiting variable source via Help, switch to view-mode"
  (with-current-buffer (car ad-return-value)
    (view-mode 1)))

Answer: Here's a solution that works for built-in documentation and an example showing how to extend it to ELPA. It works by matching the path to the current file against some regexes and applying read-only-mode if any of them match.
Note that the buffer is read-only-ified if you visit it through dired as well, not just through help.
I added a hook that runs after entering emacs-lisp-mode that checks if the path to the file matches /\.el\.gz$/, and applies read-only mode if it does.
(defun readonly-if-el-gz ()
  (cond
   ((string-match "\\.el\\.gz\\'" (or (buffer-file-name) ""))
    (read-only-mode +1))))

(add-hook 'emacs-lisp-mode-hook 'readonly-if-el-gz)

Here's an example that checks ELPA too, using the heuristic that any path containing .emacs.d/elpa is actually ELPA code.
(defun readonly-if-internal ()
  (let
      ((name (or (buffer-file-name) "")))
    (cond
     ((string-match "\\.el\\.gz\\'" name) (read-only-mode +1))
     ((string-match "\\.emacs\\.d/elpa" name) (read-only-mode +1)))))

(add-hook 'emacs-lisp-mode-hook 'readonly-if-internal)


Show that trace over 1 system of GHZ state is unentangled

Question: If I compute the trace over 1 system of the GHZ state I have a matrix with no off diagonal non-zero elements. Is this sufficient evidence that the reduced 2 qubit state is unentangled?
Answer: Essentially, yes, but I suppose that depends on who is deciding what constitutes sufficient evidence. I would suggest that you're asking "is this enough" because you suspect it's true but don't actually know how to justify it any further. In which case, it's perhaps not so obvious, and that further justification is useful.
To give the answer with a couple of the critical ideas filled in:
The mixed state is
$$
\rho=\frac12(|00\rangle\langle 00|+|11\rangle\langle 11|)
$$
and it is diagonal. To all intents and purposes, this means that it is a classical probability distribution, and hence not entangled.
But to formalise this a bit more, what is the definition of entangled? A two-qubit state is separable if it can be written in the form
$$
\rho=\sum_ip_i\sigma_i\otimes\tau_i
$$
where $\sigma_i$ and $\tau_i$ are single-qubit density matrices. If it cannot be written in this form, it is entangled. From the way that I wrote down $\rho$, it should be obvious that it can be written in a separable form:
$$
p_0=p_1=\frac12, \sigma_0=\tau_0=|0\rangle\langle 0|, \sigma_1=\tau_1=|1\rangle\langle 1|.
$$
Alternatively, you might like to think about whether $\rho$ can be constructed via local operations and classical communication without any shared entanglement as a starting resource (e.g. Alice tosses a coin and communicates the result. If heads, both parties produce $|0\rangle$...)
Comment: Thank you this makes sense.
Answer: Yes, a diagonal density matrix is always separable, if that's what you're asking.
The reason is that such a two-qubit state has by definition a decomposition of the form
$$\rho = \sum_{i,j=0}^1 p_{i,j} (|i\rangle\!\langle i|\otimes |j\rangle\!\langle j|)$$
for some set of probabilities $p_{i,j}$. Any such state is separable, pretty much by definition.
The same holds in arbitrary dimensions.
Comment: Makes sense, thank you for your answer
Answer: The Greenberger–Horne–Zeilinger (GHZ) state is given by
$$\vert GHZ \rangle = \frac{1}{\sqrt{2}}\left(\vert 000 \rangle + \vert 111 \rangle\right).$$
$$\vert GHZ \rangle \langle GHZ \vert = \frac{1}{2}\left(\vert 000 \rangle \langle 000 \vert + \vert 000 \rangle \langle 111 \vert + \vert 111 \rangle \langle 000 \vert + \vert111 \rangle \langle 111\vert\right)$$
Therefore, if we make a trace with respect to one of the systems we will have the following state,
$$\rho_{23} = \text{Tr}_1(\vert GHZ\rangle\langle GHZ \vert) = \langle 0 \vert_1 \vert GHZ \rangle \langle GHZ \vert \vert 0 \rangle_1 + \langle 1 \vert_1 \vert GHZ \rangle \langle GHZ \vert\vert 1 \rangle_1 = \frac{1}{2}(\vert\langle 0 \vert 0 \rangle\vert^2 \vert 00 \rangle \langle 00 \vert + \langle0\vert0\rangle\langle1\vert0\rangle\vert00\rangle\langle11\vert+\langle0\vert1\rangle\langle0\vert0\rangle\vert11\rangle\langle00\vert+\langle0\vert1\rangle\langle1\vert0\rangle\vert11\rangle\langle11\vert+ $$
$$+\langle 1\vert0\rangle\langle0\vert1\rangle\vert00\rangle\langle00\vert+\langle1\vert0\rangle\langle1\vert1\rangle\vert00\rangle\langle11\vert+\langle1\vert1\rangle\langle0\vert1\rangle\vert11\rangle\langle00\vert+\vert\langle1\vert1\rangle\vert^2\vert11\rangle\langle11\vert)=$$
$$=\frac{1}{2}(\vert 00 \rangle \langle 00 \vert + \vert11 \rangle\langle 11 \vert) = \frac{1}{2}(\vert 0 \rangle \langle 0 \vert \otimes \vert 0 \rangle \langle 0 \vert + \vert 1 \rangle \langle 1 \vert \otimes \vert 1 \rangle \langle 1 \vert)$$
Note that state is separable therefore because we have the subsystem as a convex combination of separable states. It is therefore incoherent in the multipartite basis.
In general, we may see that finding that a bipartite state is incoherent suffices since this state will also be separable. A state $\sigma$ is incoherent if it can be written as $\sigma=\sum_i p_i \vert i \rangle \langle i \vert$ for the reference basis $\{\vert i \rangle\}_i$. Therefore, this generalizes for bipartite scenarios in the following way: defining the reference basis in the bipartite system to be $\{\vert i \rangle \otimes \vert j \rangle \}_{ij}$ where $\vert i \rangle$ are elements of the basis by Alice and $\vert j \rangle$ are elements of the basis by Bob (it is the basis because it is the chosen reference basis to define coherence with respect to) therefore the bipartite state will be incoherent if it is of the form,
$$\rho^{AB} = \sum_k p_k \sigma_k^A \otimes \tau_k^B$$
and these states are always separable (as other answers pointed out). These considerations were done following the paper Ref1, but everything generalizes for multipartite states.


primer not adhering to oil based painted ceiling- help

Question: Just primered the kitchen ceiling with 1-2-3 water based primer. The ceiling was previously painted with oil based paint. In preparation, I used TSP rinsed it well, then used liquid sander. Now the primer can be scrath off with finger nail. I need help please. what is the best way remove the primer without having to sand the 25x11 ceiling?
Answer: Sounds like either the liquid sander didn't, or the liquid sander is leaving a residue which is interfering with bonding with the new primer.
I have never heard of a "liquid sander", and I would expect the recoating industry would jump all over that if it works. So I suspect it is "snake oil".  But I mostly paint over alkyds (oil paints), maybe it only works on old latex coats; that wouldn't be a surprise, latex is very chemically different from aklyd.  Also, etching an alkyd would require extremely harsh chemicals, and I doubt they'd be allowed to be sold at Home Depot.
Regardless, it should be perfectly obvious that the new primer has to go, as it will be the "weak link" for any coating painted over it, and will cause that coating to fall off too. Do it ASAP while it is still soft.  I would use a scrub brush and water; water makes still-curing latex paint/primer softer.
Sorry you have to go through that, but not too sorry; that's what you risk when you try to take shortcuts.
Adhesion has two parts:

The old surface is roughened, so at the microscopic level there are many jagged grooves and peaks (like a mountain range) so the new coat can physically attach.
The old surface is entirely clean of contaminating material.  An example of contaminating material would be "snake oil".

You don't need to go crazy with sanding.   All you need is a "scuff sand" to remove the gloss and create those jagged edges.  My favorite scuff-sand method is a 3M Scotchbrite sponge with the green abrasive, wetted if necessary. You'll know when the gloss is gone because the surface will look dingy.  I mean honestly, I don't see how rolling out a chemical and the cleanup that follows is any easier.
Also, I realize people like latex products because of less smell and easy cleanup, but since you're dealing in primer, they come in both latex and oil base.  Since you're painting over alkyd/oil, oil-based primers are a perfectly reasonable choice.  Primers like Kilz Original, BIN etc. are designed to have latex laid over them.
Comment: Thank you for you help- it is truly a nightmare- it took me 1 1/2 hrs to scrape a small section of 18x18 inches. Tomorrow I will try out your recomendations. The product I used is from Klean strip and it's called "sander degloser" sold at big box stores. Aparently it didn't work.


Black Diamonds that are Fixing themselves in MySQL

Question: I am running into a very strange issue with a site that I am working on. The site is basically a job board where the owner or users can create job listings including a description that ends up being stored into a MySQL text field. What we are experiencing is this, whenever listings from certain sources are entered, they initially end up with the "Black Diamond" with a question mark inside character in place of apostrophes and double spaces. This part I know is an encoding issue and can correct. The real question is this, these black diamonds show when the record is displayed in a MySQL admin tool and when the job listing is viewed in a web browser (simple select statement displays the listing in a PHP app), but after the first time it is viewed, then the problem somehow fixes itself. It is like the running the select then displaying the record updates the job description field and fixes the encoding issues. How could this be? Has anyone ever heard of this or anything similar? I cannot understand how a database field would change without running an update statement...
Answer: How are the job listings entered? Are they entered via a web page? If so, what character encoding does the web page use? (This should determine the character encoding of the submitted data AFAIK.) What character set is the connection used to communicate with MySQL? What is the character set of the column the data is stored in? Finally, what is the character encoding of the web page(s) on which the entered data is reviewed?
Here is what I do: I declare all of my pages as UTF-8 encoded, using the following tag at the start of the  section:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

I issue the following command immediately when I connect to MySQL, so as to make sure that MySQL understands the data I send to it will be UTF-8 encoded:
SET NAMES uft8

(Depending on the database abstraction method you use, a special function might be recommended in order to set the connection character set, like mysqli's mysqli_set_charset().)
I also make sure that those columns in which I intend to store UTF-8 data are declared to be UTF-8. You can find out what the character set of a column is by issuing SHOW CREATE TABLE table_name. The character set of the table (which by default is the character set for any column in the table) is displayed at the end. If the character set for the column is different to the default character set for the table then it is displayed as part of the column definition. If you wish to change the character set of a column then you can do so using ALTER TABLE.
If you have not previously taken the steps to handle character sets in your app then you may find that the tables are all using the latin1 character set. If you naively store UTF-8-encoded data (for example) into these columns, you may run into character encoding issues. Changing the column character set using ALTER TABLE does not necessarily fix your old data, because MySQL reads your old data assuming it to be valid latin1-encoded text and converts it to the eqivalent UTF-8 (correctly converting what it has read, but not giving the result you want).
The above steps would hopefully mean that future data will be correctly encoded and correctly displayed, but you may have data already mis-encoded in your database, so be aware that if you follow the above steps and still see older data displaying incorrectly, this may be why. Good luck.
Answer: Run into this problem a few years ago... I remember finding those notorious characters, and replacing them in php with a single quote or a double quote... Ofcourse with escaping... A simple preg_replace for those characters will do the trick... Its just an encoding issue...
Answer: This page, though geared for wordpress might help
http://codex.wordpress.org/Converting_Database_Character_Sets
Answer: I had the same issue (mysql encoding and webpage encoding set to UTF-8 but black diamonds showing up in my query results. I found this snippet while googling but cannot for the life of me find its source to give proper attribution:
if( function_exists('mysql_set_charset') ){
  mysql_set_charset('utf8', $db_connection);
}else{
  mysql_query("SET NAMES 'utf8'", $db_connection);
}

Anyway, it cleared up the issue for me.


Tiny leaves 1-2mm not growing in hibiscus

Question: Sir
I buy some hibiscus plants from nearest nursery which are in different colours.when I repot them 2-3 plants are dying.I gave them root organic product mixture with water which can generate root growth.After 7-8 days tiny leaves are seen about 1-2 mm long, but they are not growing.how to fix the problem..and grow leaves..
Comment: What are the ingredients in the root organic product?
Comment: Miracle grow is the fertilizer.but tiny leaves are not growing
Comment: Can you post a photo please
Answer: Small leaves not growing larger indicate the plant is stressed. Other signs to look for are pale green leaves and spider mites or other infestation.
I have had my hibiscus since 1985. It was originally "air layered" from another plant.
Plants from nursery companies are notorious for being "forced." They do things like ramping fertilizer, playing with the lighting conditions, etc. It's the plant equivalent of a "puppy mill." They get you a plant that looks good in the store, but has a good chance of just dropping dead on you in a few weeks.
They need particular care when you get them home. First you want to give them a period of acclimation. You want to do as little as possible for the first period to avoid giving them any shock. You water them and give them light and see if they grow. If they do, then you can move on to things like re-potting them and such. Don't add any fertilizer or do any re-potting until they are growing.
By the way, hibiscus can be sensitive to things that might not be obvious. For example, keep them well away from forced-air heating vents and AC vents. These will stress the plant and cause a number of problems. Room temperature water for watering. If you can catch rain water to water them with, that's better. If you are hooked up to city water that has lots of anti-bacteria chemicals, try letting the water sit in an open container for 24 hours before using it to water. It lets the chemicals mostly de-gas out of the water.  Water the plant such that some water just seeps out the bottom of the pot, and discard this overflow. Don't put it back in the pot.
Water the plant well, then let it dry out a little. Usually that means water every two or three days. There are different varieties and some will want more or less water. Keep your eye on the leaves. If you see them wilting you have waited too long between watering. If the plant is getting lots of sun then it will want more water. If it is in a cool less well lit place you might need to have more time between watering.
For potting soil, you want something with a lot of mild organic material. That usually means the typical "houseplant" potting soil that has been well composted.
If the plant is showing signs of stress, you might try just getting a slightly larger pot. Try not to disturb the roots and just plop it in the new pot with new soil all the way around the existing root ball.
For fertilizer, you want to start very slow. If the instructions on the fertilizer say use so much, then start with a much smaller quantity. If it says one spoon per liter, for example, start with one spoon for ten liters. See if the plant responds. The thing about fertilizer is, if you get too much in there it is hard to get it back out.


Apex: if condition for if email has bounced or unconfirmed address

Question: Is there something against a Lead I can query to see if email sent from Salesforce has bounced or if the email address needs confirming? Can't find anything in the docs. Thanks!
Answer: Lead has two fields EmailBouncedDate and EmailBouncedReason. You can leverage these two fields to identify email is bounce or not. If bounce what was the reason.
Link to doc: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_lead.htm
Answer: If you have activated the Bounce Management feature to track email delivery to your Contacts, Leads, or Person Accounts, you can use the Bounced Contacts and Bounced Leads standard reports to view a list of email addresses that have bounced email.
Link : Salesforce Help
The fields which would be helpful are isEmailBounced, EmailBouncedReason, EmailBouncedDate


reload event file in Crusader Kings2

Question: While working on event files, I have to restart the game every time I make a change so that the game loads the updated file. Is there a console command to do this without restarting the game?
Answer: No, there isn't.
The game loads its events on start up once. It doesn't read them on run-time from the disk every time.
From CK2 official page:

When launching the game the following steps occur:

Initialising Map Logic
Loading Databases
Generating Coat of Arms
Loading Events
Loading Sounds(Loading of vanilla history files occurs here (even if is replace_path), though it'll still show as "Loading Sounds") - very
  slow step !
Processing Flags - generates the flag sprites in gfx\flags from the individual .tga files
Loading Flags
Loading Graphics
Creating Provinces
Loading Map(Creating Terrain)
Loading Map(Creating Borders)
Loading Map(Creating Trees)
Loading Map(Creating Textures)

So once the events have been loaded, Game won't read the file again even if you modify it. It will keep running the cached version which will be the one before your modifications.
The only way to load the updated files into the game is to restart it and thereby reloading all the files.

reload event file in Crusader Kings2


How can I programatically identify video frames containing a fixed rectangular area of a certain color?

Question: I have video material containing frames with a rectangular area of uniform color interspersed with other content.  I would like to identify these frames, with the intent of removing them. The technique discussed here  looks promising, as does the ffmpeg blackdetect filter on its own.  However, I need to be able to specify the color of the rectangle for each video.  It is not always black.
Answer: Identify a logo should be part of the CV. My suggestion is to use the idea of checking the logo from png (https://ai-facets.org/robust-logo-detection-with-opencv/) and modify the code to read a frame from a video (https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_gui/py_video_display/py_video_display.html)
Hope this help


Will Allah forgive this sin of mine?

Question: There are a lots of husband who makes their wife pregnant but during pregnancy they don't even look at their wife. They don't take care of their wives. I just asked Allah to make those women divorce their husband. It's been a year i asked this wish. But now i feel guilty for wishing someone's divorce. Will Allah ever forgive me?
Comment: Say, "O My servants who have transgressed against themselves [by sinning], do not despair of the mercy of Allah. Indeed, Allah forgives all sins. Indeed, it is He who is the Forgiving, the Merciful."(39:53)
Answer: It is a critical issue of the Muslim society that they don't realize the meaning of Nikah and the rights of husbands and wives.
The husband should take care of his wife, either the wife is pregnant or not.
Now coming to your question about forgiving the sin, if a Momin commits any sin and then regret himself about his sin, then he should make Taubah and promise to Allah that he will not repeat the mistake in the future. In Sha Allah.
Comment: I am an unmarried woman. I am afraid that i will go though a divorce. I am getting restless because of this. I didn't have any evil intention behind it. I just though those women deserves better man who will take care of them in their difficulty rather than neglecting them. Specially in their pregnancy.

Will Allah forgive this sin of mine?


Comfortable with or comfortable in?

Question: I've always wanted to know if we are "comfortable in English" or "comfortable with English". I have searched quite a few websites but none are helpful when it comes to suggesting a preposition for speaking in a language.
Comment: A quick check with Ngram suggests that both prepositions are commonly used. https://books.google.com/ngrams/graph?content=comfortable+with+English%2Ccomfortable+in+English&year_start=1950&year_end=2008&corpus=15&smoothing=3&share=&direct_url=t1%3B%2Ccomfortable%20with%20English%3B%2Cc0%3B.t1%3B%2Ccomfortable%20in%20English%3B%2Cc0 - https://books.google.com/ngrams/graph?content=comfortable+with+German%2Ccomfortable+in+German&year_start=1950&year_end=2008&corpus=15&smoothing=3&share=&direct_url=t1%3B%2Ccomfortable%20with%20German%3B%2Cc0%3B.t1%3B%2Ccomfortable%20in%20German%3B%2Cc0
Comment: *I'm comfortable **in** this chair* is a "literal" utterance meaning that I find sitting in this chair *physically* comfortable (because it eases my backache, for example). *I'm comfortable **with** this chair* is a more "metaphoric" alternative, usually implying that I'm content to continue using this chair. That second version often occurs when turning down an alternative offering, and needn't imply anything about physical comfort at all. For example, judge rejecting an appeal *I've considered your case carefully, but I'm comfortable with my original verdict* *(= **I have no qualms**)*.
Answer: Lingohelp gives a corpus-based overview of the idiomaticity of 'comfortable with' and 'comfortable in'. One of the examples is spot-on:

So, I am more comfortable with Hindi than I am with Tamil.

However, a lot of the 'comfortable in' examples seem to involve locative prepositional phrases such as 'I felt comfortable in their house', which skew the overall picture. Raw data doesn't really reflect the actual frequency of occurrence of the colligation 'comfortable in'. That said, the popular choice is 'comfortable with', and it would be my choice here (for the bald statement, with no context).
I'd possibly choose 'I'm comfortable in English ...' if someone asked 'Would you prefer to continue this conversation in German?', so I don't think either choice is unacceptable per se.

Comfortable with or comfortable in?


WordPress Comments are automatically publishing

Question: I want to manually approve comments when someone will comment on any of the post.
Right now when someone comment on any of the post these are automatically approved and published.
I have changed settings in Discussion for comments but still these are automatically approved may be because the author of comment is admin.
But i want to manually approve comments for all users whether admin or subscriber.
Is there any way to do this.
I will appreciate your guidance. Thank you!
Answer: An administrator is normal the highest level of user in Wordpress. If you want to approve every comments, even administrator comments, maybe you can use the moderation filter.
If you go to Settings > Discussion Settings > Comment Moderation. You could setup an "cache all" filter. If you put all letters of the alphabet and the numbers 0 to 9 in as an filter, every comment should be send to the "moderation queue" for your approval.
Comment: Thanks for your answer. It is a good idea but for my website this is not working. I have test this on other websites and it was working.


Create a list of webform submissions sorted and searchable by data in user submitted form fields

Question: I am using Webform 6.x on Drupal 8.
I would like to create a list of submissions that are sorted and searchable by the user entered data within the submissions. I am able to generate a list of of the submissions but I'm unable to compare, sort, or view the field data within the form submissions.
Answer: You can accomplish this with views.

Create a view set to show 'Webform Submissions'
Under advanced click 'Add' next to relationships.
Select the form you want the submissions for in 'Webform Node'
Select the field you want to sort/search by in 'Component Data'
Select 'Relate using node and Component ID'
Add as many relationships as you want if you want to sort/search by
more fields.
Add Webform Submission Data:Value in the fields section and select
the webform node and the component data.
Add Webform submission data: Data field in Filter Criteria. Select
the relationship of the field you want to sort/search by and expose
the filter if you want to allow it to be searchable.

I was looking at a Drupal 7 instance when preparing this answer so the naming might be slightly different but it should work the same in 8.
Comment: Thank you, Matt, I'll try that and let you know!
Comment: Dear Matt, when creating a view showing Webform submissions in Drupal 8, There is no "Webform Node" in Relationship, there is no "Component Data', so nothing to relate. Am I missing a component/library/module?


My whatsapp icon is missing

Question: My WhatsApp icon has recently disappeared from my phone completely. It's neither on the home screen, nor the main menu. When I go to the Google Play store, it shows that it's part of my installed applications. I uninstalled and re-installed the app, but it still doesn't show the main icon, so I'm unable to even open it... Even though it says it's installed on my Samsung Galaxy S2.
Comment: if the app is shown as installed..there will be a Open button in google play to open the app..have u tried that..or if you use any app hiding laucher or any third party apps release the whatsapp and unhide it..
Comment: Samsung will put WhatsApp icon in the "Social" folder. Check also there.
Answer: Things I would try:
a) Just reset the phone if you haven't done already(turn it off and on
b) Uninstall the app, remove the sd, and install it again. There might be a problem with your SD card, and if the app is automatically installed there, maybe that's the reason you can't see it
Which launcher are you using? I believe you can see the app in the settings -> applications list?
Answer: Go to settings --> apps-->on the top right corner, click on three dots and choose protected apps. Now you should see all installed apps and only the one's which are installed and missing will have a tick mark next to it. Uncheck and reboot. You should see the missing apps icon .
Answer: Perhaps its just hidden. Click menu 》unhide
Comment: If it's been uninstalled and reinstalled it isn't hidden
Answer: By removing and installing again the battery I solved the problem. The icon reappeared immediately after doing so.

My whatsapp icon is missing


Is it possible to restore a deleted node?

Question: While revisions are kept and it is easy to get back to a previous revision of a node, I was wondering if it is possible to restore a node that has really been deleted by a user?
Answer: If you have a database backup (which you should ;) you can restore an old copy of the site and retrieve it that way.
Drupal does give users quite a clear warning that deleting a node is final, and there is a confirmation dialog.
Comment: Turns out soft-deleting things is a hard problem to solve AND is not GDPR compliant.  https://www.drupal.org/i/2725447
Comment: Why does drupal handle it this way?  Why not implement a "trash can" so it is a two step process to delete something permanently.  This is how Wordpress handles it.  Once that trash can is empty, you can't get it back.
Answer: What Chris says. The code reads
    db_query('DELETE FROM {node} WHERE nid = %d', $node->nid);
    db_query('DELETE FROM {node_revisions} WHERE nid = %d', $node->nid);

...so deleted really means deleted.
To prevent accidents like this, you may want to restrict user permissions so users cannot delete, but only unpublish nodes. Unpublished nodes will not show up on your site (assuming that your site is built correctly) but they remain available in the database.
Comment: Extra tip: for a dedicated tab and more control over who can unpublish what, check out the Publish Content module: http://drupal.org/project/publishcontent
Answer: Yes there are several solutions for this.

The first one is using full backups which has already been mentioned by Chris here. this is the most difficult one specially if the node contains complex fields.
Using https://drupal.org/project/recover module, which monitors
Using https://drupal.org/project/entity_soft_delete module. It created sort of a recycle/trashbin for nodes/entities so when a particular node gets deleted, it won't be removed from the database only its status changes to deleted. So the admin can still see or even use it and if required change its status back to normal or delete it permanently
Answer: Here is a suggestion building on what Chris said that reverse engineers @marcvangend's answer.
I like to use phpMyAdmin, but you can do this same process with the command line if you like that better.
Like the other answers, this assumes you have a backup of your database.  No excuse not to with awesome modules like Backup & Migrate out there.

Create a new empty MySQL database called "restore" or "testing" or something similar
Create a new manual backup so you can revert to this moment, not last night's backup if you need to
Import your backup into the new "restore" database
Go to the node table, search for your deleted node. Hopefully you know the nid, but if you don't figure it out now.
Select the one row that was deleted and export via phpMyAdmin. There should be just one row.
Now go to the node_revisions table.  Search on the nid of your deleted node and export.  There should be at least one row, but could be more. Export everything with your nid.
Go back to your live site's database in phpMyadmin
Import the two files you just exported from the backup
Check your work on the live site

Using this method will allow you to restore the single node from the backup without loosing any changes to the database since the last backup.  If you're not concerned about that and you don't think anything but the deletion has happened since the last backup, it would be easier to just do a full restore of the last backup that to undergo the process above.
Comment: What if I go to the `node` table and do not see the deleted nid there? Does this mean things look grim? The site is Drupal 8, by the way.
Answer: I am.late , but answer is use entity backup module
https://www.drupal.org/project/entity_backup