Google zveřejnil seznam 1220 projektů od 195 organizací (Debian, GNU, openSUSE, Linux Foundation, Haiku, Python, …) přijatých do letošního, již dvacátého, Google Summer of Code.
Na základě DMCA požadavku bylo na konci dubna z GitHubu odstraněno 8535 repozitářů se zdrojovými kódy open source emulátoru přenosné herní konzole Nintendo Switch yuzu.
Webový prohlížeč Dillo (Wikipedie) byl vydán ve verzi 3.1.0. Po devíti letech od vydání předchozí verze 3.0.5. Doména dillo.org již nepatří vývojářům Dilla.
O víkendu probíhá v Bostonu, a také virtuálně, konference LibrePlanet 2024 organizovaná nadací Free Software Foundation (FSF).
Nová vývojová verze Wine 9.8 řeší mimo jiné chybu #3689 při instalaci Microsoft Office 97 nahlášenou v roce 2005.
Coppwr, tj. GUI nástroj pro nízkoúrovňové ovládání PipeWire, byl vydán v nové verzi 1.6.0. Zdrojové kódy jsou k dispozici na GitHubu. Instalovat lze také z Flathubu.
Byla vydána dubnová aktualizace aneb nová verze 1.89 editoru zdrojových kódů Visual Studio Code (Wikipedie). Přehled novinek i s náhledy a animovanými gify v poznámkách k vydání. Vypíchnout lze, že v terminálu lze nově povolit vkládání kopírovaného textu stisknutím středního tlačítka myši. Ve verzi 1.89 vyjde také VSCodium, tj. komunitní sestavení Visual Studia Code bez telemetrie a licenčních podmínek Microsoftu.
Proton, tj. fork Wine integrovaný v Steam Play a umožňující v Linuxu přímo ze Steamu hrát hry určené pouze pro Windows, byl vydán ve verzi 9.0-1 (𝕏). Přehled novinek se seznamem nově podporovaných her na GitHubu. Aktuální přehled her pro Windows běžících díky Protonu také na Linuxu na stránkách ProtonDB.
Byla vydána verze 1.78.0 programovacího jazyka Rust (Wikipedie). Podrobnosti v poznámkách k vydání na GitHubu. Vyzkoušet Rust lze například na stránce Rust by Example.
Služba Dropbox Sign (původně HelloSign) pro elektronické podepisování smluv byla hacknuta.
$rand_str=random_string(5); //We memorize the md5 sum of the string into a session variable $_SESSION['image_value'] = md5($rand_str); //Get each letter in one valiable, we will format all letters different $letter1=substr($rand_str,0,1); $letter2=substr($rand_str,1,1); $letter3=substr($rand_str,2,1); $letter4=substr($rand_str,3,1); $letter5=substr($rand_str,4,1); //Creates an image from a png file. If you want to use gif or jpg images, //just use the coresponding functions: imagecreatefromjpeg and imagecreatefromgif. $image=imagecreatefrompng("images/noise2.png"); //Get a random angle for each letter to be rotated with. $angle1 = rand(-20, 20); $angle2 = rand(-20, 20); $angle3 = rand(-20, 20); $angle4 = rand(-20, 20); $angle5 = rand(-20, 20); //Get a random font. (In this examples, the fonts are located in "fonts" directory and named from 1.ttf to 10.ttf) $font1 = rand(1, 8).".ttf"; $font2 = rand(1, 8).".ttf"; $font3 = rand(1, 8).".ttf"; $font4 = rand(1, 8).".ttf"; $font5 = rand(1, 8).".ttf"; //$font1 = "1.ttf"; //$font2 = "1.ttf"; //$font3 = "1.ttf"; //$font4 = "1.ttf"; //$font5 = "1.ttf"; //Define a table with colors (the values are the RGB components for each color). //$colors[0]=array(122,229,112); $colors[0]=array(43,217,25); //$colors[1]=array(85,178,85); $colors[1]=array(77,56,56); $colors[2]=array(213,98,86); //$colors[3]=array(141,214,210); $colors[3]=array(68,229,220); $colors[4]=array(214,141,205); $colors[5]=array(43,118,241); //Get a random color for each letter. $color1=rand(0, 5); $color2=rand(0, 5); $color3=rand(0, 5); $color4=rand(0, 5); $color5=rand(0, 5); //Allocate colors for letters. $textColor1 = imagecolorallocate ($image, $colors[$color1][0],$colors[$color1][1], $colors[$color1][2]); $textColor2 = imagecolorallocate ($image, $colors[$color2][0],$colors[$color2][1], $colors[$color2][2]); $textColor3 = imagecolorallocate ($image, $colors[$color3][0],$colors[$color3][1], $colors[$color3][2]); $textColor4 = imagecolorallocate ($image, $colors[$color4][0],$colors[$color4][1], $colors[$color4][2]); $textColor5 = imagecolorallocate ($image, $colors[$color5][0],$colors[$color5][1], $colors[$color5][2]); //Write text to the image using TrueType fonts. $size = 22; imagettftext($image, $size, $angle1, 10, $size+15, $textColor1, $font1, $letter1); imagettftext($image, $size, $angle2, 35, $size+15, $textColor2, $font2, $letter2); imagettftext($image, $size, $angle3, 60, $size+15, $textColor3, $font3, $letter3); imagettftext($image, $size, $angle4, 85, $size+15, $textColor4, $font4, $letter4); imagettftext($image, $size, $angle5, 110, $size+15, $textColor5, $font5, $letter5); header('Content-type: image/png'); //Output image to browser imagepng($image); //Destroys the image imagedestroy($image);funkce random_string(5) generuje nahodny rotezec o 5ti znacich Na vzdalenem serveru se to chova tak, ze se zobrazi pozadi s obrazkem images/noise2.png, ale jednotlive znaky v nem uz se nezobrazi. Nevim, kde hledat problem vypis phpinfo ze serveru pro gd: GD Support enabled GD Version 2.0 or higher FreeType Support enabled FreeType Linkage with freetype JPG Support enabled PNG Support enabled WBMP Support enabled Nevim jestli neni treba v opravnenich - pro adresar fonts (kde je 8 typu fontu ttf) je nastaveno opravneni cteni a zapis tedy rw-rw-rw- Dekuji
Asi to nemuze najit ty fonty, zapnete si vypis chybovych hlasek (na zacatek skriptu dejte error_reporting(E_ALL); ini_set('display_errors', true);
)
Warning: Could not find/open font in /home/web/www/stranky/random_image.php on line 93 Warning: Could not find/open font in /home/web/www/stranky/random_image.php on line 94 Warning: Could not find/open font in /home/web/www/stranky/random_image.php on line 95 Warning: Could not find/open font in /home/web/www/stranky/random_image.php on line 96 Warning: Could not find/open font in /home/web/www/stranky/random_image.php on line 97 Warning: Cannot add header information - headers already sent by (output started at /home/web/www/stranky/random_image.php:93)Zkusil jsem dat toto
$font1 = "1.ttf"; $font2 = "1.ttf"; $font3 = "1.ttf"; $font4 = "1.ttf"; $font5 = "1.ttf";a soubor 1.ttf se nachazi ve stejnem adresari jako random_image.php. A chova se to stejne, pritom u me na localu to bezi
Depending on which version of the GD library PHP is using, when fontfile does not begin with a leading / then .ttf will be appended to the filename and the library will attempt to search for that filename along a library-defined font path.Skús ku tým fontom dať plnú cestu - /var/www/projects/whatever/fonts/1.ttf, alebo to zadať bez toho .ttf. PS: hneď keď vyriešiš toto, tak by som sa na Tvojom mieste zameral na príkaz for...
Tiskni Sdílej: