docker compose cp
docker-compose exec [service] mysqldump -u [user name] –p [password] [options] [database_name] [tablename] > [dumpfilename.sql]
docker exec -t [hash container] mysqldump -u [user name] –p [password] [options] [database_name] [tablename] > [dumpfilename.sql]
SET foreign_key_checks = 0
SET foreign_key_checks = 1
const regex = /(https?):\/\/([0-9a-z.\-\/]+)/g;
// Alternative syntax using RegExp constructor
// const regex = new RegExp('(https?):\\/\\/([0-9a-z.\\-\\/]+)', 'g')
const str = `<div class="filefield-file"><img class="filefield-icon field-icon-application-vnd-ms-excel" alt="application/vnd.ms-excel icon" src="http://uristhome.ru/sites/all/modules/filefield/icons/x-office-spreadsheet.png"><a href="https://uristhome.ru/sites/default/files/doc/ks-6a.xls" type="application/vnd.ms-excel; length=51712" title="ks-6a.xls">Типовой бланк и форма КС-6а</a></div>
`;
let m;
while ((m = regex.exec(str)) !== null) {
// This is necessary to avoid infinite loops with zero-width matches
if (m.index === regex.lastIndex) {
regex.lastIndex++;
}
// The result can be accessed through the `m`-variable.
m.forEach((match, groupIndex) => {
console.log(`Found match, group ${groupIndex}: ${match}`);
});
}
var xhr = new XMLHttpRequest();
xhr.open('GET', '/server', true);
xhr.timeout = 2000; // time in milliseconds
xhr.onload = function () {
// Запрос завершён. Здесь можно выполнить обработку.
};
xhr.ontimeout = function (e) {
// Таймаут. Здесь можно выполнить что-нибудь..
};
xhr.send(null);
ini_set("memory_limit", "-1");
$project = $projectRepository->find($project_id);
if (!$project instanceof Project) {
throw new NotFoundException("Project not found", "project_not_found");
}
// Здесь совершенно точно буддет объект.
There are many nitty gritty details when working with PHPs DateTime instances. You have to know their inner workings pretty well not to make mistakes with date handling. This cookbook entry holds several interesting pieces of information on how to work with PHP DateTime instances in ORM.
...
1. Always convert any DateTime instance to UTC.
2. Only set Timezones for displaying purposes
3. Save the Timezone in the Entity for persistence.
...
Может ли бот реагировать на сообщения в чате?
can_delete_messages
в супергруппе или канале, он может удалить там любое сообщение./**
* @return Organization|null
*/
public function getOrganization(): ?Organization
{
return $this->organization;
}