Byla vydána verze 11.0.0 vizuálního programovacího jazyka Snap! (Wikipedie) inspirovaného jazykem Scratch (Wikipedie). Přehled novinek na GitHubu.
Na čem aktuálně pracují vývojáři GNOME a KDE Plasma? Pravidelný přehled novinek v Týden v GNOME a Týden v KDE Plasma. Vypíchnout lze, že v Plasmě byl implementován 22letý požadavek. Historie schránky nově umožňuje ohvězdičkovat vybrané položky a mít k ním trvalý a snadný přístup.
Wayfire, kompozitní správce oken běžící nad Waylandem a využívající wlroots, byl vydán ve verzi 0.10.0. Zdrojové kódy jsou k dispozici na GitHubu. Videoukázky na YouTube.
Před necelými čtyřmi měsíci byl Steven Deobald jmenován novým výkonným ředitelem GNOME Foundation. Včera skončil, protože "nebyl pro tuto roli v tento čas ten pravý".
Nové číslo časopisu Raspberry Pi zdarma ke čtení: Raspberry Pi Official Magazine 156 (pdf).
Armbian, tj. linuxová distribuce založená na Debianu a Ubuntu optimalizovaná pro jednodeskové počítače na platformě ARM a RISC-V, ke stažení ale také pro Intel a AMD, byl vydán ve verzi 25.8.1. Přehled novinek v Changelogu.
Včera večer měl na YouTube premiéru dokumentární film Python: The Documentary | An origin story.
Společnost comma.ai po třech letech od vydání verze 0.9 vydala novou verzi 0.10 open source pokročilého asistenčního systému pro řidiče openpilot (Wikipedie). Zdrojové kódy jsou k dispozici na GitHubu.
Ubuntu nově pro testování nových verzí vydává měsíční snapshoty. Dnes vyšel 4. snapshot Ubuntu 25.10 (Questing Quokka).
Řada vestavěných počítačových desek a vývojových platforem NVIDIA Jetson se rozrostla o NVIDIA Jetson Thor. Ve srovnání se svým předchůdcem NVIDIA Jetson Orin nabízí 7,5krát vyšší výpočetní výkon umělé inteligence a 3,5krát vyšší energetickou účinnost. Softwarový stack NVIDIA JetPack 7 je založen na Ubuntu 24.04 LTS.
$posts= preg_split('/From (.+) na (.+) (Mon|Tue|Wed|Thu|Fri|Sat|Sun) (.{3}) (.{2}) (\d{2}):(\d{2}):(\d{2}) (\d{4})/', implode(file('test.txt')), -1, PREG_SPLIT_NO_EMPTY); while(list($key,$value)= each($posts)){ $post_split= preg_split('/Message-ID: (.+)/',$value); $head= $post_split[0]; $message_text= $post_split[1]; preg_match('/From: (.+) na (.+) \((.+)\)/',$head,$from); preg_match('/Subject: (.+)/',$head,$message_subject); $post= $from[0]."\n".$message_subject[0]."\n\n".trim($message_text)."\n"; echo "$key\n<br>".nl2br(htmlspecialchars($post))."<br>\n<hr>\n"; }
Potrebuju nacist soubor a ten pak naparsovat na castiNic vic, nic min to nedela. Ja jsem jen potreboval ten kod vylepsit aby byl efektivnejsi
#!/usr/bin/env perl use strict; use warnings; my $msg={}; my $header=''; my $firstFrom = qr(^From (.+) na (.+) (Mon|Tue|Wed|Thu|Fri|Sat|Sun) (.{3}) (.{2}) (\d{2}):(\d{2}):(\d{2}) (\d{4})$); my $headerLine = qr(^\S+:); sub ParseHeader { my @headerLines = split m($/), $_[0]; my $ret = {}; @$ret{qw(usr site dayOfWeek month day hour min sec year)} = shift(@headerLines) =~ /$firstFrom/; foreach my $line (@headerLines) { # tady si udelej co chces se zbytkem hlavicky a nacpi do $ret } return $ret; } sub PrintMsg { my $msg = shift; return unless ref $msg eq 'HASH' and %$msg; use Data::Dumper; print Data::Dumper->Dump([$msg],['msg']); } while (<>) { chomp; ?$firstFrom?o and $header = $_ and next; if ($header) { /$headerLine/o and $header .= "$/$_" and next; if (/^\s*$/) { PrintMsg ($msg); # end of header - print msg $msg = ParseHeader($header); $header = ''; reset; next; } # falesna hlavicka $msg->{content} .= "$/" . $header; $header = ''; next; } %$msg and $msg->{content} .= "$_$/" and next; /\S/ and die 'Header not found'; }
#!/usr/bin/env perl use strict; use warnings; my $msg={}; my @header; my $firstFrom = qr(^From (.+) na (.+) (Mon|Tue|Wed|Thu|Fri|Sat|Sun) (.{3}) (.{2}) (\d{2}):(\d{2}):(\d{2}) (\d{4})$); my $headerLine = qr(^\S+:); sub ParseHeader { my $ret = {}; @$ret{qw(usr site dayOfWeek month day hour min sec year)} = shift() =~ /$firstFrom/; foreach my $line (@_) { # tady si udelej co chces se zbytkem hlavicky a nacpi do $ret } return $ret; } sub PrintMsg { my $msg = shift; return unless ref $msg eq 'HASH' and %$msg; use Data::Dumper; shift @{$msg->{content}} while $msg->{content}[0] =~ /^\s*$/; pop @{$msg->{content}} while $msg->{content}[$#{$msg->{content}}] =~ /^\s*$/; print Data::Dumper->Dump([$msg],['msg']); } while (<>) { chomp; ?$firstFrom?o and push @header, $_ and next; if (@header) { /$headerLine/o and push @header, $_ and next; if (/^\s*$/) { PrintMsg ($msg); # end of header - print msg $msg = ParseHeader(@header); @header = (); reset; next; } # falesna hlavicka push @{$msg->{content}}, @header; @header = (); next; } %$msg and push @{$msg->{content}}, $_ and next; /\S/ and die 'Header not found'; } PrintMsg($msg);
Tiskni
Sdílej: