SpringBoot+Thymleaf+Python+Echarts+Neo4j实现知识图谱可视化

方案一:SpringBoot配置多数据源

配置Mysql多数据库

具体可以参考:https://www.w3cschool.cn/article/50807439.html

配置Mysql数据库与Neo4j数据库

参考:https://gitee.com/baomidou/dynamic-datasource-spring-boot-starter
具体如下:

1.引入dynamic-datasource-spring-boot-starter。

<dependency>
  <groupId>com.baomidou</groupId>
  <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
  <version>3.5.1</version>
</dependency>

2.配置数据源。

spring:
  datasource:
    dynamic:
      primary: master #设置默认的数据源或者数据源组,默认值即为master
      strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
      datasource:
        master:
          url: jdbc:mysql://xx.xx.xx.xx:3306/dynamic
          username: root
          password: 123456
          driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
        slave_1:
          url: jdbc:neo4j:bolt://192.168.88.1:7687
          username: neo4j
          password: 123
          driver-class-name: org.neo4j.jdbc.bolt.BoltDriver
        slave_2:
          url: ENC(xxxxx) # 内置加密,使用请查看详细文档
          username: ENC(xxxxx)
          password: ENC(xxxxx)
          driver-class-name: com.mysql.jdbc.Driver
          
       #......省略
       #以上会配置一个默认库master,一个组slave下有两个子库slave_1,slave_2

3.使用 @DS 切换数据源。
@DS 可以注解在方法上或类上,同时存在就近原则 方法上注解 优先于 类上注解。

注解 结果
没有@DS 默认数据源
@DS(“dsName”) dsName可以为组名也可以为具体某个库的名称
@Service
@DS("slave")
public class UserServiceImpl implements UserService {

  @Autowired
  private JdbcTemplate jdbcTemplate;

  public List selectAll() {
    return  jdbcTemplate.queryForList("select * from user");
  }
  
  @Override
  @DS("slave_1")
  public List selectByCondition() {
    return  jdbcTemplate.queryForList("select * from user where age >10");
  }
}

方案二:采用python作为neo4j数据源

思路:通过python获取neo4j数据库数据,将数据写入json文件供SpringBoot访问使用

1、Neo4j数据库数据获取

CyPher语句如下:

MATCH p=(m:Disease)-[r]->(n) return  id(m) as start,labels(m) as mcats,collect(m.name)  as m_name,collect(n.name) as n_name,id(n) as end,labels(n) as ncats,r.name as link limit 20

名称释义:

MATCH p=(m:Disease)-[r]->(n)
提取所有Disease的节点实体有关的关系,节点数据传入p
return id(m) as start
返回m:Disease类型节点的id值,同时赋值别名为start
collect(m.name) as m_name
由于m节点的name属性是多个字符组成的字符串,所以返回时要进行collect组合操作,避免在遍历时赋值不全。
r.name as link
将关系r的name属性赋别名作为link

2、寻找Echarts中关系图Html模板

这里我选择的是:SpringBoot+Thymleaf+Python+Echarts+Neo4j实现知识图谱可视化_第1张图片

链接:知识图谱关系图
SpringBoot+Thymleaf+Python+Echarts+Neo4j实现知识图谱可视化_第2张图片
分析数据结构后,设计的json结构如下

[
	data:{
		node1.name,
		node1.tooltip,
		node1.category
	}{
		node2.name,
		node2.tooltip,
		node2.category
	}
],
[
	link:{
		source:
		target:
		value:
	},
	{
		source:
		target:
		value:
	}
]

3、python将查询cypher语句获得的数据写入json文件

具体参考:

https://blog.csdn.net/luanpeng825485697/article/details/93630060?ops_request_misc=&request_id=&biz_id=102&utm_term=neo4j%E6%9F%A5%E8%AF%A2%E6%9F%90%E4%B8%AA%E5%B1%9E%E6%80%A7cypher&utm_medium=distribute.pc_search_result.none-task-blog-2blogsobaiduweb~default-8-93630060.nonecase&spm=1018.2226.3001.4450

此处以Neo4j中默认的Movie-Actor数据库为例子说明,用bottle库运行

from py2neo import Graph, Node, Relationship, NodeMatcher

# 连接图库                            初始化账号密码都是neo4j
# graph = Graph('http://localhost:7474', auth=('neo4j', '123'))

# { category: '积极', name: 'cool_polaris', value: 2, symbolSize: 10 }
# { source: '我买不到口罩', target: '野萌君的好朋友', value: 1 },
# 提取实体名称catagory,提取名字name,提取 source-target

import json

from bottle import get, run, request, response, static_file
from py2neo import Graph


#password = {Your neo4j password}
graph = Graph(password = "123")


@get("/")
def get_index():
    return static_file("index.html", root="static")


@get("/graph")
def get_graph():
    results = graph.run(
        "MATCH (m:Movie)<-[:ACTED_IN]-(a:Person) "
        "RETURN m.title as movie, collect(a.name) as cast "
        "LIMIT {limit}", {"limit": 100})
    nodes = []
    rels = []
    i = 0
    print(results)
    for movie, cast in results:
        nodes.append({"title": movie, "label": "movie"})
        target = i
        i += 1
        for name in cast:
            actor = {"name": name, "label": "actor"}
            try:
                source = nodes.index(actor)
            except ValueError:
                nodes.append(actor)
                source = i
                i += 1
            rels.append({"source": source, "target": target,"value":'ACTED_IN'})
    return {"nodes": nodes, "links": rels}


@get("/search")
def get_search():
    try:
        q = request.query["q"]
    except KeyError:
        return []
    else:
        results = graph.run(
            "MATCH (movie:Movie) "
            "WHERE movie.title =~ {title} "
            "RETURN movie", {"title": "(?i).*" + q + ".*"})
        response.content_type = "application/json"
        return json.dumps([{"movie": dict(row["movie"])} for row in results])


@get("/movie/"</span><span class="token punctuation">)</span>
<span class="token keyword">def</span> <span class="token function">get_movie</span><span class="token punctuation">(</span>title<span class="token punctuation">)</span><span class="token punctuation">:</span>
    results <span class="token operator">=</span> graph<span class="token punctuation">.</span>run<span class="token punctuation">(</span>
        <span class="token string">"MATCH (movie:Movie {title:{title}}) "</span>
        <span class="token string">"OPTIONAL MATCH (movie)<-[r]-(person:Person) "</span>
        <span class="token string">"RETURN movie.title as title,"</span>
        <span class="token string">"collect([person.name, head(split(lower(type(r)),'_')), r.roles]) as cast "</span>
        <span class="token string">"LIMIT 1"</span><span class="token punctuation">,</span> <span class="token punctuation">{</span><span class="token string">"title"</span><span class="token punctuation">:</span> title<span class="token punctuation">}</span><span class="token punctuation">)</span>
    row <span class="token operator">=</span> results<span class="token punctuation">.</span><span class="token builtin">next</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
    <span class="token keyword">return</span> <span class="token punctuation">{</span><span class="token string">"title"</span><span class="token punctuation">:</span> row<span class="token punctuation">[</span><span class="token string">"title"</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token string">"cast"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token builtin">dict</span><span class="token punctuation">(</span><span class="token builtin">zip</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token string">"name"</span><span class="token punctuation">,</span> <span class="token string">"job"</span><span class="token punctuation">,</span> <span class="token string">"role"</span><span class="token punctuation">)</span><span class="token punctuation">,</span> member<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token keyword">for</span> member <span class="token keyword">in</span> row<span class="token punctuation">[</span><span class="token string">"cast"</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">}</span>


<span class="token keyword">if</span> __name__ <span class="token operator">==</span> <span class="token string">"__main__"</span><span class="token punctuation">:</span>
    run<span class="token punctuation">(</span>port<span class="token operator">=</span><span class="token number">8095</span><span class="token punctuation">)</span>

</code></pre> 
  <p>之后运行http://127.0.0.1:8095/graph即可获得Neo4j查询到的数据,接着将数据写入json文件。</p> 
  <pre><code class="prism language-python">    <span class="token keyword">with</span> <span class="token builtin">open</span><span class="token punctuation">(</span><span class="token string">r"D:\你的Springboot项目文件\python\neoData1.json"</span><span class="token punctuation">,</span> <span class="token string">"w"</span><span class="token punctuation">,</span>encoding<span class="token operator">=</span><span class="token string">'utf-8'</span><span class="token punctuation">)</span> <span class="token keyword">as</span> f2<span class="token punctuation">:</span>
        <span class="token comment">#jsontext是neo4j返回的数据</span>
        js <span class="token operator">=</span> json<span class="token punctuation">.</span>dumps<span class="token punctuation">(</span>jsontext<span class="token punctuation">)</span>
        f2<span class="token punctuation">.</span>write<span class="token punctuation">(</span>js<span class="token punctuation">)</span>
</code></pre> 
  <p><a href="http://img.e-com-net.com/image/info8/0df39eb020f64164958749786442af9a.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/0df39eb020f64164958749786442af9a.jpg" alt="SpringBoot+Thymleaf+Python+Echarts+Neo4j实现知识图谱可视化_第3张图片" width="650" height="274" style="border:1px solid black;"></a><br> <a href="http://img.e-com-net.com/image/info8/e6efc6522f8b447695b7029d84e400d6.png" target="_blank"><img src="http://img.e-com-net.com/image/info8/e6efc6522f8b447695b7029d84e400d6.png" alt="SpringBoot+Thymleaf+Python+Echarts+Neo4j实现知识图谱可视化_第4张图片" width="261" height="126" style="border:1px solid black;"></a></p> 
  <h3><strong>4、SpringBoot+Thmyleaf运行</strong></h3> 
  <pre><code class="prism language-java"><span class="token keyword">import</span> <span class="token namespace">org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>context<span class="token punctuation">.</span>annotation<span class="token punctuation">.</span></span><span class="token class-name">Configuration</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>web<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span>config<span class="token punctuation">.</span>annotation<span class="token punctuation">.</span></span><span class="token class-name">ResourceHandlerRegistry</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>web<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span>config<span class="token punctuation">.</span>annotation<span class="token punctuation">.</span></span><span class="token class-name">WebMvcConfigurer</span><span class="token punctuation">;</span>

<span class="token annotation punctuation">@Configuration</span>
<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">WebMvcConfig</span> <span class="token keyword">implements</span> <span class="token class-name">WebMvcConfigurer</span> <span class="token punctuation">{</span>
    <span class="token annotation punctuation">@Override</span>
    <span class="token keyword">public</span> <span class="token keyword">void</span> <span class="token function">addResourceHandlers</span><span class="token punctuation">(</span><span class="token class-name">ResourceHandlerRegistry</span> registry<span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token comment">// 将所有D:\\springboot\\pic\\   访问都  映射到 /myPic/**   路径下</span>
        registry<span class="token punctuation">.</span><span class="token function">addResourceHandler</span><span class="token punctuation">(</span><span class="token string">"/python/**"</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">addResourceLocations</span><span class="token punctuation">(</span><span class="token string">"file:D:\\你的Springboot项目文件\\python\\"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> 
  <p>前端html文件:</p> 
  <pre><code class="prism language-html"><span class="token doctype"><span class="token punctuation"><!</span><span class="token doctype-tag">DOCTYPE</span> <span class="token name">html</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>html</span> <span class="token style-attr"><span class="token attr-name">style</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token style language-css"><span class="token property">height</span><span class="token punctuation">:</span> 100%</span><span class="token punctuation">"</span></span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>head</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>meta</span> <span class="token attr-name">charset</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>utf-8<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>head</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>body</span> <span class="token style-attr"><span class="token attr-name">style</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token style language-css"><span class="token property">height</span><span class="token punctuation">:</span> 100%<span class="token punctuation">;</span> <span class="token property">margin</span><span class="token punctuation">:</span> 0</span><span class="token punctuation">"</span></span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>chart-panel<span class="token punctuation">"</span></span> <span class="token style-attr"><span class="token attr-name">style</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token style language-css"><span class="token property">height</span><span class="token punctuation">:</span> 100%<span class="token punctuation">;</span><span class="token property">width</span><span class="token punctuation">:</span> 100%</span><span class="token punctuation">"</span></span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>script</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>text/javascript<span class="token punctuation">"</span></span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>https://cdn.jsdelivr.net/npm/echarts@5.3.0/dist/echarts.min.js<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token script"></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>script</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>script</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>text/javascript<span class="token punctuation">"</span></span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token script"></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>script</span><span class="token punctuation">></span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>script</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>text/javascript<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token script"><span class="token language-javascript">
    <span class="token keyword">var</span> dom <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">"chart-panel"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> myChart <span class="token operator">=</span> echarts<span class="token punctuation">.</span><span class="token function">init</span><span class="token punctuation">(</span>dom<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> option<span class="token punctuation">;</span>
    <span class="token keyword">var</span> app <span class="token operator">=</span><span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> uploadedDataURL <span class="token operator">=</span> <span class="token string">'python/neoData1.json'</span><span class="token punctuation">;</span>


    <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span><span class="token keyword">var</span> jsondata<span class="token operator">=</span><span class="token operator">--</span><span class="token operator">></span>



    $<span class="token punctuation">.</span><span class="token function">getJSON</span><span class="token punctuation">(</span>uploadedDataURL<span class="token punctuation">,</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">linedata</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>    <span class="token keyword">var</span> data <span class="token operator">=</span> linedata<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token operator">--</span><span class="token operator">></span>
        <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>    <span class="token keyword">var</span> links <span class="token operator">=</span> linedata<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token operator">--</span><span class="token operator">></span>
        <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>    <span class="token keyword">var</span> categories <span class="token operator">=</span> linedata<span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span><span class="token operator">--</span><span class="token operator">></span>
        <span class="token keyword">var</span> data <span class="token operator">=</span> linedata<span class="token punctuation">[</span><span class="token string">'data'</span><span class="token punctuation">]</span>
        <span class="token keyword">var</span> links<span class="token operator">=</span> linedata<span class="token punctuation">[</span><span class="token string">'links'</span><span class="token punctuation">]</span>



        option <span class="token operator">=</span> <span class="token punctuation">{</span>

            title<span class="token operator">:</span> <span class="token punctuation">{</span>
                text<span class="token operator">:</span> <span class="token string">'疾病知识库图谱'</span><span class="token punctuation">,</span>
                padding<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token number">20</span><span class="token punctuation">,</span><span class="token number">20</span><span class="token punctuation">,</span><span class="token number">100</span><span class="token punctuation">,</span><span class="token number">100</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
                top<span class="token operator">:</span> <span class="token string">'top'</span><span class="token punctuation">,</span>
                left<span class="token operator">:</span> <span class="token string">'center'</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            tooltip<span class="token operator">:</span><span class="token punctuation">{</span>
                show<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token comment">// 默认显示</span>
                    showContent<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token comment">// 是否显示提示框浮层</span>
                    trigger<span class="token operator">:</span> <span class="token string">'item'</span><span class="token punctuation">,</span> <span class="token comment">// 触发类型,默认数据项触发</span>
                    triggerOn<span class="token operator">:</span> <span class="token string">'mousemove'</span><span class="token punctuation">,</span> <span class="token comment">// 提示触发条件,mousemove鼠标移至触发,还有click点击触发</span>
                    alwaysShowContent<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token comment">// 默认离开提示框区域隐藏,true为一直显示</span>
                    showDelay<span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span> <span class="token comment">// 浮层显示的延迟,单位为 ms,默认没有延迟,也不建议设置。在 triggerOn 为 'mousemove' 时有效。</span>
                    hideDelay<span class="token operator">:</span> <span class="token number">2000</span><span class="token punctuation">,</span> <span class="token comment">// 浮层隐藏的延迟,单位为 ms,在 alwaysShowContent 为 true 的时候无效。</span>
                    enterable<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token comment">// 鼠标是否可进入提示框浮层中,默认为false,如需详情内交互,如添加链接,按钮,可设置为 true。</span>
                    position<span class="token operator">:</span> <span class="token string">'right'</span><span class="token punctuation">,</span> <span class="token comment">// 提示框浮层的位置,默认不设置时位置会跟随鼠标的位置。只在 trigger 为'item'的时候有效。</span>
                    confine<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token comment">// 是否将 tooltip 框限制在图表的区域内。</span>
                    <span class="token comment">// 外层的 dom 被设置为 'overflow: hidden',或者移动端窄屏,导致 tooltip 超出外界被截断时,此配置比较有用。</span>
                    transitionDuration<span class="token operator">:</span> <span class="token number">0.2</span><span class="token punctuation">,</span> <span class="token comment">// 提示框浮层的移动动画过渡时间,单位是秒,设置为 0 的时候会紧跟着鼠标移动。</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>

            toolbox<span class="token operator">:</span> <span class="token punctuation">{</span>
                show<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                    feature<span class="token operator">:</span> <span class="token punctuation">{</span>
                    dataView<span class="token operator">:</span> <span class="token punctuation">{</span>
                        show<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                            readOnly<span class="token operator">:</span> <span class="token boolean">true</span>
                    <span class="token punctuation">}</span><span class="token punctuation">,</span>
                    restore<span class="token operator">:</span> <span class="token punctuation">{</span>
                        show<span class="token operator">:</span> <span class="token boolean">true</span>
                    <span class="token punctuation">}</span><span class="token punctuation">,</span>
                    saveAsImage<span class="token operator">:</span> <span class="token punctuation">{</span>
                        show<span class="token operator">:</span> <span class="token boolean">true</span>
                    <span class="token punctuation">}</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            animationDuration<span class="token operator">:</span> <span class="token number">1500</span><span class="token punctuation">,</span>
                animationEasingUpdate<span class="token operator">:</span> <span class="token string">'quinticInOut'</span><span class="token punctuation">,</span>
                legend<span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token comment">// 图例显示(显示在右上角),name:类别名称,icon:图例的形状(默认是roundRect圆角矩形)。</span>
                orient<span class="token operator">:</span> <span class="token string">'vertical'</span><span class="token punctuation">,</span><span class="token comment">//'horizontal', // 'vertical'</span>
                    x<span class="token operator">:</span> <span class="token string">'left'</span><span class="token punctuation">,</span> <span class="token comment">// 'center' | 'left' | {number},</span>
                    y<span class="token operator">:</span> <span class="token string">'top'</span><span class="token punctuation">,</span> <span class="token comment">// 'center' | 'bottom' | {number}</span>
                    show<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                    backgroundColor<span class="token operator">:</span> <span class="token string">'#fffefa'</span><span class="token punctuation">,</span>
                    padding<span class="token operator">:</span> <span class="token number">50</span><span class="token punctuation">,</span>    <span class="token comment">// [5, 10, 15, 20]</span>
                    itemGap<span class="token operator">:</span> <span class="token number">20</span><span class="token punctuation">,</span>
                    textStyle<span class="token operator">:</span> <span class="token punctuation">{</span>color<span class="token operator">:</span> <span class="token string">'black'</span><span class="token punctuation">}</span><span class="token punctuation">,</span>

                data<span class="token operator">:</span> <span class="token punctuation">[</span>
                    <span class="token punctuation">{</span>
                        name<span class="token operator">:</span> <span class="token string">'Disease'</span>
                    <span class="token punctuation">}</span><span class="token punctuation">,</span>
                    <span class="token punctuation">{</span>
                        name<span class="token operator">:</span> <span class="token string">'Department'</span>
                    <span class="token punctuation">}</span><span class="token punctuation">,</span>
                    <span class="token punctuation">{</span>
                        name<span class="token operator">:</span> <span class="token string">'Symptom'</span>
                    <span class="token punctuation">}</span><span class="token punctuation">,</span>
                    <span class="token punctuation">{</span>
                        name<span class="token operator">:</span> <span class="token string">'Check'</span>
                    <span class="token punctuation">}</span><span class="token punctuation">,</span>
                    <span class="token punctuation">{</span>
                        name<span class="token operator">:</span> <span class="token string">'Drug'</span>
                    <span class="token punctuation">}</span><span class="token punctuation">,</span>
                    <span class="token punctuation">{</span>
                        name<span class="token operator">:</span><span class="token string">'Food'</span>
                    <span class="token punctuation">}</span>
                <span class="token punctuation">]</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            series<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">{</span>
                name<span class="token operator">:</span> <span class="token string">''</span><span class="token punctuation">,</span>
                type<span class="token operator">:</span> <span class="token string">'graph'</span><span class="token punctuation">,</span>
                layout<span class="token operator">:</span> <span class="token string">'force'</span><span class="token punctuation">,</span>
                draggable<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token comment">//节点是否可以拖拽</span>
                force<span class="token operator">:</span> <span class="token punctuation">{</span>
                    <span class="token comment">//initLayout:'circular'</span>
                    <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                edgeLength<span class="token operator">:</span> <span class="token number">50</span><span class="token punctuation">,</span><span class="token operator">--</span><span class="token operator">></span>
                    <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                repulsion<span class="token operator">:</span> <span class="token number">50</span><span class="token punctuation">,</span><span class="token operator">--</span><span class="token operator">></span>
                    <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                gravity<span class="token operator">:</span> <span class="token number">0.2</span><span class="token operator">--</span><span class="token operator">></span>
                    <span class="token comment">// initLayout: , // 力引导的初始化布局,默认使用xy轴的标点</span>
                    repulsion<span class="token operator">:</span> <span class="token number">50</span><span class="token punctuation">,</span><span class="token comment">// 节点之间的斥力因子。支持数组表达斥力范围,值越大斥力越大。</span>
                    gravity<span class="token operator">:</span> <span class="token number">0.2</span><span class="token punctuation">,</span> <span class="token comment">// 节点受到的向中心的引力因子。该值越大节点越往中心点靠拢。</span>
                    layoutAnimation<span class="token operator">:</span> <span class="token boolean">true</span> <span class="token comment">// 因为力引导布局会在多次迭代后才会稳定,这个参数决定是否显示布局的迭代动画</span>
                    <span class="token comment">// 在浏览器端节点数据较多(>100)的时候不建议关闭,布局过程会造成浏览器假死。</span>
                <span class="token punctuation">}</span><span class="token punctuation">,</span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>            tooltip <span class="token operator">:</span> <span class="token punctuation">{</span><span class="token operator">--</span><span class="token operator">></span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                trigger<span class="token operator">:</span> <span class="token string">'item'</span><span class="token punctuation">,</span><span class="token operator">--</span><span class="token operator">></span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                <span class="token function-variable function">formatter</span><span class="token operator">:</span><span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">params</span><span class="token punctuation">)</span><span class="token punctuation">{</span><span class="token operator">--</span><span class="token operator">></span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                    <span class="token keyword">if</span><span class="token punctuation">(</span>params<span class="token punctuation">.</span>data<span class="token punctuation">.</span>flow<span class="token punctuation">)</span><span class="token punctuation">{</span><span class="token operator">--</span><span class="token operator">></span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                        <span class="token keyword">return</span> params<span class="token punctuation">.</span>data<span class="token punctuation">.</span>source <span class="token operator">+</span> <span class="token string">'到'</span> <span class="token operator">+</span> params<span class="token punctuation">.</span>data<span class="token punctuation">.</span>target <span class="token operator">+</span> <span class="token string">'的关系为'</span><span class="token operator">+</span> params<span class="token punctuation">.</span>data<span class="token punctuation">.</span>value<span class="token punctuation">;</span><span class="token operator">--</span><span class="token operator">></span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                    <span class="token punctuation">}</span><span class="token operator">--</span><span class="token operator">></span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                    <span class="token keyword">else</span><span class="token punctuation">{</span><span class="token operator">--</span><span class="token operator">></span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                        <span class="token keyword">return</span> params<span class="token punctuation">.</span>name<span class="token punctuation">;</span><span class="token operator">--</span><span class="token operator">></span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                    <span class="token punctuation">}</span><span class="token operator">--</span><span class="token operator">></span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                <span class="token punctuation">}</span><span class="token operator">--</span><span class="token operator">></span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>            <span class="token punctuation">}</span><span class="token punctuation">,</span><span class="token operator">--</span><span class="token operator">></span>
                data<span class="token operator">:</span> data<span class="token punctuation">,</span>
                edges<span class="token operator">:</span> links<span class="token punctuation">,</span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>            categories<span class="token operator">:</span> categories<span class="token punctuation">,</span><span class="token operator">--</span><span class="token operator">></span>
                focusNodeAdjacency<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                roam<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>            label<span class="token operator">:</span> <span class="token punctuation">{</span><span class="token operator">--</span><span class="token operator">></span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                normal<span class="token operator">:</span> <span class="token punctuation">{</span><span class="token operator">--</span><span class="token operator">></span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                    position<span class="token operator">:</span> <span class="token string">'right'</span><span class="token punctuation">,</span><span class="token operator">--</span><span class="token operator">></span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                    formatter<span class="token operator">:</span> <span class="token string">'{b}'</span><span class="token operator">--</span><span class="token operator">></span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>                <span class="token punctuation">}</span><span class="token operator">--</span><span class="token operator">></span>
                <span class="token operator"><</span><span class="token operator">!</span><span class="token operator">--</span>            <span class="token punctuation">}</span><span class="token punctuation">,</span><span class="token operator">--</span><span class="token operator">></span>
                lineStyle<span class="token operator">:</span> <span class="token punctuation">{</span>
                    normal<span class="token operator">:</span> <span class="token punctuation">{</span>
                        <span class="token comment">//color: 'target',</span>
                        curveness<span class="token operator">:</span> <span class="token number">0</span>
                    <span class="token punctuation">}</span>
                <span class="token punctuation">}</span><span class="token punctuation">,</span>
                categories<span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token comment">// name(类别名称)要同legend(图例)按次序一致</span>
                    <span class="token punctuation">{</span>
                        name<span class="token operator">:</span> <span class="token string">'Disease'</span>
                    <span class="token punctuation">}</span><span class="token punctuation">,</span>
                    <span class="token punctuation">{</span>
                        name<span class="token operator">:</span> <span class="token string">'Department'</span>
                    <span class="token punctuation">}</span><span class="token punctuation">,</span>
                    <span class="token punctuation">{</span>
                        name<span class="token operator">:</span> <span class="token string">'Symptom'</span>
                    <span class="token punctuation">}</span><span class="token punctuation">,</span>
                    <span class="token punctuation">{</span>
                        name<span class="token operator">:</span> <span class="token string">'Check'</span>
                    <span class="token punctuation">}</span><span class="token punctuation">,</span>
                    <span class="token punctuation">{</span>
                        name<span class="token operator">:</span> <span class="token string">'Drug'</span>
                    <span class="token punctuation">}</span><span class="token punctuation">,</span>
                    <span class="token punctuation">{</span>
                        name<span class="token operator">:</span><span class="token string">'Food'</span>
                    <span class="token punctuation">}</span>

                <span class="token punctuation">]</span>
            <span class="token punctuation">}</span><span class="token punctuation">]</span>
        <span class="token punctuation">}</span><span class="token punctuation">;</span>
        myChart<span class="token punctuation">.</span><span class="token function">setOption</span><span class="token punctuation">(</span>option<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>option <span class="token operator">&&</span> <span class="token keyword">typeof</span> option <span class="token operator">===</span> <span class="token string">'object'</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token keyword">var</span> startTime <span class="token operator">=</span> <span class="token operator">+</span><span class="token keyword">new</span> <span class="token class-name">Date</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            myChart<span class="token punctuation">.</span><span class="token function">setOption</span><span class="token punctuation">(</span>option<span class="token punctuation">,</span> <span class="token boolean">true</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">var</span> endTime <span class="token operator">=</span> <span class="token operator">+</span><span class="token keyword">new</span> <span class="token class-name">Date</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">var</span> updateTime <span class="token operator">=</span> endTime <span class="token operator">-</span> startTime<span class="token punctuation">;</span>
            console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'Time used:'</span><span class="token punctuation">,</span> updateTime<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">)</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>option <span class="token operator">&&</span> <span class="token keyword">typeof</span> option <span class="token operator">===</span> <span class="token string">'object'</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            myChart<span class="token punctuation">.</span><span class="token function">setOption</span><span class="token punctuation">(</span>option<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>script</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>body</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>html</span><span class="token punctuation">></span></span>
</code></pre> 
  <h3>最终结果</h3> 
  <p><a href="http://img.e-com-net.com/image/info8/fa4de512685a4002b1890b734ae2e6eb.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/fa4de512685a4002b1890b734ae2e6eb.jpg" alt="SpringBoot+Thymleaf+Python+Echarts+Neo4j实现知识图谱可视化_第5张图片" width="650" height="291" style="border:1px solid black;"></a><br> 完成了毕业设计的一小部分,记录一下,小有收获!</p> 
 </div> 
</div>
                            </div>
                        </div>
                    </div>
                    <!--PC和WAP自适应版-->
                    <div id="SOHUCS" sid="1598570724845453312"></div>
                    <script type="text/javascript" src="/views/front/js/chanyan.js"></script>
                    <!-- 文章页-底部 动态广告位 -->
                    <div class="youdao-fixed-ad" id="detail_ad_bottom"></div>
                </div>
                <div class="col-md-3">
                    <div class="row" id="ad">
                        <!-- 文章页-右侧1 动态广告位 -->
                        <div id="right-1" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_1"> </div>
                        </div>
                        <!-- 文章页-右侧2 动态广告位 -->
                        <div id="right-2" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_2"></div>
                        </div>
                        <!-- 文章页-右侧3 动态广告位 -->
                        <div id="right-3" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_3"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <h4 class="pt20 mb15 mt0 border-top">你可能感兴趣的:(python,spring,echarts,数据库,大数据)</h4>
        <div id="paradigm-article-related">
            <div class="recommend-post mb30">
                <ul class="widget-links">
                    <li><a href="/article/1835511912843014144.htm"
                           title="理解Gunicorn:Python WSGI服务器的基石" target="_blank">理解Gunicorn:Python WSGI服务器的基石</a>
                        <span class="text-muted">范范0825</span>
<a class="tag" taget="_blank" href="/search/ipython/1.htm">ipython</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a>
                        <div>理解Gunicorn:PythonWSGI服务器的基石介绍Gunicorn,全称GreenUnicorn,是一个为PythonWSGI(WebServerGatewayInterface)应用设计的高效、轻量级HTTP服务器。作为PythonWeb应用部署的常用工具,Gunicorn以其高性能和易用性著称。本文将介绍Gunicorn的基本概念、安装和配置,帮助初学者快速上手。1.什么是Gunico</div>
                    </li>
                    <li><a href="/article/1835506869838376960.htm"
                           title="Python数据分析与可视化实战指南" target="_blank">Python数据分析与可视化实战指南</a>
                        <span class="text-muted">William数据分析</span>
<a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE/1.htm">数据</a>
                        <div>在数据驱动的时代,Python因其简洁的语法、强大的库生态系统以及活跃的社区,成为了数据分析与可视化的首选语言。本文将通过一个详细的案例,带领大家学习如何使用Python进行数据分析,并通过可视化来直观呈现分析结果。一、环境准备1.1安装必要库在开始数据分析和可视化之前,我们需要安装一些常用的库。主要包括pandas、numpy、matplotlib和seaborn等。这些库分别用于数据处理、数学</div>
                    </li>
                    <li><a href="/article/1835505858939809792.htm"
                           title="python os.environ" target="_blank">python os.environ</a>
                        <span class="text-muted">江湖偌大</span>
<a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0/1.htm">深度学习</a>
                        <div>os.environ['TF_CPP_MIN_LOG_LEVEL']='0'#默认值,输出所有信息os.environ['TF_CPP_MIN_LOG_LEVEL']='1'#屏蔽通知信息(INFO)os.environ['TF_CPP_MIN_LOG_LEVEL']='2'#屏蔽通知信息和警告信息(INFO\WARNING)os.environ['TF_CPP_MIN_LOG_LEVEL']='</div>
                    </li>
                    <li><a href="/article/1835505606245576704.htm"
                           title="Python中os.environ基本介绍及使用方法" target="_blank">Python中os.environ基本介绍及使用方法</a>
                        <span class="text-muted">鹤冲天Pro</span>
<a class="tag" taget="_blank" href="/search/%23/1.htm">#</a><a class="tag" taget="_blank" href="/search/Python/1.htm">Python</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a>
                        <div>文章目录python中os.environos.environ简介os.environ进行环境变量的增删改查python中os.environ的使用详解1.简介2.key字段详解2.1常见key字段3.os.environ.get()用法4.环境变量的增删改查和判断是否存在4.1新增环境变量4.2更新环境变量4.3获取环境变量4.4删除环境变量4.5判断环境变量是否存在python中os.envi</div>
                    </li>
                    <li><a href="/article/1835505226933694464.htm"
                           title="Pyecharts数据可视化大屏:打造沉浸式数据分析体验" target="_blank">Pyecharts数据可视化大屏:打造沉浸式数据分析体验</a>
                        <span class="text-muted">我的运维人生</span>
<a class="tag" taget="_blank" href="/search/%E4%BF%A1%E6%81%AF%E5%8F%AF%E8%A7%86%E5%8C%96/1.htm">信息可视化</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90/1.htm">数据分析</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E6%8C%96%E6%8E%98/1.htm">数据挖掘</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4%E5%BC%80%E5%8F%91/1.htm">运维开发</a><a class="tag" taget="_blank" href="/search/%E6%8A%80%E6%9C%AF%E5%85%B1%E4%BA%AB/1.htm">技术共享</a>
                        <div>Pyecharts数据可视化大屏:打造沉浸式数据分析体验在当今这个数据驱动的时代,如何将海量数据以直观、生动的方式展现出来,成为了数据分析师和企业决策者关注的焦点。Pyecharts,作为一款基于Python的开源数据可视化库,凭借其丰富的图表类型、灵活的配置选项以及高度的定制化能力,成为了构建数据可视化大屏的理想选择。本文将深入探讨如何利用Pyecharts打造数据可视化大屏,并通过实际代码案例</div>
                    </li>
                    <li><a href="/article/1835504217729626112.htm"
                           title="Python教程:一文了解使用Python处理XPath" target="_blank">Python教程:一文了解使用Python处理XPath</a>
                        <span class="text-muted">旦莫</span>
<a class="tag" taget="_blank" href="/search/Python%E8%BF%9B%E9%98%B6/1.htm">Python进阶</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a>
                        <div>目录1.环境准备1.1安装lxml1.2验证安装2.XPath基础2.1什么是XPath?2.2XPath语法2.3示例XML文档3.使用lxml解析XML3.1解析XML文档3.2查看解析结果4.XPath查询4.1基本路径查询4.2使用属性查询4.3查询多个节点5.XPath的高级用法5.1使用逻辑运算符5.2使用函数6.实战案例6.1从网页抓取数据6.1.1安装Requests库6.1.2代</div>
                    </li>
                    <li><a href="/article/1835504218178416640.htm"
                           title="Google earth studio 简介" target="_blank">Google earth studio 简介</a>
                        <span class="text-muted">陟彼高冈yu</span>
<a class="tag" taget="_blank" href="/search/%E6%97%85%E6%B8%B8/1.htm">旅游</a>
                        <div>GoogleEarthStudio是一个基于Web的动画工具,专为创作使用GoogleEarth数据的动画和视频而设计。它利用了GoogleEarth强大的三维地图和卫星影像数据库,使用户能够轻松地创建逼真的地球动画、航拍视频和动态地图可视化。网址为https://www.google.com/earth/studio/。GoogleEarthStudio是一个基于Web的动画工具,专为创作使用G</div>
                    </li>
                    <li><a href="/article/1835503965563875328.htm"
                           title="python os.environ_python os.environ 读取和设置环境变量" target="_blank">python os.environ_python os.environ 读取和设置环境变量</a>
                        <span class="text-muted">weixin_39605414</span>
<a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/os.environ/1.htm">os.environ</a>
                        <div>>>>importos>>>os.environ.keys()['LC_NUMERIC','GOPATH','GOROOT','GOBIN','LESSOPEN','SSH_CLIENT','LOGNAME','USER','HOME','LC_PAPER','PATH','DISPLAY','LANG','TERM','SHELL','J2REDIR','LC_MONETARY','QT_QPA</div>
                    </li>
                    <li><a href="/article/1835501821569888256.htm"
                           title="关于提高复杂业务逻辑代码可读性的思考" target="_blank">关于提高复杂业务逻辑代码可读性的思考</a>
                        <span class="text-muted">编程经验分享</span>
<a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E7%BB%8F%E9%AA%8C/1.htm">开发经验</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a>
                        <div>目录前言需求场景常规写法拆分方法领域对象总结前言实际工作中大部分时间都是在写业务逻辑,一般都是三层架构,表示层(Controller)接收客户端请求,并对入参做检验,业务逻辑层(Service)负责处理业务逻辑,一般开发都是在这一层中写具体的业务逻辑。数据访问层(Dao)是直接和数据库交互的,用于查数据给业务逻辑层,或者是将业务逻辑层处理后的数据写入数据库。简单的增删改查接口不用多说,基本上写好一</div>
                    </li>
                    <li><a href="/article/1835499681732456448.htm"
                           title="SQL Server_查询某一数据库中的所有表的内容" target="_blank">SQL Server_查询某一数据库中的所有表的内容</a>
                        <span class="text-muted">qq_42772833</span>
<a class="tag" taget="_blank" href="/search/SQL/1.htm">SQL</a><a class="tag" taget="_blank" href="/search/Server/1.htm">Server</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a><a class="tag" taget="_blank" href="/search/sqlserver/1.htm">sqlserver</a>
                        <div>1.查看所有表的表名要列出CrabFarmDB数据库中的所有表(名),可以使用以下SQL语句:USECrabFarmDB;--切换到目标数据库GOSELECTTABLE_NAMEFROMINFORMATION_SCHEMA.TABLESWHERETABLE_TYPE='BASETABLE';对这段SQL脚本的解释:SELECTTABLE_NAME:这个语句的作用是从查询结果中选择TABLE_NAM</div>
                    </li>
                    <li><a href="/article/1835497664922349568.htm"
                           title="使用Faiss进行高效相似度搜索" target="_blank">使用Faiss进行高效相似度搜索</a>
                        <span class="text-muted">llzwxh888</span>
<a class="tag" taget="_blank" href="/search/faiss/1.htm">faiss</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a>
                        <div>在现代AI应用中,快速和高效的相似度搜索是至关重要的。Faiss(FacebookAISimilaritySearch)是一个专门用于快速相似度搜索和聚类的库,特别适用于高维向量。本文将介绍如何使用Faiss来进行相似度搜索,并结合Python代码演示其基本用法。什么是Faiss?Faiss是一个由FacebookAIResearch团队开发的开源库,主要用于高维向量的相似性搜索和聚类。Faiss</div>
                    </li>
                    <li><a href="/article/1835497665853485056.htm"
                           title="python是什么意思中文-在python中%是什么意思" target="_blank">python是什么意思中文-在python中%是什么意思</a>
                        <span class="text-muted">编程大乐趣</span>

                        <div>Python中%有两种:1、数值运算:%代表取模,返回除法的余数。如:>>>7%212、%操作符(字符串格式化,stringformatting),说明如下:%[(name)][flags][width].[precision]typecode(name)为命名flags可以有+,-,''或0。+表示右对齐。-表示左对齐。''为一个空格,表示在正数的左侧填充一个空格,从而与负数对齐。0表示使用0填</div>
                    </li>
                    <li><a href="/article/1835497411179540480.htm"
                           title="深入理解 MultiQueryRetriever:提升向量数据库检索效果的强大工具" target="_blank">深入理解 MultiQueryRetriever:提升向量数据库检索效果的强大工具</a>
                        <span class="text-muted">nseejrukjhad</span>
<a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a>
                        <div>深入理解MultiQueryRetriever:提升向量数据库检索效果的强大工具引言在人工智能和自然语言处理领域,高效准确的信息检索一直是一个关键挑战。传统的基于距离的向量数据库检索方法虽然广泛应用,但仍存在一些局限性。本文将介绍一种创新的解决方案:MultiQueryRetriever,它通过自动生成多个查询视角来增强检索效果,提高结果的相关性和多样性。MultiQueryRetriever的工</div>
                    </li>
                    <li><a href="/article/1835495644123459584.htm"
                           title="Day1笔记-Python简介&标识符和关键字&输入输出" target="_blank">Day1笔记-Python简介&标识符和关键字&输入输出</a>
                        <span class="text-muted">~在杰难逃~</span>
<a class="tag" taget="_blank" href="/search/Python/1.htm">Python</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a><a class="tag" taget="_blank" href="/search/%E5%A4%A7%E6%95%B0%E6%8D%AE/1.htm">大数据</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90/1.htm">数据分析</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E6%8C%96%E6%8E%98/1.htm">数据挖掘</a>
                        <div>大家好,从今天开始呢,杰哥开展一个新的专栏,当然,数据分析部分也会不定时更新的,这个新的专栏主要是讲解一些Python的基础语法和知识,帮助0基础的小伙伴入门和学习Python,感兴趣的小伙伴可以开始认真学习啦!一、Python简介【了解】1.计算机工作原理编程语言就是用来定义计算机程序的形式语言。我们通过编程语言来编写程序代码,再通过语言处理程序执行向计算机发送指令,让计算机完成对应的工作,编程</div>
                    </li>
                    <li><a href="/article/1835495517774245888.htm"
                           title="python八股文面试题分享及解析(1)" target="_blank">python八股文面试题分享及解析(1)</a>
                        <span class="text-muted">Shawn________</span>
<a class="tag" taget="_blank" href="/search/python/1.htm">python</a>
                        <div>#1.'''a=1b=2不用中间变量交换a和b'''#1.a=1b=2a,b=b,aprint(a)print(b)结果:21#2.ll=[]foriinrange(3):ll.append({'num':i})print(11)结果:#[{'num':0},{'num':1},{'num':2}]#3.kk=[]a={'num':0}foriinrange(3):#0,12#可变类型,不仅仅改变</div>
                    </li>
                    <li><a href="/article/1835493753557708800.htm"
                           title="每日算法&面试题,大厂特训二十八天——第二十天(树)" target="_blank">每日算法&面试题,大厂特训二十八天——第二十天(树)</a>
                        <span class="text-muted">肥学</span>
<a class="tag" taget="_blank" href="/search/%E2%9A%A1%E7%AE%97%E6%B3%95%E9%A2%98%E2%9A%A1%E9%9D%A2%E8%AF%95%E9%A2%98%E6%AF%8F%E6%97%A5%E7%B2%BE%E8%BF%9B/1.htm">⚡算法题⚡面试题每日精进</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95/1.htm">算法</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/1.htm">数据结构</a>
                        <div>目录标题导读算法特训二十八天面试题点击直接资料领取导读肥友们为了更好的去帮助新同学适应算法和面试题,最近我们开始进行专项突击一步一步来。上一期我们完成了动态规划二十一天现在我们进行下一项对各类算法进行二十八天的一个小总结。还在等什么快来一起肥学进行二十八天挑战吧!!特别介绍小白练手专栏,适合刚入手的新人欢迎订阅编程小白进阶python有趣练手项目里面包括了像《机器人尬聊》《恶搞程序》这样的有趣文章</div>
                    </li>
                    <li><a href="/article/1835493626688401408.htm"
                           title="Python快速入门 —— 第三节:类与对象" target="_blank">Python快速入门 —— 第三节:类与对象</a>
                        <span class="text-muted">孤华暗香</span>
<a class="tag" taget="_blank" href="/search/Python%E5%BF%AB%E9%80%9F%E5%85%A5%E9%97%A8/1.htm">Python快速入门</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a>
                        <div>第三节:类与对象目标:了解面向对象编程的基础概念,并学会如何定义类和创建对象。内容:类与对象:定义类:class关键字。类的构造函数:__init__()。类的属性和方法。对象的创建与使用。示例:classStudent:def__init__(self,name,age,major):self.name&#</div>
                    </li>
                    <li><a href="/article/1835493374514262016.htm"
                           title="MongoDB Oplog 窗口" target="_blank">MongoDB Oplog 窗口</a>
                        <span class="text-muted">喝醉酒的小白</span>
<a class="tag" taget="_blank" href="/search/MongoDB/1.htm">MongoDB</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a>
                        <div>在MongoDB中,oplog(操作日志)是一个特殊的日志系统,用于记录对数据库的所有写操作。oplog允许副本集成员(通常是从节点)应用主节点上已经执行的操作,从而保持数据的一致性。它是MongoDB副本集实现数据复制的基础。MongoDBOplog窗口oplog窗口是指在MongoDB副本集中,从节点可以用来同步数据的时间范围。这个窗口通常由以下因素决定:Oplog大小:oplog的大小是有限</div>
                    </li>
                    <li><a href="/article/1835492869062881280.htm"
                           title="pyecharts——绘制柱形图折线图" target="_blank">pyecharts——绘制柱形图折线图</a>
                        <span class="text-muted">2224070247</span>
<a class="tag" taget="_blank" href="/search/%E4%BF%A1%E6%81%AF%E5%8F%AF%E8%A7%86%E5%8C%96/1.htm">信息可视化</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%8F%AF%E8%A7%86%E5%8C%96/1.htm">数据可视化</a>
                        <div>一、pyecharts概述自2013年6月百度EFE(ExcellentFrontEnd)数据可视化团队研发的ECharts1.0发布到GitHub网站以来,ECharts一直备受业界权威的关注并获得广泛好评,成为目前成熟且流行的数据可视化图表工具,被应用到诸多数据可视化的开发领域。Python作为数据分析领域最受欢迎的语言,也加入ECharts的使用行列,并研发出方便Python开发者使用的数据</div>
                    </li>
                    <li><a href="/article/1835491859351302144.htm"
                           title="Python 实现图片裁剪(附代码) | Python工具" target="_blank">Python 实现图片裁剪(附代码) | Python工具</a>
                        <span class="text-muted">剑客阿良_ALiang</span>

                        <div>前言本文提供将图片按照自定义尺寸进行裁剪的工具方法,一如既往的实用主义。环境依赖ffmpeg环境安装,可以参考我的另一篇文章:windowsffmpeg安装部署_阿良的博客-CSDN博客本文主要使用到的不是ffmpeg,而是ffprobe也在上面这篇文章中的zip包中。ffmpy安装:pipinstallffmpy-ihttps://pypi.douban.com/simple代码不废话了,上代码</div>
                    </li>
                    <li><a href="/article/1835491353451130880.htm"
                           title="【华为OD技术面试真题 - 技术面】- python八股文真题题库(4)" target="_blank">【华为OD技术面试真题 - 技术面】- python八股文真题题库(4)</a>
                        <span class="text-muted">算法大师</span>
<a class="tag" taget="_blank" href="/search/%E5%8D%8E%E4%B8%BAod/1.htm">华为od</a><a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95/1.htm">面试</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a>
                        <div>华为OD面试真题精选专栏:华为OD面试真题精选目录:2024华为OD面试手撕代码真题目录以及八股文真题目录文章目录华为OD面试真题精选**1.Python中的`with`**用途和功能自动资源管理示例:文件操作上下文管理协议示例代码工作流程解析优点2.\_\_new\_\_和**\_\_init\_\_**区别__new____init__区别总结3.**切片(Slicing)操作**基本切片语法</div>
                    </li>
                    <li><a href="/article/1835490974911000576.htm"
                           title="python os 环境变量" target="_blank">python os 环境变量</a>
                        <span class="text-muted">CV矿工</span>
<a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a><a class="tag" taget="_blank" href="/search/numpy/1.htm">numpy</a>
                        <div>环境变量:环境变量是程序和操作系统之间的通信方式。有些字符不宜明文写进代码里,比如数据库密码,个人账户密码,如果写进自己本机的环境变量里,程序用的时候通过os.environ.get()取出来就行了。os.environ是一个环境变量的字典。环境变量的相关操作importos"""设置/修改环境变量:os.environ[‘环境变量名称’]=‘环境变量值’#其中key和value均为string类</div>
                    </li>
                    <li><a href="/article/1835490471032483840.htm"
                           title="高级 ECharts 技巧:自定义图表主题与样式" target="_blank">高级 ECharts 技巧:自定义图表主题与样式</a>
                        <span class="text-muted">SnowMan1993</span>
<a class="tag" taget="_blank" href="/search/echarts/1.htm">echarts</a><a class="tag" taget="_blank" href="/search/%E4%BF%A1%E6%81%AF%E5%8F%AF%E8%A7%86%E5%8C%96/1.htm">信息可视化</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90/1.htm">数据分析</a>
                        <div>ECharts是一个强大的数据可视化库,提供了多种内置主题和样式,但你也可以根据项目的设计需求,自定义图表的主题与样式。本文将介绍如何使用ECharts自定义图表主题,以提升数据可视化的吸引力和一致性。1.什么是ECharts主题?ECharts的主题是指定义图表样式的配置项,包括颜色、字体、线条样式等。通过预设主题,你可以快速更改图表的整体风格,而自定义主题则允许你在此基础上进行个性化设置。2.</div>
                    </li>
                    <li><a href="/article/1835490218845761536.htm"
                           title="Python爬虫解析工具之xpath使用详解" target="_blank">Python爬虫解析工具之xpath使用详解</a>
                        <span class="text-muted">eqa11</span>
<a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E7%88%AC%E8%99%AB/1.htm">爬虫</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a>
                        <div>文章目录Python爬虫解析工具之xpath使用详解一、引言二、环境准备1、插件安装2、依赖库安装三、xpath语法详解1、路径表达式2、通配符3、谓语4、常用函数四、xpath在Python代码中的使用1、文档树的创建2、使用xpath表达式3、获取元素内容和属性五、总结Python爬虫解析工具之xpath使用详解一、引言在Python爬虫开发中,数据提取是一个至关重要的环节。xpath作为一门</div>
                    </li>
                    <li><a href="/article/1835489460372992000.htm"
                           title="【PG】常见数据库、表属性设置" target="_blank">【PG】常见数据库、表属性设置</a>
                        <span class="text-muted">江无羡</span>
<a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a>
                        <div>PG的常见属性配置方法数据库复制、备份相关表的复制标识单表操作批量表操作链接数据库复制、备份相关表的复制标识单表操作通过ALTER语句单独更改一张表的复制标识。ALTERTABLE[tablename]REPLICAIDENTITYFULL;批量表操作通过代码块的方式,对某个schema中的所有表一起更新其复制标识。SELECTtablename,CASErelreplidentWHEN'd'TH</div>
                    </li>
                    <li><a href="/article/1835483915071090688.htm"
                           title="【华为OD技术面试真题 - 技术面】- python八股文真题题库(1)" target="_blank">【华为OD技术面试真题 - 技术面】- python八股文真题题库(1)</a>
                        <span class="text-muted">算法大师</span>
<a class="tag" taget="_blank" href="/search/%E5%8D%8E%E4%B8%BAod/1.htm">华为od</a><a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95/1.htm">面试</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a>
                        <div>华为OD面试真题精选专栏:华为OD面试真题精选目录:2024华为OD面试手撕代码真题目录以及八股文真题目录文章目录华为OD面试真题精选1.数据预处理流程数据预处理的主要步骤工具和库2.介绍线性回归、逻辑回归模型线性回归(LinearRegression)模型形式:关键点:逻辑回归(LogisticRegression)模型形式:关键点:参数估计与评估:3.python浅拷贝及深拷贝浅拷贝(Shal</div>
                    </li>
                    <li><a href="/article/1835483159630802944.htm"
                           title="nosql数据库技术与应用知识点" target="_blank">nosql数据库技术与应用知识点</a>
                        <span class="text-muted">皆过客,揽星河</span>
<a class="tag" taget="_blank" href="/search/NoSQL/1.htm">NoSQL</a><a class="tag" taget="_blank" href="/search/nosql/1.htm">nosql</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a><a class="tag" taget="_blank" href="/search/%E5%A4%A7%E6%95%B0%E6%8D%AE/1.htm">大数据</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90/1.htm">数据分析</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/1.htm">数据结构</a><a class="tag" taget="_blank" href="/search/%E9%9D%9E%E5%85%B3%E7%B3%BB%E5%9E%8B%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">非关系型数据库</a>
                        <div>Nosql知识回顾大数据处理流程数据采集(flume、爬虫、传感器)数据存储(本门课程NoSQL所处的阶段)Hdfs、MongoDB、HBase等数据清洗(入仓)Hive等数据处理、分析(Spark、Flink等)数据可视化数据挖掘、机器学习应用(Python、SparkMLlib等)大数据时代存储的挑战(三高)高并发(同一时间很多人访问)高扩展(要求随时根据需求扩展存储)高效率(要求读写速度快)</div>
                    </li>
                    <li><a href="/article/1835481269690003456.htm"
                           title="《Python数据分析实战终极指南》" target="_blank">《Python数据分析实战终极指南》</a>
                        <span class="text-muted">xjt921122</span>
<a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90/1.htm">数据分析</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a>
                        <div>对于分析师来说,大家在学习Python数据分析的路上,多多少少都遇到过很多大坑**,有关于技能和思维的**:Excel已经没办法处理现有的数据量了,应该学Python吗?找了一大堆Python和Pandas的资料来学习,为什么自己动手就懵了?跟着比赛类公开数据分析案例练了很久,为什么当自己面对数据需求还是只会数据处理而没有分析思路?学了对比、细分、聚类分析,也会用PEST、波特五力这类分析法,为啥</div>
                    </li>
                    <li><a href="/article/1835479758033481728.htm"
                           title="SpringBlade dict-biz/list 接口 SQL 注入漏洞" target="_blank">SpringBlade dict-biz/list 接口 SQL 注入漏洞</a>
                        <span class="text-muted">文章永久免费只为良心</span>
<a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a>
                        <div>SpringBladedict-biz/list接口SQL注入漏洞POC:构造请求包查看返回包你的网址/api/blade-system/dict-biz/list?updatexml(1,concat(0x7e,md5(1),0x7e),1)=1漏洞概述在SpringBlade框架中,如果dict-biz/list接口的后台处理逻辑没有正确地对用户输入进行过滤或参数化查询(PreparedSta</div>
                    </li>
                    <li><a href="/article/1835477614848995328.htm"
                           title="insert into select 主键自增_mybatis拦截器实现主键自动生成" target="_blank">insert into select 主键自增_mybatis拦截器实现主键自动生成</a>
                        <span class="text-muted">weixin_39521651</span>
<a class="tag" taget="_blank" href="/search/insert/1.htm">insert</a><a class="tag" taget="_blank" href="/search/into/1.htm">into</a><a class="tag" taget="_blank" href="/search/select/1.htm">select</a><a class="tag" taget="_blank" href="/search/%E4%B8%BB%E9%94%AE%E8%87%AA%E5%A2%9E/1.htm">主键自增</a><a class="tag" taget="_blank" href="/search/mybatis/1.htm">mybatis</a><a class="tag" taget="_blank" href="/search/delete%E8%BF%94%E5%9B%9E%E5%80%BC/1.htm">delete返回值</a><a class="tag" taget="_blank" href="/search/mybatis/1.htm">mybatis</a><a class="tag" taget="_blank" href="/search/insert%E8%BF%94%E5%9B%9E%E4%B8%BB%E9%94%AE/1.htm">insert返回主键</a><a class="tag" taget="_blank" href="/search/mybatis/1.htm">mybatis</a><a class="tag" taget="_blank" href="/search/insert%E8%BF%94%E5%9B%9E%E5%AF%B9%E8%B1%A1/1.htm">insert返回对象</a><a class="tag" taget="_blank" href="/search/mybatis/1.htm">mybatis</a><a class="tag" taget="_blank" href="/search/plus/1.htm">plus</a><a class="tag" taget="_blank" href="/search/insert%E8%BF%94%E5%9B%9E%E4%B8%BB%E9%94%AE/1.htm">insert返回主键</a><a class="tag" taget="_blank" href="/search/mybatis/1.htm">mybatis</a><a class="tag" taget="_blank" href="/search/plus/1.htm">plus</a><a class="tag" taget="_blank" href="/search/%E6%8F%92%E5%85%A5%E7%94%9F%E6%88%90id/1.htm">插入生成id</a>
                        <div>前言前阵子和朋友聊天,他说他们项目有个需求,要实现主键自动生成,不想每次新增的时候,都手动设置主键。于是我就问他,那你们数据库表设置主键自动递增不就得了。他的回答是他们项目目前的id都是采用雪花算法来生成,因此为了项目稳定性,不会切换id的生成方式。朋友问我有没有什么实现思路,他们公司的orm框架是mybatis,我就建议他说,不然让你老大把mybatis切换成mybatis-plus。mybat</div>
                    </li>
                                <li><a href="/article/118.htm"
                                       title="异常的核心类Throwable" target="_blank">异常的核心类Throwable</a>
                                    <span class="text-muted">无量</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E6%BA%90%E7%A0%81/1.htm">源码</a><a class="tag" taget="_blank" href="/search/%E5%BC%82%E5%B8%B8%E5%A4%84%E7%90%86/1.htm">异常处理</a><a class="tag" taget="_blank" href="/search/exception/1.htm">exception</a>
                                    <div>java异常的核心是Throwable,其他的如Error和Exception都是继承的这个类 里面有个核心参数是detailMessage,记录异常信息,getMessage核心方法,获取这个参数的值,我们可以自己定义自己的异常类,去继承这个Exception就可以了,方法基本上,用父类的构造方法就OK,所以这么看异常是不是很easy 
 
 
 
package com.natsu;


</div>
                                </li>
                                <li><a href="/article/245.htm"
                                       title="mongoDB 游标(cursor) 实现分页 迭代" target="_blank">mongoDB 游标(cursor) 实现分页 迭代</a>
                                    <span class="text-muted">开窍的石头</span>
<a class="tag" taget="_blank" href="/search/mongodb/1.htm">mongodb</a>
                                    <div>上篇中我们讲了mongoDB 中的查询函数,现在我们讲mongo中如何做分页查询 
 
     如何声明一个游标 
       var mycursor = db.user.find({_id:{$lte:5}}); 
      迭代显示游标数</div>
                                </li>
                                <li><a href="/article/372.htm"
                                       title="MySQL数据库INNODB 表损坏修复处理过程" target="_blank">MySQL数据库INNODB 表损坏修复处理过程</a>
                                    <span class="text-muted">0624chenhong</span>
<a class="tag" taget="_blank" href="/search/tomcat/1.htm">tomcat</a><a class="tag" taget="_blank" href="/search/mysql/1.htm">mysql</a>
                                    <div>最近mysql数据库经常死掉,用命令net stop mysql命令也无法停掉,关闭Tomcat的时候,出现Waiting for N instance(s) to be deallocated 信息。查了下,大概就是程序没有对数据库连接释放,导致Connection泄露了。因为用的是开元集成的平台,内部程序也不可能一下子给改掉的,就验证一下咯。启动Tomcat,用户登录系统,用netstat -</div>
                                </li>
                                <li><a href="/article/499.htm"
                                       title="剖析如何与设计人员沟通" target="_blank">剖析如何与设计人员沟通</a>
                                    <span class="text-muted">不懂事的小屁孩</span>
<a class="tag" taget="_blank" href="/search/%E5%B7%A5%E4%BD%9C/1.htm">工作</a>
                                    <div>最近做图烦死了,不停的改图,改图……。烦,倒不是因为改,而是反反复复的改,人都会死。很多需求人员不知该如何与设计人员沟通,不明白如何使设计人员知道他所要的效果,结果只能是沟通变成了扯淡,改图变成了应付。 
 
那应该如何与设计人员沟通呢? 
 
我认为设计人员与需求人员先天就存在语言障碍。对一个合格的设计人员来说,整天玩的都是点、线、面、配色,哪种构图看起来协调;哪种配色看起来合理心里跟明镜似的,</div>
                                </li>
                                <li><a href="/article/626.htm"
                                       title="qq空间刷评论工具" target="_blank">qq空间刷评论工具</a>
                                    <span class="text-muted">换个号韩国红果果</span>
<a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a>
                                    <div>

var a=document.getElementsByClassName('textinput');
					var b=[];
					for(var m=0;m<a.length;m++){
						if(a[m].getAttribute('placeholder')!=null)
							b.push(a[m])
					}
					var l</div>
                                </li>
                                <li><a href="/article/753.htm"
                                       title="S2SH整合之session" target="_blank">S2SH整合之session</a>
                                    <span class="text-muted">灵静志远</span>
<a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a><a class="tag" taget="_blank" href="/search/AOP/1.htm">AOP</a><a class="tag" taget="_blank" href="/search/struts/1.htm">struts</a><a class="tag" taget="_blank" href="/search/session/1.htm">session</a>
                                    <div>错误信息: 
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cartService': Scope 'session' is not active for the current thread; consider defining a scoped</div>
                                </li>
                                <li><a href="/article/880.htm"
                                       title="xmp标签" target="_blank">xmp标签</a>
                                    <span class="text-muted">a-john</span>
<a class="tag" taget="_blank" href="/search/%E6%A0%87%E7%AD%BE/1.htm">标签</a>
                                    <div>今天在处理数据的显示上遇到一个问题: 
var html = '<li><div class="pl-nr"><span class="user-name">' + user
           + '</span>' + text + '</div></li>';
ulComme</div>
                                </li>
                                <li><a href="/article/1007.htm"
                                       title="Ajax的常用技巧(2)---实现Web页面中的级联菜单" target="_blank">Ajax的常用技巧(2)---实现Web页面中的级联菜单</a>
                                    <span class="text-muted">aijuans</span>
<a class="tag" taget="_blank" href="/search/Ajax/1.htm">Ajax</a>
                                    <div>在网络上显示数据,往往只显示数据中的一部分信息,如文章标题,产品名称等。如果浏览器要查看所有信息,只需点击相关链接即可。在web技术中,可以采用级联菜单完成上述操作。根据用户的选择,动态展开,并显示出对应选项子菜单的内容。 在传统的web实现方式中,一般是在页面初始化时动态获取到服务端数据库中对应的所有子菜单中的信息,放置到页面中对应的位置,然后再结合CSS层叠样式表动态控制对应子菜单的显示或者隐</div>
                                </li>
                                <li><a href="/article/1134.htm"
                                       title="天-安-门,好高" target="_blank">天-安-门,好高</a>
                                    <span class="text-muted">atongyeye</span>
<a class="tag" taget="_blank" href="/search/%E6%83%85%E6%84%9F/1.htm">情感</a>
                                    <div>    我是85后,北漂一族,之前房租1100,因为租房合同到期,再续,房租就要涨150。最近网上新闻,地铁也要涨价。算了一下,涨价之后,每次坐地铁由原来2块变成6块。仅坐地铁费用,一个月就要涨200。内心苦痛。 
 
    晚上躺在床上一个人想了很久,很久。 
   
    我生在农</div>
                                </li>
                                <li><a href="/article/1261.htm"
                                       title="android 动画" target="_blank">android 动画</a>
                                    <span class="text-muted">百合不是茶</span>
<a class="tag" taget="_blank" href="/search/android/1.htm">android</a><a class="tag" taget="_blank" href="/search/%E9%80%8F%E6%98%8E%E5%BA%A6/1.htm">透明度</a><a class="tag" taget="_blank" href="/search/%E5%B9%B3%E7%A7%BB/1.htm">平移</a><a class="tag" taget="_blank" href="/search/%E7%BC%A9%E6%94%BE/1.htm">缩放</a><a class="tag" taget="_blank" href="/search/%E6%97%8B%E8%BD%AC/1.htm">旋转</a>
                                    <div>android的动画有两种  tween动画和Frame动画 
  
tween动画;,透明度,缩放,旋转,平移效果 
  
Animation   动画 
AlphaAnimation 渐变透明度 
RotateAnimation 画面旋转 
ScaleAnimation 渐变尺寸缩放 
TranslateAnimation 位置移动 
Animation</div>
                                </li>
                                <li><a href="/article/1388.htm"
                                       title="查看本机网络信息的cmd脚本" target="_blank">查看本机网络信息的cmd脚本</a>
                                    <span class="text-muted">bijian1013</span>
<a class="tag" taget="_blank" href="/search/cmd/1.htm">cmd</a>
                                    <div>@echo 您的用户名是:%USERDOMAIN%\%username%>"%userprofile%\网络参数.txt"
@echo 您的机器名是:%COMPUTERNAME%>>"%userprofile%\网络参数.txt"
@echo ___________________>>"%userprofile%\</div>
                                </li>
                                <li><a href="/article/1515.htm"
                                       title="plsql 清除登录过的用户" target="_blank">plsql 清除登录过的用户</a>
                                    <span class="text-muted">征客丶</span>
<a class="tag" taget="_blank" href="/search/plsql/1.htm">plsql</a>
                                    <div>tools---preferences----logon history---history  把你想要删除的删除 
 
 
-------------------------------------------------------------------- 
若有其他凝问或文中有错误,请及时向我指出, 
我好及时改正,同时也让我们一起进步。 
email : binary_spac</div>
                                </li>
                                <li><a href="/article/1642.htm"
                                       title="【Pig一】Pig入门" target="_blank">【Pig一】Pig入门</a>
                                    <span class="text-muted">bit1129</span>
<a class="tag" taget="_blank" href="/search/pig/1.htm">pig</a>
                                    <div>Pig安装 
1.下载pig 
  
wget http://mirror.bit.edu.cn/apache/pig/pig-0.14.0/pig-0.14.0.tar.gz 
  
2. 解压配置环境变量 
  
   如果Pig使用Map/Reduce模式,那么需要在环境变量中,配置HADOOP_HOME环境变量 
  
expor</div>
                                </li>
                                <li><a href="/article/1769.htm"
                                       title="Java 线程同步几种方式" target="_blank">Java 线程同步几种方式</a>
                                    <span class="text-muted">BlueSkator</span>
<a class="tag" taget="_blank" href="/search/volatile/1.htm">volatile</a><a class="tag" taget="_blank" href="/search/synchronized/1.htm">synchronized</a><a class="tag" taget="_blank" href="/search/ThredLocal/1.htm">ThredLocal</a><a class="tag" taget="_blank" href="/search/ReenTranLock/1.htm">ReenTranLock</a><a class="tag" taget="_blank" href="/search/Concurrent/1.htm">Concurrent</a>
                                    <div>为何要使用同步?       java允许多线程并发控制,当多个线程同时操作一个可共享的资源变量时(如数据的增删改查),        将会导致数据不准确,相互之间产生冲突,因此加入同步锁以避免在该线程没有完成操作之前,被其他线程的调用,        从而保证了该变量的唯一性和准确性。    1.同步方法&</div>
                                </li>
                                <li><a href="/article/1896.htm"
                                       title="StringUtils判断字符串是否为空的方法(转帖)" target="_blank">StringUtils判断字符串是否为空的方法(转帖)</a>
                                    <span class="text-muted">BreakingBad</span>
<a class="tag" taget="_blank" href="/search/null/1.htm">null</a><a class="tag" taget="_blank" href="/search/StringUtils/1.htm">StringUtils</a><a class="tag" taget="_blank" href="/search/%E2%80%9C%E2%80%9D/1.htm">“”</a>
                                    <div>转帖地址:http://www.cnblogs.com/shangxiaofei/p/4313111.html 
  
public static boolean isEmpty(String str)      
  判断某字符串是否为空,为空的标准是 str== 
null  
或 str.length()== 
0    </div>
                                </li>
                                <li><a href="/article/2023.htm"
                                       title="编程之美-分层遍历二叉树" target="_blank">编程之美-分层遍历二叉树</a>
                                    <span class="text-muted">bylijinnan</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/1.htm">数据结构</a><a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95/1.htm">算法</a><a class="tag" taget="_blank" href="/search/%E7%BC%96%E7%A8%8B%E4%B9%8B%E7%BE%8E/1.htm">编程之美</a>
                                    <div>

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

public class LevelTraverseBinaryTree {

    /**
     * 编程之美 分层遍历二叉树
     * 之前已经用队列实现过二叉树的层次遍历,但这次要求输出换行,因此要</div>
                                </li>
                                <li><a href="/article/2150.htm"
                                       title="jquery取值和ajax提交复习记录" target="_blank">jquery取值和ajax提交复习记录</a>
                                    <span class="text-muted">chengxuyuancsdn</span>
<a class="tag" taget="_blank" href="/search/jquery%E5%8F%96%E5%80%BC/1.htm">jquery取值</a><a class="tag" taget="_blank" href="/search/ajax%E6%8F%90%E4%BA%A4/1.htm">ajax提交</a>
                                    <div>
// 取值
	// alert($("input[name='username']").val());
	// alert($("input[name='password']").val());
	// alert($("input[name='sex']:checked").val());
	// alert($("</div>
                                </li>
                                <li><a href="/article/2277.htm"
                                       title="推荐国产工作流引擎嵌入式公式语法解析器-IK Expression" target="_blank">推荐国产工作流引擎嵌入式公式语法解析器-IK Expression</a>
                                    <span class="text-muted">comsci</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E5%BA%94%E7%94%A8%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">应用服务器</a><a class="tag" taget="_blank" href="/search/%E5%B7%A5%E4%BD%9C/1.htm">工作</a><a class="tag" taget="_blank" href="/search/Excel/1.htm">Excel</a><a class="tag" taget="_blank" href="/search/%E5%B5%8C%E5%85%A5%E5%BC%8F/1.htm">嵌入式</a>
                                    <div>这个开源软件包是国内的一位高手自行研制开发的,正如他所说的一样,我觉得它可以使一个工作流引擎上一个台阶。。。。。。欢迎大家使用,并提出意见和建议。。。 
----------转帖--------------------------------------------------- 
 IK Expression是一个开源的(OpenSource),可扩展的(Extensible),基于java语言</div>
                                </li>
                                <li><a href="/article/2404.htm"
                                       title="关于系统中使用多个PropertyPlaceholderConfigurer的配置及PropertyOverrideConfigurer" target="_blank">关于系统中使用多个PropertyPlaceholderConfigurer的配置及PropertyOverrideConfigurer</a>
                                    <span class="text-muted">daizj</span>
<a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a>
                                    <div>1、PropertyPlaceholderConfigurer 
Spring中PropertyPlaceholderConfigurer这个类,它是用来解析Java Properties属性文件值,并提供在spring配置期间替换使用属性值。接下来让我们逐渐的深入其配置。 
 
基本的使用方法是:(1) 
 
<bean id="propertyConfigurerForWZ&q</div>
                                </li>
                                <li><a href="/article/2531.htm"
                                       title="二叉树:二叉搜索树" target="_blank">二叉树:二叉搜索树</a>
                                    <span class="text-muted">dieslrae</span>
<a class="tag" taget="_blank" href="/search/%E4%BA%8C%E5%8F%89%E6%A0%91/1.htm">二叉树</a>
                                    <div>    所谓二叉树,就是一个节点最多只能有两个子节点,而二叉搜索树就是一个经典并简单的二叉树.规则是一个节点的左子节点一定比自己小,右子节点一定大于等于自己(当然也可以反过来).在树基本平衡的时候插入,搜索和删除速度都很快,时间复杂度为O(logN).但是,如果插入的是有序的数据,那效率就会变成O(N),在这个时候,树其实变成了一个链表. 
 
tree代码: 
 
</div>
                                </li>
                                <li><a href="/article/2658.htm"
                                       title="C语言字符串函数大全" target="_blank">C语言字符串函数大全</a>
                                    <span class="text-muted">dcj3sjt126com</span>
<a class="tag" taget="_blank" href="/search/c/1.htm">c</a><a class="tag" taget="_blank" href="/search/function/1.htm">function</a>
                                    <div>C语言字符串函数大全 
  
  
函数名: stpcpy 
功 能: 拷贝一个字符串到另一个 
用 法: char *stpcpy(char *destin, char *source); 
程序例: 
  
#include <stdio.h> 
#include <string.h> 
  
int main</div>
                                </li>
                                <li><a href="/article/2785.htm"
                                       title="友盟统计页面技巧" target="_blank">友盟统计页面技巧</a>
                                    <span class="text-muted">dcj3sjt126com</span>
<a class="tag" taget="_blank" href="/search/%E6%8A%80%E5%B7%A7/1.htm">技巧</a>
                                    <div>在基类调用就可以了, 基类ViewController示例代码 
-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [MobClick beginLogPageView:[NSString stringWithFormat:@"%@",self.class]];
</div>
                                </li>
                                <li><a href="/article/2912.htm"
                                       title="window下在同一台机器上安装多个版本jdk,修改环境变量不生效问题处理办法" target="_blank">window下在同一台机器上安装多个版本jdk,修改环境变量不生效问题处理办法</a>
                                    <span class="text-muted">flyvszhb</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/jdk/1.htm">jdk</a>
                                    <div>window下在同一台机器上安装多个版本jdk,修改环境变量不生效问题处理办法 
 
本机已经安装了jdk1.7,而比较早期的项目需要依赖jdk1.6,于是同时在本机安装了jdk1.6和jdk1.7. 
 安装jdk1.6前,执行java -version得到 
C:\Users\liuxiang2>java -version 
java version "1.7.0_21&quo</div>
                                </li>
                                <li><a href="/article/3039.htm"
                                       title="Java在创建子类对象的同时会不会创建父类对象" target="_blank">Java在创建子类对象的同时会不会创建父类对象</a>
                                    <span class="text-muted">happyqing</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E5%88%9B%E5%BB%BA/1.htm">创建</a><a class="tag" taget="_blank" href="/search/%E5%AD%90%E7%B1%BB%E5%AF%B9%E8%B1%A1/1.htm">子类对象</a><a class="tag" taget="_blank" href="/search/%E7%88%B6%E7%B1%BB%E5%AF%B9%E8%B1%A1/1.htm">父类对象</a>
                                    <div>  
1.在thingking in java 的第四版第六章中明确的说了,子类对象中封装了父类对象, 
  
2."When you create an object of the derived class, it contains within it a subobject of the base class. This subobject is the sam</div>
                                </li>
                                <li><a href="/article/3166.htm"
                                       title="跟我学spring3 目录贴及电子书下载" target="_blank">跟我学spring3 目录贴及电子书下载</a>
                                    <span class="text-muted">jinnianshilongnian</span>
<a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a>
                                    <div>  
  一、《跟我学spring3》电子书下载地址: 
《跟我学spring3》  (1-7 和 8-13) http://jinnianshilongnian.iteye.com/blog/pdf   
  
跟我学spring3系列 word原版 下载 
  
  二、
源代码下载  
最新依</div>
                                </li>
                                <li><a href="/article/3420.htm"
                                       title="第12章 Ajax(上)" target="_blank">第12章 Ajax(上)</a>
                                    <span class="text-muted">onestopweb</span>
<a class="tag" taget="_blank" href="/search/Ajax/1.htm">Ajax</a>
                                    <div>index.html 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/</div>
                                </li>
                                <li><a href="/article/3547.htm"
                                       title="BI and EIM 4.0 at a glance" target="_blank">BI and EIM 4.0 at a glance</a>
                                    <span class="text-muted">blueoxygen</span>
<a class="tag" taget="_blank" href="/search/BO/1.htm">BO</a>
                                    <div>http://www.sap.com/corporate-en/press.epx?PressID=14787 
  
有机会研究下EIM家族的两个新产品~~~~ 
  
New features of the 4.0 releases of BI and EIM solutions include:  
 
  Real-time in-memory computing – </div>
                                </li>
                                <li><a href="/article/3674.htm"
                                       title="Java线程中yield与join方法的区别" target="_blank">Java线程中yield与join方法的区别</a>
                                    <span class="text-muted">tomcat_oracle</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a>
                                    <div>长期以来,多线程问题颇为受到面试官的青睐。虽然我个人认为我们当中很少有人能真正获得机会开发复杂的多线程应用(在过去的七年中,我得到了一个机会),但是理解多线程对增加你的信心很有用。之前,我讨论了一个wait()和sleep()方法区别的问题,这一次,我将会讨论join()和yield()方法的区别。坦白的说,实际上我并没有用过其中任何一个方法,所以,如果你感觉有不恰当的地方,请提出讨论。 
&nb</div>
                                </li>
                                <li><a href="/article/3801.htm"
                                       title="android Manifest.xml选项" target="_blank">android Manifest.xml选项</a>
                                    <span class="text-muted">阿尔萨斯</span>
<a class="tag" taget="_blank" href="/search/Manifest/1.htm">Manifest</a>
                                    <div>结构 
继承关系 
public final class Manifest extends Objectjava.lang.Objectandroid.Manifest 
内部类 
 
 
 class Manifest.permission权限 
 class Manifest.permission_group权限组 
 构造函数 
 
public Manifest () 详细  androi</div>
                                </li>
                                <li><a href="/article/3928.htm"
                                       title="Oracle实现类split函数的方" target="_blank">Oracle实现类split函数的方</a>
                                    <span class="text-muted">zhaoshijie</span>
<a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a>
                                    <div>关键字:Oracle实现类split函数的方 
项目里需要保存结构数据,批量传到后他进行保存,为了减小数据量,子集拼装的格式,使用存储过程进行保存。保存的过程中需要对数据解析。但是oracle没有Java中split类似的函数。从网上找了一个,也补全了一下。 
 
CREATE OR REPLACE TYPE t_split_100 IS TABLE OF VARCHAR2(100); 
 
cr</div>
                                </li>
                </ul>
            </div>
        </div>
    </div>

<div>
    <div class="container">
        <div class="indexes">
            <strong>按字母分类:</strong>
            <a href="/tags/A/1.htm" target="_blank">A</a><a href="/tags/B/1.htm" target="_blank">B</a><a href="/tags/C/1.htm" target="_blank">C</a><a
                href="/tags/D/1.htm" target="_blank">D</a><a href="/tags/E/1.htm" target="_blank">E</a><a href="/tags/F/1.htm" target="_blank">F</a><a
                href="/tags/G/1.htm" target="_blank">G</a><a href="/tags/H/1.htm" target="_blank">H</a><a href="/tags/I/1.htm" target="_blank">I</a><a
                href="/tags/J/1.htm" target="_blank">J</a><a href="/tags/K/1.htm" target="_blank">K</a><a href="/tags/L/1.htm" target="_blank">L</a><a
                href="/tags/M/1.htm" target="_blank">M</a><a href="/tags/N/1.htm" target="_blank">N</a><a href="/tags/O/1.htm" target="_blank">O</a><a
                href="/tags/P/1.htm" target="_blank">P</a><a href="/tags/Q/1.htm" target="_blank">Q</a><a href="/tags/R/1.htm" target="_blank">R</a><a
                href="/tags/S/1.htm" target="_blank">S</a><a href="/tags/T/1.htm" target="_blank">T</a><a href="/tags/U/1.htm" target="_blank">U</a><a
                href="/tags/V/1.htm" target="_blank">V</a><a href="/tags/W/1.htm" target="_blank">W</a><a href="/tags/X/1.htm" target="_blank">X</a><a
                href="/tags/Y/1.htm" target="_blank">Y</a><a href="/tags/Z/1.htm" target="_blank">Z</a><a href="/tags/0/1.htm" target="_blank">其他</a>
        </div>
    </div>
</div>
<footer id="footer" class="mb30 mt30">
    <div class="container">
        <div class="footBglm">
            <a target="_blank" href="/">首页</a> -
            <a target="_blank" href="/custom/about.htm">关于我们</a> -
            <a target="_blank" href="/search/Java/1.htm">站内搜索</a> -
            <a target="_blank" href="/sitemap.txt">Sitemap</a> -
            <a target="_blank" href="/custom/delete.htm">侵权投诉</a>
        </div>
        <div class="copyright">版权所有 IT知识库 CopyRight © 2000-2050 E-COM-NET.COM , All Rights Reserved.
<!--            <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">京ICP备09083238号</a><br>-->
        </div>
    </div>
</footer>
<!-- 代码高亮 -->
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shLegacy.js"></script>
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shAutoloader.js"></script>
<link type="text/css" rel="stylesheet" href="/static/syntaxhighlighter/styles/shCoreDefault.css"/>
<script type="text/javascript" src="/static/syntaxhighlighter/src/my_start_1.js"></script>





</body>

</html>