| name | explain-diff-html |
|---|---|
| description | Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output. |
Please make me a rich, interactive explanation of the specified code change.
It should have these sections:
| <ion-input type="tel" pattern="\d*" placeholder="(xxx) xxx-xxxx" mask="(***) ***-****" [(ngModel)]="phone" name="phone"></ion-input> | |
| <ion-input type="tel" pattern="\d*" placeholder="xxx-xx-xxxx" mask="***-**-****" [(ngModel)]="ssn" name="ssn"></ion-input> |
| # coding:utf-8 | |
| import gc | |
| import inspect | |
| import ctypes | |
| from collections import defaultdict | |
| from django.core.management.base import BaseCommand | |
| from django.db.models.signals import * |
| /*! | |
| * Copyright 2015 Google Inc. All rights reserved. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| # Copyright 2014 Dan Krause | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # coding: utf-8 | |
| """ | |
| Cauê Thenório - cauelt(at)gmail.com | |
| This snippet makes Django do not create URL languages prefix (i.e. /en/) | |
| for the default language (settings.LANGUAGE_CODE). | |
| It also provides a middleware that activates the language based only on the URL. | |
| This middleware ignores user session data, cookie and 'Accept-Language' HTTP header. |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| # | |
| # original: http://code.activestate.com/recipes/65287/ | |
| # | |
| # place in lib/python2.x/sitecustomize.py | |
| import bdb | |
| import sys | |
| def info(type, value, tb): | |
| if hasattr(sys, 'ps1') \ |