This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <title>HTML5 Blank Template</title> | |
| <link href="style.css" rel="stylesheet" /> | |
| </head> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <title>HTML5 Blank Template</title> | |
| <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> | |
| <link href="style.css" rel="stylesheet" /> | |
| </head> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Поиск дубликатов | |
| # Подсчет дублей | |
| SELECT `col1`, COUNT(`col1`) AS `count` FROM `table` GROUP BY `col1` HAVING `count` > 1; | |
| # Подсчет дубликатов по нескольким полям | |
| SELECT `col1`, `col2`, COUNT(*) AS `count` FROM `table` GROUP BY `col1`,`col2` HAVING `count` > 1; | |
| # Все записи с одинаковыми значениями | |
| # Запрос найдет все записи с одинаковыми значениями в `col1` | |
| SELECT * FROM `table` WHERE `col1` IN (SELECT `col1` FROM `table` GROUP BY `col1` HAVING COUNT(*) > 1) ORDER BY `col1`; | |
| # Для одинаковых значений в `col1` и `col2` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <a href="document.html" rel="ext">в новое окно</a><br /> | |
| <script> | |
| function externalLinks() { | |
| if (!document.getElementsByTagName) return; | |
| var anchors = document.getElementsByTagName("a"); | |
| for (var i=0; i < anchors.length; i++) { | |
| if (anchors[i].getAttribute("href") && anchors[i].getAttribute("rel") == "ext") { | |
| anchors[i].target = "_blank"; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ini_set('display_errors', 'On'); // сообщения с ошибками будут показываться | |
| error_reporting(E_ALL); // E_ALL - отображаем ВСЕ ошибки |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Информация о IP | |
| /* | |
| Получить информацию об IP-адресе можно с помощью сервиса WHOIS REST API, отправив запрос на http://rest.db.ripe.net/search?query-string=xxx.xxx.xxx.xxx | |
| Ответ будет в формате XML. | |
| */ | |
| $ip = '213.180.193.1'; | |
| $xml = simplexml_load_string(file_get_contents('http://rest.db.ripe.net/search?query-string=' . $ip)); | |
| $array = json_decode(json_encode($xml), TRUE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Временные таблицы в MySQL | |
| -- Создание пустой таблицы: | |
| CREATE TEMPORARY TABLE `tmp_table` ( | |
| `id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
| `name` varchar(255) NOT NULL, | |
| `price` decimal(11,2) unsigned NOT NULL DEFAULT '0.00', | |
| `sef` varchar(255) NOT NULL, | |
| `text` text NOT NULL, | |
| `approve` tinyint(1) NOT NULL DEFAULT '1', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Сom_create_guid() | |
| function gen_token() | |
| { | |
| if (function_exists('com_create_guid') === true) { | |
| return trim(com_create_guid(), '{}'); | |
| } | |
| return sprintf( | |
| '%04X%04X-%04X-%04X-%04X-%04X%04X%04X', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Абаза | |
| Абакан | |
| Абдулино | |
| Абинск | |
| Агидель | |
| Агрыз | |
| Адыгейск | |
| Азнакаево | |
| Азов | |
| Ак-Довурак |
NewerOlder