- 博客(7)
- 收藏
- 关注
原创 ThreadLocaL 源码分析
1、什么是ThreaLocalThreadLocal是JDK包提供的,它提供线程本地变量,如果创建一乐ThreadLocal变量,那么访问这个变量的每个线程都会有这个变量的一个副本,在实际多线程操作的时候,操作的是自己本地内存中的变量,从而规避了线程安全问题2、ThreadLocal demopackage com.sun.test;public class ThreadLocalTest { private static ThreadLocal<String> l
2021-07-14 22:52:28
135
原创 solr的下载与使用
一、solr的介绍Solr是一个高性能,采用Java开发,Solr基于Lucene的全文搜索服务器。同时对其进行了扩展,提供了比Lucene更为丰富的查询语言,同时实现了可配置、可扩展并对查询性能进行了优化,并且提供了一个完善的功能管理界面,是一款非常优秀的全文搜索引擎。二、配置1、下载solr.zip 官方网站:http://lucene.apache.org/solr/上图为下载solr后对应的目录,打开命令行窗口可启动solr,启动分为两种,一种...
2021-07-12 00:18:27
1763
原创 pymysql
import pymysqlimport randomif __name__ == '__main__': #1、连接数据库 db = pymysql.connect('localhost', 'root', '123456', 'wenda', charset='utf8') try: #2、创建一个游标 cursor = db.cursor() ''' sql = 'insert into questi.
2021-07-11 23:00:43
148
原创 初识python(一)
def demo_string(): stra = 'hello world"' print stra.capitalize() print stra.replace('world', 'nowcoder') strb = ' \n\rhello nowcoder \r\n ' print 0, strb print 1, strb.lstrip() print 2, strb.rstrip(), "xx" strc = 'hello..
2021-07-11 22:52:29
951
原创 Failed to load resource: the server responded with a status of 404 (Not Found)
(踩坑踩了一个小时!)background: url 下的路径问题,一般来说都是 " ../... "。在一次写前端的过程中,发现一直报Failed to load resource: the server responded with a status of 404 (Not Found)错误,但是在IDE里面Ctrl+鼠标明明点的进去啊,究竟是什么问题啊我去。1 hours later。。。后来无奈之下把js和css和images的文件放下同一目录下,发现居然可以了!!我去这又...
2021-04-23 15:43:11
256
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人