Scratch3最新版本
目前只有两个最新版本:
Scratch3.29.1
Scratch3.6.0
在此网盘分享。
链接: https://pan.baidu.com/s/16IGyG6jpfzqq-13R5oBaBA?pwd=naxh 提取码: naxh
链接: https://pan.baidu.com/s/1JHRaL_MGpHWbdnjv-heR0w?pwd=dbtf 提取码: dbtf
百度网盘下载
(湘ICP备2021002763号-1)温馨提示:本博客只收集个人学习与研究IT的技术资料。谢绝攻击!!!
Scratch3最新版本
目前只有两个最新版本:
Scratch3.29.1
Scratch3.6.0
在此网盘分享。
链接: https://pan.baidu.com/s/16IGyG6jpfzqq-13R5oBaBA?pwd=naxh 提取码: naxh
链接: https://pan.baidu.com/s/1JHRaL_MGpHWbdnjv-heR0w?pwd=dbtf 提取码: dbtf
百度网盘下载
Scratch3怎么创建exe可执行文件
Scratch3的源代码是HTML5+JS的组合运行体 ,不再支持单一文件一键生成。
一、所需软件:
1、生成自解压文件 NW.js
官方网址:
https://nwjs.io/
2、运行HTML5环境:MakeSFX
官方网址:
https://revocue.cz/en/make-sfx/index.php
3、在线生成HTML5的网站
https://sheeptester.github.io/htmlifier/
具体步骤:
1、上传SB3文件,在线生成HTML代码。
https://sheeptester.github.io/htmlifier/
2、下载生成的代码,解压获得HTML主文件
3、复制主文件到nwjs文件夹下
4、用记事本打开,修改nwjs文件夹下的package.json
{
“name”:”项目名称”,
“main”:”运行的.html”
}
5、点nw.exe,测试运行是否正常。
6、运行makesfx.exe,创建可自解压的运行文件。
source是源文件目录
Taget SFX 一行是生成的目标文件名
第四个圆点解压后要执行的文件名字。
其他不懂的请百度。
图省事的可以直接用我做好的压缩包,里面包含所有需要下载的东东
下载地址:
https://pan.baidu.com/s/1lJOzu3wEtInnSd0QIp1gHw?pwd=42xi
提取码: 42xi
–来自百度网盘超级会员v7的分享
谢谢 !
PHP中的GD库操作指南
王林
发布: 2023-05-20 14:40:40
原创
3059人浏览过
一、什么是gd库?
GD库是一组用于创建和处理各种图像格式的库函数,是PHP中最为常用的图像处理库之一。
二、安装GD库
在CentOS/RedHat下安装GD库
1.安装PHP的GD扩展库
yum install php-gd
2.重启web服务器
service httpd restart
3.查看PHP支持的GD库版本
php -i | grep -i gd
在Ubuntu/Debian下安装GD库
1.安装php5-gd模块
apt-get update && apt-get install php5-gd
2.重启web服务器
service apache2 restart
3.查看PHP支持的GD库版本
php -i | grep -i gd
三、GD库的基本操作
1.创建图像
1)创建一个200X200像素的黑色图像
$image = imagecreate(200,200);
$black = imagecolorallocate($image,0,0,0);
imagefill($image,0,0,$black);
2)在图像中添加文本
$white = imagecolorallocate($image,255,255,255);
$text = ‘Hello, GD!’;
imagettftext($image,20,0,70,100,$white,’arial.ttf’,$text);
3)保存图像到文件
imagepng($image,’test.png’);
4)释放内存
imagedestroy($image);
2.图像处理
1)缩放图像
$src_image = imagecreatefrompng(‘test.png’);
$src_width = imagesx($src_image);
$src_height = imagesy($src_image);
$new_width = $src_width * 0.5;
$new_height = $src_height * 0.5;
$new_image = imagecreatetruecolor($new_width,$new_height);
imagecopyresampled($new_image,$src_image,0,0,0,0,$new_width,$new_height,$src_width,$src_height);
imagepng($new_image,’test-resized.png’);
2)添加边框
$border_color = imagecolorallocate($new_image,128,128,128);
imagerectangle($new_image,0,0,$new_width-1,$new_height-1,$border_color);
imagepng($new_image,’test-bordered.png’);
3)裁剪图像
$cropped_image = imagecrop($new_image,[‘x’=>40,’y’=>40,’width’=>100,’height’=>100]);
imagepng($cropped_image,’test-cropped.png’);
4)模糊图像
$blurred_image = imagefilter($new_image,IMG_FILTER_GAUSSIAN_BLUR);
imagepng($blurred_image,’test-blurred.png’);
3.操作图像元素
1)获取像素RGB值
$pixel = imagecolorat($new_image,50,50);
$red = ($pixel >> 16) & 0xFF;
$green = ($pixel >> 8) & 0xFF;
$blue = $pixel & 0xFF;
2)修改像素RGB值
$new_color = imagecolorallocate($new_image,255,0,0);
imagesetpixel($new_image,50,50,$new_color);
imagepng($new_image,’test-pixel.png’);
3)填充图像
$fill_color = imagecolorallocate($new_image,0,255,0);
imagefill($new_image,0,0,$fill_color);
imagepng($new_image,’test-filled.png’);
四、GD库的高级操作
1.水印处理
1)添加文字水印
$watermark_text = ‘COPYRIGHT’;
$font_size = 20;
$font_color = imagecolorallocate($new_image,0,0,0);
imagettftext($new_image,$font_size,0,10,20,$font_color,’arial.ttf’,$watermark_text);
imagepng($new_image,’test-watermark.png’);
2)添加图片水印
$watermark_image = imagecreatefrompng(‘watermark.png’);
$watermark_width = imagesx($watermark_image);
$watermark_height = imagesy($watermark_image);
$pos_x = ($new_width – $watermark_width) / 2;
$pos_y = ($new_height – $watermark_height) / 2;
imagecopy($new_image,$watermark_image,$pos_x,$pos_y,0,0,$watermark_width,$watermark_height);
imagepng($new_image,’test-watermark.png’);
2.画图操作
1)画直线
$line_color = imagecolorallocate($new_image,0,0,255);
imageline($new_image,0,0,$new_width,$new_height,$line_color);
imagepng($new_image,’test-line.png’);
2)画矩形
$rect_color = imagecolorallocate($new_image,0,255,0);
imagerectangle($new_image,20,20,$new_width-20,$new_height-20,$rect_color);
imagepng($new_image,’test-rectangle.png’);
3)画圆形
$circle_color = imagecolorallocate($new_image,255,0,0);
$circle_center_x = $new_width/2;
$circle_center_y = $new_height/2;
$circle_diameter = $new_height * 0.8;
$circle_radius = $circle_diameter / 2;
imageellipse($new_image,$circle_center_x,$circle_center_y,$circle_diameter,$circle_diameter,$circle_color);
imagepng($new_image,’test-circle.png’);
五、总结
本文介绍了GD库的基本操作和高级操作,包括图像创建、图像处理、操作图像元素、水印处理、画图操作等内容。GD库是PHP开发中非常实用的图像处理工具之一,可以用于制作图片验证码、生成二维码、图表、海报等。掌握GD库的使用技能可以帮助PHP开发者更加高效地完成业务需求。
以上就是PHP中的GD库操作指南的详细内容,更多请关注php中文网其它相关文章!
<?php
function resizeImage($sourceImage, $targetImage, $maxWidth, $maxHeight) {
list($sourceWidth, $sourceHeight, $sourceType) = getimagesize($sourceImage);
switch ($sourceType) {
case IMAGETYPE_JPEG:
$sourceResource = imagecreatefromjpeg($sourceImage);
break;
case IMAGETYPE_PNG:
$sourceResource = imagecreatefrompng($sourceImage);
break;
case IMAGETYPE_GIF:
$sourceResource = imagecreatefromgif($sourceImage);
break;
default:
return false;
}
$targetWidth = $sourceWidth;
$targetHeight = $sourceHeight;
if ($sourceWidth > $maxWidth || $sourceHeight > $maxHeight) {
$aspectRatio = $sourceWidth / $sourceHeight;
if (($maxWidth / $maxHeight) > $aspectRatio) {
$targetWidth = $maxHeight * $aspectRatio;
$targetHeight = $maxHeight;
} else {
$targetWidth = $maxWidth;
$targetHeight = $maxWidth / $aspectRatio;
}
}
$targetResource = imagecreatetruecolor($targetWidth, $targetHeight);
imagecopyresampled($targetResource, $sourceResource, 0, 0, 0, 0, $targetWidth, $targetHeight, $sourceWidth, $sourceHeight);
switch ($sourceType) {
case IMAGETYPE_JPEG:
imagejpeg($targetResource, $targetImage, 80); // 80 是图片质量,可根据需求调整
break;
case IMAGETYPE_PNG:
imagepng($targetResource, $targetImage);
break;
case IMAGETYPE_GIF:
imagegif($targetResource, $targetImage);
break;
default:
return false;
}
imagedestroy($sourceResource);
imagedestroy($targetResource);
return true;
}
//这个命令尝试修改图片大小,注意要启用GD库。
resizeImage(’11.png’, ’22.png’, 1000, 600);
运行CMD
然后运行命令:
wmic memphysical get maxcapacity
将返回的结果除以1024,再除以1024。所得结果就是最大内存GB
打倒微软系统,支持国产系统,可是我们拿什么用呢?习惯,习惯太可怕了!
在数字时代的浪潮中,微软以其创新的Windows企业版、专业版和Office为大客户提供了独特的激活方式,其中独领风骚的MAK密钥和零售密钥成为企业IT管理者的得力助手。
打倒微软系统,支持国产系统,可是我们拿什么用呢?习惯,习惯太可怕了!
MAK(多次激活密钥)被誉为激活的永恒之光,其优势不言而喻。一旦使用MAK密钥激活,系统将永久拥有激活状态,无需频繁重新激活,企业不必为激活问题而烦扰。这种“一次激活,永不过期”的模式,为大客户提供了无与伦比的便捷和稳定性。
MAK密钥的独特之处在于,每一次激活都是一次权益的交换。随着企业的成长和发展,MAK密钥的激活次数随之减少,直至为零。然而,微软为大客户提供了持续焕发活力的机会。只要企业再次付费,微软将慷慨地为其“充值”,根据付费金额为其授权激活次数,使MAK密钥重新焕发活力。
相较之下,KMS(密钥管理服务)作为180天周期激活的代表,虽然在某些场景下也具备一定的优势,但其短暂的激活周期和对网络依赖性的要求使得MAK密钥在稳定性和便捷性上更为卓越。
打倒微软系统,支持国产系统,可是我们拿什么用呢?习惯,习惯太可怕了!
而零售密钥则为个体用户提供了更为灵活的激活方式。零售密钥购买后即可激活系统,无需大规模管理,适合个人用户或小型企业。虽然相对于MAK密钥而言在规模上略显不足,但其简便性和即时性仍使其在特定情境下备受青睐。
总体而言,MAK密钥以其永久激活的优势,成为大客户在Windows企业版和专业版中的首选。其稳定性、便捷性和与企业共同成长的特性,让MAK密钥在数字化时代的大舞台上独领风骚,而零售密钥则为个体用户提供了更为便捷的激活选择。
https://www.nruan.com/win-key.html
https://www.nruan.com/windows11.html
打倒微软系统,支持国产系统,可是我们拿什么用呢?习惯,习惯太可怕了!
http://pan.kuaicdn.cn:800/%E7%8C%95%E7%8C%B4%E6%A1%83%E9%83%A8%E7%BD%B2%E6%96%87%E4%BB%B6/windows/
程序安装后默认每个盘符都会开一个进程
如果不想在某盘开进程,可以在磁盘根目录新建一个文件取名为 not_cache.txt 即可
例如 不想在D盘开进程 就在D盘下新建一个 名为 not_cache.txt 的文件即可
然后再删除该盘下 kuaicdn_cache 目录下的文件夹,删不掉的话先停止程序再删
这个是采取事件监控的方式,实时修改代码的。
<script>
var radioButtons = document.querySelectorAll(\’input[type=”radio”]\’);
var value2;
function handleChange(event) {
value2 = event.target.value;
document.getElementById(“huodong_jifen“).value = value2;//这个是要修改的元素
}
for (var i = 0; i < radioButtons.length; i++) {
radioButtons[i].addEventListener(\’change\’, handleChange);
}
</script>
原理很简单,特此备忘
ORDER BY convert(`xingming` using gbk) asc;