const {data} = await octocat.request("GET /search/repositories", {
q: 'language:typescript',
sort:'stars',
order: 'desc',
per_page: 10,
page: 1 // меняем это значение для других страниц, типа 2/3/4
});
$sum += $row['quantity'];
$sum = $row['quantity'];
$products = Product::whereHas('categories', function ($query) {
$query->where('title', 'Категория 1');
})->get();
START TRANSACTION;
INSERT INTO table2 (column1, column2, column3)
SELECT column1, column2, column3
FROM table1
WHERE some_condition;
DELETE FROM table1 WHERE some_condition;
COMMIT;
import NextLink from 'next/link';
<NextLink href="http://example.com">....</NextLink>
function throwDice(msg) {
if (canThrowDice) {
let diceNumber = dice()
playerPos = playerPos + diceNumber
return msg.reply.photo(MapPic, {caption: `На кубике выпало ${diceNumber}.\nТеперь вы стоите на ${playerPos} клетке.`, replyMarkup: MainReplyKB});
} else {
return msg.reply.text("⛔️ Вы не можете бросить кубик в данный момент.");
}
}
await message.answer("Подменю Кнопки", reply_markup=inlinebuttons, disable_notification=True)
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js"></script>
<script>
jQuery(function($) {
var updateCart = _.debounce(function() {
$('[name="update_cart"]').trigger('click');
}, 1300);
$('body').on('change', '.qty', function() {
updateCart();
});
$('body').on('click', '.quantity-button.inc, .quantity-button.dec', function() {
updateCart();
});
});
</script>
const microserviceTcp = await NestFactory.createMicroservice(AppModule, {
transport: Transport.TCP,
options: {
host: "::",
port: 3010,
},
});
const microserviceKafka = await NestFactory.createMicroservice(AppModule, {
transport: Transport.KAFKA,
options: {
client: {
brokers: ["localhost:9092"],
},
consumer: {
groupId: "test-consumer",
},
},
});
await Promise.all([
microserviceTcp.listenAsync(),
microserviceKafka.listenAsync(),
]);