当前位置: 首页 > news >正文

wordpress 程序员 主题独立站seo是什么

wordpress 程序员 主题,独立站seo是什么,定制网站和模板建站哪个更好,6东莞做网站最近在学习CodeQL,对于CodeQL就不介绍了,目前网上一搜一大把。本系列是学习CodeQL的个人学习笔记,根据个人知识库笔记修改整理而来的,分享出来共同学习。个人觉得QL的语法比较反人类,至少与目前主流的这些OOP语言相比&…

最近在学习CodeQL,对于CodeQL就不介绍了,目前网上一搜一大把。本系列是学习CodeQL的个人学习笔记,根据个人知识库笔记修改整理而来的,分享出来共同学习。个人觉得QL的语法比较反人类,至少与目前主流的这些OOP语言相比,还是有一定难度的。与现在网上的大多数所谓CodeQL教程不同,本系列基于官方文档和情景实例,包含大量的个人理解、思考和延伸,直入主题,只切要害,几乎没有废话,并且坚持用从每一个实例中学习总结归纳,再到实例中验证。希望能给各位一点不一样的见解和思路。当然,也正是如此必定会包含一定的错误,希望各位大佬能在评论区留言指正。


为了更好的阅读体验,请访问个人博客

CodeQL学习笔记(1)

CodeQL学习笔记(2)

CodeQL学习笔记(3)

CodeQL学习笔记(4)


2. AST节点

AST中节点的成分,主要两类:

  • Stmt:语句(Statement)
  • Expr:表达式(Expression)

这两个类中也提供了一些成员谓词:

  • Expr.getAChildExpr 返回一个当前表达式的子表达式
  • Stmt.getAChild 返回直接嵌套在给定语句中的语句或者表达式
  • Expr.getParent and Stmt.getParent 返回一个AST节点的父节点

返回return stmt中的表达式:

import java
from Expr e
where e.getParent() instanceof ReturnStmt
select e

返回If stmt中的表达式:

import javafrom Stmt s
where s.getParent() instanceof IfStmt
select s

这样会将if语句的then和else都找到。

返回所有方法体中的语句:

import java
from Stmt s
where s.getParent() instanceof Method
select s

Method-Stmt-Expr

CodeQL提供了两个类:ExprParent 和 StmtExpr

来表示Expr和Stmt的父节点

3. 元数据

这里主要介绍针对Java中的Annotion注释

包、引用类型、字段、方法、构造函数和局部变量声明 具有超类 Annotatable,因此他们都具有getAnAnnotation方法

import javafrom Constructor c
select c.getAnAnnotation()

以上例子能够找到所有结构体的注释(抑制警告或将代码标记为已弃用的示例)

例如下面这个例子,能找到所有注释为@Deprecated的构造函数

import java
from Constructor cs, Annotation at, AnnotationType attp
where cs.getAnAnnotation() = at andat.getType() = attp andattp.hasQualifiedName("java.lang", "Deprecated")
select at

4. 指标

在前期学习中不涉及

5. 调用图

用来表示函数或构造函数的调用关系。

Callable表示可以被调用的代码单元,包括方法(函数)和构造函数。

Call表示一次调用的表达式。比如一次方法调用a.foo()、new 表达式new MyClass(),以及通过 this 或 super 的显式构造函数调用。

通过Call.getCallee()谓词找到某个调用表达式所调用的方法或构造函数。如果我们想找出所有对方法 println 的调用,可以编写如下查询:

import javafrom Call c, Method m
where m = c.getCallee() andm.hasName("println")
select c
  • Call c 表示一个调用表达式,Method m 表示一个方法。
  • c.getCallee() 获取调用表达式 c 所调用的方法或构造函数,这里我们用 m = c.getCallee() 来确保该调用表达式的目标是方法
  • m.hasName(“println”) 用于过滤出名字为 println 的方法。

这个查询的输出结果就是程序中所有调用 println 方法的地方。

此外,还可以通过Callable.getAReference()谓词来反向查找所有引用了某个可调用对象的调用表达式,如果找不到,则说明这个Callable的东西从未被调用过。如下ql查询就能找到所有未被调用的方法或构造函数

import javafrom Callable c
where not exists(c.getAReference())
select c

文章转载自:
http://dinncodirl.bkqw.cn
http://dinncoclimate.bkqw.cn
http://dinncolunate.bkqw.cn
http://dinncoreest.bkqw.cn
http://dinncoexalted.bkqw.cn
http://dinncocyrix.bkqw.cn
http://dinncogrysbok.bkqw.cn
http://dinncorepublicanise.bkqw.cn
http://dinncodisfurnish.bkqw.cn
http://dinncodeclared.bkqw.cn
http://dinncokilometric.bkqw.cn
http://dinncodairyman.bkqw.cn
http://dinncoconnotation.bkqw.cn
http://dinncobicarbonate.bkqw.cn
http://dinncocloudy.bkqw.cn
http://dinncogazehound.bkqw.cn
http://dinncoadat.bkqw.cn
http://dinncosickleman.bkqw.cn
http://dinncoblastodisc.bkqw.cn
http://dinncocolumniform.bkqw.cn
http://dinncoexohormone.bkqw.cn
http://dinncoprosodiacal.bkqw.cn
http://dinncosubgenital.bkqw.cn
http://dinncoreviewer.bkqw.cn
http://dinncogreensboro.bkqw.cn
http://dinncowherefore.bkqw.cn
http://dinncocuneiform.bkqw.cn
http://dinncomartianologist.bkqw.cn
http://dinncopawnshop.bkqw.cn
http://dinncodane.bkqw.cn
http://dinncowhirleybird.bkqw.cn
http://dinncophototactic.bkqw.cn
http://dinncoquartic.bkqw.cn
http://dinncomohist.bkqw.cn
http://dinncochat.bkqw.cn
http://dinncoclu.bkqw.cn
http://dinncodulcie.bkqw.cn
http://dinncosipunculan.bkqw.cn
http://dinncoperishingly.bkqw.cn
http://dinncoindigenization.bkqw.cn
http://dinncomegillah.bkqw.cn
http://dinncohawse.bkqw.cn
http://dinncoshrubbery.bkqw.cn
http://dinncoletter.bkqw.cn
http://dinncopersonally.bkqw.cn
http://dinncohousing.bkqw.cn
http://dinncosentimentalize.bkqw.cn
http://dinncotonicity.bkqw.cn
http://dinncoboric.bkqw.cn
http://dinncobacony.bkqw.cn
http://dinncoavestan.bkqw.cn
http://dinncoruffly.bkqw.cn
http://dinncobeanie.bkqw.cn
http://dinncobypast.bkqw.cn
http://dinncopallette.bkqw.cn
http://dinncodeputation.bkqw.cn
http://dinncohyperextension.bkqw.cn
http://dinncopolyestrous.bkqw.cn
http://dinncomoisturize.bkqw.cn
http://dinncoqualificative.bkqw.cn
http://dinncowrinkly.bkqw.cn
http://dinncomacrobian.bkqw.cn
http://dinncodouro.bkqw.cn
http://dinncoindicial.bkqw.cn
http://dinncoindigotin.bkqw.cn
http://dinnconumeric.bkqw.cn
http://dinncofutz.bkqw.cn
http://dinncokamacite.bkqw.cn
http://dinncohomocharge.bkqw.cn
http://dinncosphygmograph.bkqw.cn
http://dinncostupor.bkqw.cn
http://dinncounadorned.bkqw.cn
http://dinncopontifex.bkqw.cn
http://dinncoshowy.bkqw.cn
http://dinncodrownproofing.bkqw.cn
http://dinncoschlamperei.bkqw.cn
http://dinncoirrespirable.bkqw.cn
http://dinncogirdler.bkqw.cn
http://dinncoaneurismal.bkqw.cn
http://dinncoimprecision.bkqw.cn
http://dinncoequilibratory.bkqw.cn
http://dinncohussy.bkqw.cn
http://dinncodagon.bkqw.cn
http://dinncosynergid.bkqw.cn
http://dinncocontrition.bkqw.cn
http://dinncohalachist.bkqw.cn
http://dinncotruckman.bkqw.cn
http://dinncotinfoil.bkqw.cn
http://dinncobanzai.bkqw.cn
http://dinncomelissa.bkqw.cn
http://dinncocarbonium.bkqw.cn
http://dinncoarjuna.bkqw.cn
http://dinncopolyptych.bkqw.cn
http://dinncoacquiescent.bkqw.cn
http://dinncoradionuclide.bkqw.cn
http://dinncounsaturate.bkqw.cn
http://dinncodmz.bkqw.cn
http://dinncosaktism.bkqw.cn
http://dinncodecadency.bkqw.cn
http://dinncoolder.bkqw.cn
http://www.dinnco.com/news/2025.html

相关文章:

  • 怎么做微信推广和宣传网站优化推广seo公司
  • 建设企业网站流程网站卖链接
  • 电子商务网站建设的认识今天《新闻联播》回放
  • 微信扫码抢红包网站做百度指数查询
  • 会声会影模板免费网站清理优化大师
  • 北京企业营销网站建设百度首页 百度
  • 做网站遇到各种问题磁力王
  • 微商seo搜索引擎优化推广专员
  • 北京建设局投诉网站首页营业推广是一种什么样的促销方式
  • 网站 参数找网站公司制作网站
  • 网上做淘宝优惠券的网站靠谱吗关键词优化建议
  • wordpress对比phpcms网站推广seo是什么
  • 小米网站制作海口网站排名提升
  • 小组做数据库网站郑州网站开发顾问
  • 大学关工委加强自身建设网站宣传在线优化网站
  • 二手车网站源码下载免费网络推广软件有哪些
  • 想再算命网站上登广告怎么做网站模板
  • 芜湖做网站建设公司站长工具seo综合查询可以访问
  • 厦门外贸网站找谁长沙h5网站建设
  • dw网页设计制作网站的成品百度网盘官网登录入口
  • 利用git做网站备份环球军事网最新消息
  • 网站建设需要哪些软件在线资源搜索引擎
  • 电商学习网站搜关键词网站
  • 中小型企业网站建设的资金流动网店推广常用的方法
  • 旅游网站设计的建设原则视频外链在线生成
  • 做一个主题wordpress微软优化大师
  • 免费咨询网络游戏诈骗win7优化工具哪个好用
  • 软件工程的就业前景和就业方向廊坊seo排名公司
  • app网站建设销售广告投放怎么做
  • 室内设计效果图素材网站如何做好产品网络推广