๐ข๐๐ผ๐ฑ๐ฏ๐ฒ๐ธ๐๐ฒ๐
maqola.ozodbekdev.uz/linux-bildirishnomalari
๐ง LINUX BILDIRISHNOMALAR QO'LLANMASI
๐ .sh skriptlar orqali Desktop Notifications
Nima o'rganasiz:
โ notify-send to'liq ishlatish
โ Amaliy misollar: monitoring, backup, pentesting
โ Cron va systemd avtomatlashtirish
โ DISPLAY/DBUS muammolarini hal qilish
โ Xavfsizlik va best practices
๐ฏ Kimlar uchun:
Linux adminlar | DevOps | Pentesterlar
๐ #Linux #BashScripting #Notifications
Muallif: @ozodbekdevv | claude
๐ .sh skriptlar orqali Desktop Notifications
Nima o'rganasiz:
โ notify-send to'liq ishlatish
โ Amaliy misollar: monitoring, backup, pentesting
โ Cron va systemd avtomatlashtirish
โ DISPLAY/DBUS muammolarini hal qilish
โ Xavfsizlik va best practices
๐ฏ Kimlar uchun:
Linux adminlar | DevOps | Pentesterlar
๐ #Linux #BashScripting #Notifications
Muallif: @ozodbekdevv | claude
โค8
Doim endigina buglar yo'qolib kod ishlay boshlaganda Telegram beliga tepadi
Go hamma Telegramga spam bossin. Uni ham frozen qilamiz
Go hamma Telegramga spam bossin. Uni ham frozen qilamiz
๐คฃ7๐3โค2๐1
Forwarded from Sardor Dushamov | PHP
O'qib bo'lganingizdan keyin Leonardio Dikaprioni anu giftini ko'z oldingizga keltiring: ana, ana deb barmog'ini ko'rsatadiyu)
๐ฏ7 2 2 1
DevPanel.uz da yangilik
๐ namuna
Endilikda dasturlash bilimlarisiz va 100% bepul shaxsiy vebsaytingizni quring. Bu imkoniyat devpanel.uz ning Vizitka Website boสปlimida, 7xil dizayn mavjud va xohlagancha url link kiritish mumkin
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Boburbek Qodirovichning yon daftari
Koโp loyihalarda kod ishlayapti โ demak hammasi joyida, degan xulosa qilinadi.
Aslida esa kod bugungi talabni yopayotgandir, lekin ertangi oโzgarishga tayyor emas.
Men koโrgan muammolarning 70%:
โขnotoโgโri abstraction
โขvaqtida qilinmagan refactor
โขโkeyin koโramizโ deb qoldirilgan qarorlar
Kod ishlashi yetarli emas, u qarorlarni koโtara olishi kerak.
๐ Savol: Sizda hozir ishlayotgan, lekin ichingizga sigโmayotgan kod bormi?
Aslida esa kod bugungi talabni yopayotgandir, lekin ertangi oโzgarishga tayyor emas.
Men koโrgan muammolarning 70%:
โขnotoโgโri abstraction
โขvaqtida qilinmagan refactor
โขโkeyin koโramizโ deb qoldirilgan qarorlar
Kod ishlashi yetarli emas, u qarorlarni koโtara olishi kerak.
๐ Savol: Sizda hozir ishlayotgan, lekin ichingizga sigโmayotgan kod bormi?
1๐ฅ4
Please open Telegram to view this post
VIEW IN TELEGRAM
1๐6 4
Media is too big
VIEW IN TELEGRAM
Avtomobil sotish va sotib olish uchun ideal yechim
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Ilhomjon Iskandarov
image check.zip
24.5 KB
rasm ai yoki haqiqiy ekanligini tekshiruvchi kichik dasturcha )
ishlatilish: file zip dan ochilib file ichiga kirilgan holda terminal ochilishi va terminalda quydagi kodlar yozilishi kerak.
1
2
2
ishlatilish: file zip dan ochilib file ichiga kirilgan holda terminal ochilishi va terminalda quydagi kodlar yozilishi kerak.
1
npm i --force
2
npm start
2
localhost:5000port da run bo'ladi
Please open Telegram to view this post
VIEW IN TELEGRAM
#include <stdio.h>
\#define WIDTH 80
#define HEIGHT 25
#define PADDLE_HEIGHT 3
#define WIN_SCORE 21
typedef struct {
int x, y;
} Paddle;
typedef struct {
int x, y;
int dx, dy;
} Ball;
typedef struct {
int score1, score2;
Paddle p1, p2;
Ball ball;
} GameState;
void init_game(GameState *game);
void draw_board(const GameState *game);
void player_input(GameState *game);
void update_ball(GameState *game);
int check_winner(const GameState *game);
void draw_winner(int player);
int main(void) {
GameState game;
init_game(&game);
while (!check_winner(&game)) {
draw_board(&game);
player_input(&game);
update_ball(&game);
}
draw_winner(check_winner(&game));
return 0;
}
void init_game(GameState *game) {
game->score1 = 0;
game->score2 = 0;
game->p1.x = 1;
game->p2.x = WIDTH - 2;
game->p1.y = (HEIGHT - PADDLE_HEIGHT) / 2;
game->p2.y = (HEIGHT - PADDLE_HEIGHT) / 2;
game->ball.x = WIDTH / 2;
game->ball.y = HEIGHT / 2;
game->ball.dx = 1;
game->ball.dy = 1;
}
void draw_board(const GameState *game) {
// ANSI clear screen (allowed, not a system call)
printf("\033[2J\033[H");
printf("Player 1: %d", game->score1);
printf("%*s", WIDTH - 20, "");
printf("Player 2: %d\n", game->score2);
for (int y = 0; y < HEIGHT; y++) {
for (int x = 0; x < WIDTH; x++) {
if (y == 0 || y == HEIGHT - 1) {
putchar('#');
} else if (x == game->p1.x && y >= game->p1.y && y < game->p1.y + PADDLE_HEIGHT) {
putchar('|');
} else if (x == game->p2.x && y >= game->p2.y && y < game->p2.y + PADDLE_HEIGHT) {
putchar('|');
} else if (x == game->ball.x && y == game->ball.y) {
putchar('O');
} else {
putchar(' ');
}
}
putchar('\n');
}
}
void player_input(GameState *game) {
char c;
do {
c = getchar();
} while (c == '\n');
const int MIN_Y = 1;
const int MAX_Y = HEIGHT - 2 - PADDLE_HEIGHT;
if (c == ' ') return;
if ((c == 'a' || c == 'A') && game->p1.y > MIN_Y)
game->p1.y--;
else if ((c == 'z' || c == 'Z') && game->p1.y < MAX_Y)
game->p1.y++;
else if ((c == 'k' || c == 'K') && game->p2.y > MIN_Y)
game->p2.y--;
else if ((c == 'm' || c == 'M') && game->p2.y < MAX_Y)
game->p2.y++;
}
void update_ball(GameState *game) {
game->ball.x += game->ball.dx;
game->ball.y += game->ball.dy;
if (game->ball.y <= 1 || game->ball.y >= HEIGHT - 2) {
game->ball.dy = -game->ball.dy;
}
if (game->ball.dx < 0 && game->ball.x == game->p1.x + 1 && game->ball.y >= game->p1.y &&
game->ball.y < game->p1.y + PADDLE_HEIGHT) {
game->ball.dx = -game->ball.dx;
}
if (game->ball.dx > 0 && game->ball.x == game->p2.x - 1 && game->ball.y >= game->p2.y &&
game->ball.y < game->p2.y + PADDLE_HEIGHT) {
game->ball.dx = -game->ball.dx;
}
if (game->ball.x <= 0) {
game->score2++;
} else if (game->ball.x >= WIDTH - 1) {
game->score1++;
} else {
return;
}
game->ball.x = WIDTH / 2;
game->ball.y = HEIGHT / 2;
game->ball.dx = (game->ball.dx > 0) ? -1 : 1;
game->ball.dy = 1;
}
int check_winner(const GameState *game) {
if (game->score1 >= WIN_SCORE) return 1;
if (game->score2 >= WIN_SCORE) return 2;
return 0;
}
void draw_winner(int player) {
printf("\033[2J\033[H\n");
printf("Player %d wins!\n", player);
}