首页 文章 精选 留言 我的

精选列表

搜索[定位功能],共10000篇文章
优秀的个人博客,低调大师

javascript原生代码实现页面查找功能

由于是需在多框架页面中进行搜索,所以先从搜索顺序从左—右。 <input type="button" value="搜 索" onclick="findText(txtFind.value)" style="width:70px;height:28px;font-weight: bold;"> <script language="javascript"> var rng=""; var iframe_next=""; var frame_target=window.parent.document.frames.left_iframe; //默认先搜索左框架 function findText(str){ try{ if(str==""){ alert("请输入搜索的关键字"); return; } if(rng.findText(str)){ //若找到,则反白关键字 rng.select(); rng.collapse(false); //迫使开始点移动第一个匹配的范围的结束点 }else{ //否则判断左右框架搜索跳转 if (iframe_next=="right"){ //若当前为右框架,则弹出完成对话框并准备下一步搜索左框架 alert("搜索完毕"); iframe_next="left"; frame_target=window.parent.document.frames.left_iframe; rng = frame_target.document.body.createTextRange(); }else{ //若当前为左框架,则下一步搜索右框架 iframe_next="right" frame_target=window.parent.document.frames.right_iframe; rng = frame_target.document.body.createTextRange(); findText(str); } } } catch(err){ //由于搜索框放在页面顶部,所以第一次createTextRange会出错,catch里赋值即可。 rng=window.parent.document.frames.left_iframe.document.body.createTextRange(); findText(str); } } </script> 参考资源: javascript moveStart和moveEnd方法(TextRange对象--查找与选择)http://hi.baidu.com/mascotdai/blog/item/2538030e979e56c27bcbe1f5.html 用javascript获得参数/编辑SELECT/设置光标位置/页内查找http://hi.baidu.com/jhfcjl/blog/item/4ceaafec7cadcf4878f05587.html

优秀的个人博客,低调大师

Python配置tab自动补全功能

# cat tab.py #!/usr/bin/python # python tab file import sys import readline import rlcompleter import atexit import os # tab completion readline.parse_and_bind('tab: complete') # history file histfile = os.path.join(os.environ['HOME'], '.pythonhistory') try: readline.read_history_file(histfile) except IOError: pass atexit.register(readline.write_history_file, histfile) del os, histfile, readline, rlcompleter # python Python 2.7.5 (default, Jul 13 2018, 13:06:57) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path ['', '/usr/lib64/python27.zip', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7/site-packages', '/usr/lib64/python2.7/site-packages/gtk-2.0', '/usr/lib/python2.7/site-packages'] # cp tab.py /usr/lib64/python2.7 >>> import tab >>> import sys >>> sys. sys.__class__( sys.argv sys.long_info sys.__delattr__( sys.builtin_module_names sys.maxint sys.__dict__ sys.byteorder sys.maxsize sys.__displayhook__( sys.call_tracing( sys.maxunicode sys.__doc__ sys.callstats( sys.meta_path sys.__excepthook__( sys.copyright sys.modules sys.__format__( sys.displayhook( sys.path sys.__getattribute__( sys.dont_write_bytecode sys.path_hooks sys.__hash__( sys.exc_clear( sys.path_importer_cache sys.__init__( sys.exc_info( sys.platform sys.__name__ sys.exc_type sys.prefix sys.__new__( sys.excepthook( sys.ps1 sys.__package__ sys.exec_prefix sys.ps2 sys.__reduce__( sys.executable sys.py3kwarning sys.__reduce_ex__( sys.exit( sys.pydebug sys.__repr__( sys.exitfunc( sys.setcheckinterval( sys.__setattr__( sys.flags sys.setdlopenflags( sys.__sizeof__( sys.float_info sys.setprofile( sys.__stderr__ sys.float_repr_style sys.setrecursionlimit( sys.__stdin__ sys.getcheckinterval( sys.settrace( sys.__stdout__ sys.getdefaultencoding( sys.stderr sys.__str__( sys.getdlopenflags( sys.stdin sys.__subclasshook__( sys.getfilesystemencoding( sys.stdout sys._clear_type_cache( sys.getprofile( sys.subversion sys._current_frames( sys.getrecursionlimit( sys.version sys._debugmallocstats( sys.getrefcount( sys.version_info sys._getframe( sys.getsizeof( sys.warnoptions sys._mercurial sys.gettrace( sys.api_version sys.hexversion ------------------------------------------------------------- 作者: 罗穆瑞 出处: http://www.cnblogs.com/kazihuo/ 转载请保留此段声明,且在文章页面明显位置给出原文链接,谢谢! ------------------------------------------------------------------------------ 如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,博主在此感谢! ------------------------------------------------------------------------------

优秀的个人博客,低调大师

玩转阿里云Serverless Kubernetes新功能

Serverless Kubernetes产品介绍 还记得阿里云Serverless Kubernetes五月份正式对外邀测的激动时刻吗?还记得阿里云Serverless Kubernetes与传统Kubernetes集群的区别吗?让我们再次一起了解一下Serverless Kubernetes。 阿里云Serverless Kubernetes让您无需管理和维护集群与服务器,即可快速创建 Kuberentes 容器应用,并且根据应用实际使用的 CPU 和内存资源量进行按需付费。使用 Serverless Kubernetes,您可以专注于设计和构建应用程序,而不是管理运行应用程序的基础设施。它基于阿里云弹性计算基础架构,并且完全兼容 Kuberentes API的解决方案,充分结合了虚拟化资源带来的安全性、弹性和 Kubernete

优秀的个人博客,低调大师

记录VisualSVNServer配置在线密码修改功能

VisualSVN Server使用的是64位版 查看对应的apache版本号是 2.2.32.这个版本需要使用php5.5以下的,且需要使用64位的php。 下载php 5.4 的64位版本。 php的下载地址:官网地址:http://windows.php.net/download/ http://windows.php.net/downloads/pecl/releases/ 官网从5.5开始才提供了64位的bin包下载。所以我们需要下载源代码自己编译或者找第三方编译的64位bin包 https://phpdev.toolsforresearch.com/php-5.4.36-nts-Win32-VC9-x86.zip https://phpdev.toolsforresearch.com/php-5.4.36-Win32-VC9-x86.zip https://phpdev.toolsforresearch.com/php-5.4.36-nts-Win32-VC9-x64.zip https://phpdev.toolsforresearch.com/php-5.4.36-Win32-VC9-x64.zip https://phpdev.toolsforresearch.com/php-5.3.29-nts-Win32-VC9-x86.zip https://phpdev.toolsforresearch.com/php-5.3.29-Win32-VC9-x86.zip https://phpdev.toolsforresearch.com/php-5.3.29-nts-Win32-VC9-x64.zip https://phpdev.toolsforresearch.com/php-5.3.29-Win32-VC9-x64.zip 这里我们下载 php-5.4.36-Win32-VC9-x64.zip 配置Visual SVN Server支持php 1. 将下载的php解压缩到VisualSVNServer的目录中 C:Program FilesVisualSVN Serverphp 2.修改配置文件 C:Program FilesVisualSVN Serverconfhttpd-custom.conf LoadModule php5_module "php/php5apache2_2.dll" <IfModule php5_module> AddType application/x-httpd-php .php DirectoryIndex index.html index.php </IfModule> # 配置 php.ini 的路径 PHPIniDir "php" 3.建立php脚本 我们这里主要是利用了apach自己的htpasswd.exe工具来进行密码的变更操作 可以下载一个apache的完整包提取该工具放到如下路径: C:Program FilesVisualSVN Serverbinhtpasswd.exe 新建一个 php 文件放到 C:Program FilesVisualSVN Serverhtdocspwindex.php <?php $passwdfile="C:/Repositories/htpasswd"; $htpasswdPath = "C:/Program Files/VisualSVN Server/bin/htpasswd.exe"; $username = $_SERVER["PHP_AUTH_USER"]; //经过 AuthType Basic 认证的用户名 $authed_pass = $_SERVER["PHP_AUTH_PW"]; //经过 AuthType Basic 认证的密码 $input_oldpass = (isset($_REQUEST["oldpass"]) ? $_REQUEST["oldpass"] : ""); //从界面上输入的原密码 $newpass = (isset($_REQUEST["newpass"]) ? $_REQUEST["newpass"] : ""); //界面上输入的新密码 $repeatpass = (isset($_REQUEST["repeatpass"]) ? $_REQUEST["repeatpass"] : ""); //界面上输入的重复密码 $action = (isset($_REQUEST["action"]) ? $_REQUEST["action"] : ""); //以hide方式提交到服务器的action if ($action!="modify") { $action = "view"; } else if ($authed_pass!=$input_oldpass) { $action = "oldpasswrong"; } else if (empty($newpass)) { $action = "passempty"; } else if ($newpass!=$repeatpass) { $action = "passnotsame"; } else{ $action = "modify"; } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=GBK"> <title>Subversion 在线自助密码修改</title> </head> <body> <?php //action=view 显示普通的输入信息 if ($action == "view") { ?> <script language = "javaScript"> function loginIn(myform) { var newpass=myform.newpass.value; var repeatpass=myform.repeatpass.value; if (newpass=="") { alert("请输入密码!"); return false; } if (repeatpass=="") { alert("请重复输入密码!"); return false; } if (newpass!=repeatpass) { alert("两次输入密码不一致,请重新输入!"); return false; } return true; } </script> <style type="text/css"> <!-- table { border: 1px solid #CCCCCC; background-color: #f9f9f9; text-align: center; vertical-align: middle; font-size: 9pt; line-height: 15px; } th { font-weight: bold; line-height: 20px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-bottom-style: solid; color: #333333; background-color: f6f6f6; } input{ height: 18px; } .button { height: 20px; } --> </style> <br><br><br> <form method="post"> <input type="hidden" name="action" value="modify"/> <table width="220" cellpadding="3" cellspacing="8" align="center"> <tr> <th colspan=2>Subversion 密码修改</th> </tr> <tr> <td>用 户 名:</td> <td align="left"> <?php echo $username?></td> </tr> <tr> <td>原 密 码:</td> <td><input type=password size=12 name=oldpass></td> </tr> <tr> <td>用户密码:</td> <td><input type=password size=12 name=newpass></td> </tr> <tr> <td>确认密码:</td> <td><input type=password size=12 name=repeatpass></td> </tr> <tr> <td colspan=2> <input onclick="return loginIn(this.form)" class="button" type=submit value="修 改"> <input name="reset" type=reset class="button" value="取 消"> <a href="/"><input name="return" type=button class="button" value="返 回"></a> </td> </tr> </table> </form> <?php } else if ($action == "oldpasswrong") { $msg="原密码错误!"; } else if ($action == "passempty") { $msg="请输入新密码!"; } else if ($action == "passnotsame") { $msg="两次输入密码不一致,请重新输入!"; } else { $command='"'. $htpasswdPath. '" -b '.$passwdfile." ".$username." ".$newpass; system($command, $result); if ($result==0) { $msg_succ="用户[".$username."]密码修改成功,请用新密码登陆."; } else { $msg="用户[".$username."]密码修改失败,返回值为".$result.",请和管理员联系!"; } } if (isset($msg_succ)) { ?> <script language="javaScript"> <!-- alert("<?php echo $msg_succ?>"); window.location.href="/" //--> </script> <?php } else if (isset($msg)) { ?> <script language="javaScript"> <!-- alert("<?php echo $msg?>"); window.location.href="<?php echo $_SERVER["PHP_SELF"]?>" //--> </script> <?php } ?> </body> </html> 修改C:Program FilesVisualSVN ServerWebUIindex.html 增加里面修改的链接 自助修改密码 参考 https://github.com/easonjim/VisualSVNServerTools

资源下载

更多资源
腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册