Na čem pracují vývojáři webového prohlížeče Ladybird (GitHub)? Byl publikován přehled vývoje za květen (YouTube).
Úřad pro ochranu osobních údajů řeší desítky stížností na jednotné měsíční hlášení zaměstnavatele, které stát spustil počátkem dubna. Systém, jenž má firmám odlehčit od desítek formulářů, nejenže výrazně zatížil jejich účetní oddělení, ale docházelo v něm i k únikům osobních dat zaměstnanců k firmám, kde nepracovali. Podle ministerstva práce a sociálních věcí stála za problémem technická chyba. „Incident se týkal několika stovek
… více »Byla vydána (𝕏, Bluesky) nová verze 22.0.0 open source webového aplikačního frameworku Angular (Wikipedie). Přehled novinek v příspěvku na blogu.
Vim Classic byl vydán ve verzi 8.3. Drew DeVault oznámil tento fork editoru Vim (verze 8.2.0148, tj. těsně před zavedením Vim9 skriptování) v březnu letošního roku. Důvodem forku bylo, že vývojáři editorů Vim a Neovim začali při vývoji využívat LLM.
Open source konference DevConf.CZ 2026 proběhne 18. a 19. června v Brně na FIT VUT. Publikován byl program a spuštěna byla registrace.
Společnost JetBrains uvolnila verzi 2 svého open-source velkého jazykového modelu (LLM) pro vývojáře Mellum.
Probíhá konference Microsoft Build 2026. Microsoft představuje své novinky: kvantový čip Majorana 2, Surface Laptop Ultra a Surface RTX Spark Dev Box s NVIDIA RTX Spark, Intelligent Terminal, Coreutils for Windows (fork Rust Coreutils), AI modely MAI, AI agenta Scout, platformu pro agent-first zařízení Project Solara, …
Google Chrome 149 byl prohlášen za stabilní. Nejnovější stabilní verze 149.0.7827.53 přináší řadu novinek. Podrobný přehled v poznámkách k vydání. Vylepšeny byly také nástroje pro vývojáře.
Pluto.jl, reaktivní notebook pro programovací jazyk Julia, dospěl do verze 1.0.
Byla vydána nová verze 12.0.0 vizuálního programovacího jazyka Snap! (Wikipedie) inspirovaného jazykem Scratch (Wikipedie). Přehled novinek na GitHubu.
#define EVENT_SIZE ( sizeof (struct inotify_event) )
#define BUF_LEN ( 1024 * ( EVENT_SIZE + 16 ) )
int main(int argc, char **argv)
{
int length, i = 0;
int fd;
int wd;
char buffer[BUF_LEN];
fd = inotify_init();
if (fd < 0) {
perror("inotify_init");
}
wd = inotify_add_watch(fd, "/home/tomesh/Dropbox/C/sync", IN_ALL_EVENTS);
if (length < 0) {
perror("read");
}
while (1) {
length = read(fd, buffer, BUF_LEN);
struct inotify_event *event = (struct inotify_event *) &buffer[ i ];
if (event->len) {
if (event->mask & IN_CREATE) {
if (event->mask & IN_ISDIR) {
printf("The directory %s was created.\n", event->name);
} else {
printf("The file %s was created.\n", event->name);
}
}
if (event->mask & IN_DELETE) {
if (event->mask & IN_ISDIR) {
printf("The directory %s was deleted.\n", event->name);
} else {
printf("The file %s was deleted.\n", event->name);
}
}
if (event->mask & IN_MODIFY) {
if (event->mask & IN_ISDIR) {
printf("The directory %s was modified.\n", event->name);
} else {
printf("The file %s was modified.\n", event->name);
}
}
if (event->mask & IN_MOVED_FROM) {
if (event->mask & IN_ISDIR) {
printf("The directory %s with cookie %d was moved from.\n", event->name, event->cookie);
} else {
printf("The file %s with cookie %d was moved from.\n", event->name, event->cookie);
}
}
if (event->mask & IN_MOVED_TO) {
if (event->mask & IN_ISDIR) {
printf("The directory %s with cookie %d was moved to.\n", event->name, event->cookie);
} else {
printf("The file %s with cookie %d was moved to.\n", event->name, event->cookie);
}
}
if (event->mask & IN_MOVE_SELF) {
if (event->mask & IN_ISDIR) {
printf("The directory %s with cookie %ds was itself moved.\n", event->name, event->cookie);
} else {
printf("The file %s with cookie %d was itself moved.\n", event->name, event->cookie);
}
}
if (event->mask & IN_DELETE_SELF) {
if (event->mask & IN_ISDIR) {
printf("The directory %s with cookie %d was itself deleted.\n", event->name, event->cookie);
} else {
printf("The file %s with cookie %d was itself deleted.\n", event->name, event->cookie);
}
}
if (event->mask & IN_OPEN) {
if (event->mask & IN_ISDIR) {
printf("The directory %s with cookie %d was opened.\n", event->name, event->cookie);
} else {
printf("The file %s with cookie %d was opened.\n", event->name, event->cookie);
}
}
if (event->mask & IN_ATTRIB) {
if (event->mask & IN_ISDIR) {
printf("The directory %s with cookie %d attr was changed.\n", event->name, event->cookie);
} else {
printf("The file %s with cookie %d attr was changed.\n", event->name, event->cookie);
}
}
if (event->mask & IN_ACCESS) {
if (event->mask & IN_ISDIR) {
printf("The directory %s with cookie %d was accessed.\n", event->name, event->cookie);
} else {
printf("The file %s with cookie %d was accessed.\n", event->name, event->cookie);
}
}
}
}
(void) inotify_rm_watch(fd, wd[0]);
(void) close(fd);
exit(0);
}
Řešení dotazu:
i += EVENT_SIZE + event->len;
#define EVENT_SIZE ( sizeof (struct inotify_event) )
#define BUF_LEN ( 1024 * ( EVENT_SIZE + 16 ) )
int main(int argc, char **argv)
{
int length, i;
int fd;
int wd;
char buffer[BUF_LEN];
struct inotify_event *event;
fd = inotify_init();
if (fd < 0)
perror("inotify_init");
wd = inotify_add_watch(fd, "/home/tomesh/Dropbox/C/sync", IN_ALL_EVENTS);
while (1) {
i = 0;
length = read(fd, buffer, BUF_LEN);
if (length < 0)
perror("read");
if (length == 0)
sleep(1);
while (i < length) {
event = (struct inotify_event *) &buffer[i];
if (event->mask & IN_CREATE) {
if (event->mask & IN_ISDIR) {
printf("The directory %s was created.\n", event->name);
} else {
printf("The file %s was created.\n", event->name);
}
}
if (event->mask & IN_DELETE) {
if (event->mask & IN_ISDIR) {
printf("The directory %s was deleted.\n", event->name);
} else {
printf("The file %s was deleted.\n", event->name);
}
}
if (event->mask & IN_MODIFY) {
if (event->mask & IN_ISDIR) {
printf("The directory %s was modified.\n", event->name);
} else {
printf("The file %s was modified.\n", event->name);
}
}
if (event->mask & IN_MOVED_FROM) {
if (event->mask & IN_ISDIR) {
printf("The directory %s with cookie %d was moved from.\n", event->name, event->cookie);
} else {
printf("The file %s with cookie %d was moved from.\n", event->name, event->cookie);
}
}
if (event->mask & IN_MOVED_TO) {
if (event->mask & IN_ISDIR) {
printf("The directory %s with cookie %d was moved to.\n", event->name, event->cookie);
} else {
printf("The file %s with cookie %d was moved to.\n", event->name, event->cookie);
}
}
if (event->mask & IN_MOVE_SELF) {
if (event->mask & IN_ISDIR) {
printf("The directory %s with cookie %ds was itself moved.\n", event->name, event->cookie);
} else {
printf("The file %s with cookie %d was itself moved.\n", event->name, event->cookie);
}
}
if (event->mask & IN_DELETE_SELF) {
if (event->mask & IN_ISDIR) {
printf("The directory %s with cookie %d was itself deleted.\n", event->name, event->cookie);
} else {
printf("The file %s with cookie %d was itself deleted.\n", event->name, event->cookie);
}
}
if (event->mask & IN_ATTRIB) {
if (event->mask & IN_ISDIR) {
printf("The directory %s with cookie %d attr was changed.\n", event->name, event->cookie);
} else {
printf("The file %s with cookie %d attr was changed.\n", event->name, event->cookie);
}
}
if (event->mask & IN_ACCESS) {
if (event->mask & IN_ISDIR) {
printf("The directory %s with cookie %d was accessed.\n", event->name, event->cookie);
} else {
printf("The file %s with cookie %d was accessed.\n", event->name, event->cookie);
}
}
i += sizeof(struct inotify_event) +event->len;
}
}
(void) inotify_rm_watch(fd, wd);
(void) close(fd);
exit(0);
}
Tiskni
Sdílej: