ITeye博客

alanland

alanland · 共 105 篇文章

js 获取当前页面路径

== // http://xxx/abc/def/abc.html // http://xxx/abc/def/ // -----> /abc/def alert(location.pathname.substring(0,location.pathname.lastIndexOf('/'))); location.pathname.substring(0,location.pathname.lastIndexOf('/')) == //js获取项目根路径,如: http://localhost:8083/uimcardprj function getRootPath(){ //获取当前网址…

2014-06-04 15:29 · 评论(0)

svn revert 还原整个目录

参考下面两个问答: http://stackoverflow.com/questions/8139605/does-svn-have-a-revert-all-command ----------------------------------- You could do: svn revert -R . This will not delete any new file not under version control. But you can easily write a shell script to do that like: for file in `svn status|gre…

2014-05-09 11:23 · svn · 评论(0)

连接oracle数据库出现oracle ORA-12526: TNS: 监听程序: 所有适用例程都处于受限模式

服务器被重启之后连接出错,登陆服务器 sqlplus可以连接,但是jdbc以及sqldeveloper连接报错 ORA-12526 。 网上搜索到: 今天使用PL/SQL远程连接oracle数据库出现oracle ORA-12526: TNS: 监听程序: 所有适用例程都处于受限模式。 查了下原来之前改字符集时执行了:ALTER SYSTEM ENABLE RESTRICTED SESSION; 导致受限 解决办法:使用系统管理员身份运行以下一段代码 ALTER SYSTEM DISABLE RESTRICTED SESSION;

2014-05-05 12:52 · Oracle · 评论(0)

jaspersoftstudio闪退

闪退: ## A fatal error has been detected by the JavaRuntimeEnvironment:## SIGSEGV (0xb) at pc=0x00007f41e4e610b0, pid=3463, tid=139924549404416## JRE version:7.0_09-b05 #Java VM:JavaHotSpot(TM)64-BitServer VM (23.5-b02 mixed mode linux-amd64 compressed oops)#Problematic frame:# C [libwebkitgtk-1.0.so…

2014-04-29 09:34 · 评论(0)

linux下查找包含BOM头的文件和清除BOM头命令

http://blog.sina.com.cn/s/blog_49f914ab0101eyjj.html 查找包含BOM头的文件,命令如下: grep -r -I -l $'^\xEF\xBB\xBF' ./ 这条命令会查找当前目录及子目录下所有包含BOM头的文件,并把文件名在屏幕上输出。 但是,删除BOM头,网上找到的命令大多不能用,比较常见的命令是: grep -r -I -l $'^\xEF\xBB\xBF' /path | xargs sed -i 's/^\xEF\xBB\xBF//;q' 但这条命令会把除了首行之外所有的行删除,所以毫无意义。 经测试如下命令是可行的: find …

2014-04-17 10:29 · 评论(0)

jenkins 作为 linux的启动项

文档地址: https://wiki.jenkins-ci.org/display/JENKINS/JenkinsLinuxStartupScript ---------------------------------------------------------------------------------------- This is a startup script for Linux, and provides start/stop/restart functionality. This has been tested on Ubuntu, but should work on …

2014-04-16 11:02 · jenkins · 评论(0)

jenkins 的 ProcessTreeKiller

根据下面介绍,合适的解决方案是: BUILD_ID=dontKillMe bash /home/app/opt/apache-tomcat-6.0.37/deploy-bin/deploy_test.sh ---------------- 最近用jenkins执行服务器上的脚本,启动tomcat总是不成功,问了谷哥之后,发现是下面一个特性在作怪: http://wiki.hudson-ci.org/display/HUDSON/ProcessTreeKiller This feature is available since 1.260 To reliably kill processes …

2014-04-16 10:52 · jenkins · 评论(0)

jdk7透明异形窗体

在jdk6中设置透明异形窗体的方法与jdk7方法的比较 Method in Java SE 6 Update 10 JDK 7 Equivalent AWTUtilities.isTranslucencySupported(Translucency) GraphicsDevice.isWindowTranslucencySupported(WindowTranslucency) AWTUtilities.isTranslucencyCapable(GraphicsConfiguration) GraphicsConfiguration.isTranslucencyCapable() AWTU…

2014-04-10 20:42 · Java · 评论(0)

linux 根据进程名称kill进程

: #!sh i1=`ps -ef|grep -E "Bootstrap"|grep -v grep|awk '{print $2}'` kill -9 $i1 。

2014-04-09 14:21 · 评论(0)

bash shell 获取当前正在执行脚本的绝对路径

如题,一般我们写Shell脚本的时候,都倾向使用绝对路径,这样无论脚本在什么目录执行,都应该起到相同的效果,但是有些时候,我们设计一个软件包中的工具脚本,可能使用相对路径更加灵活一点,因为你不知道用户会在哪个目录执行你的程序,就有了本文的题目。 常见的一种误区,是使用 pwd 命 令,该命令的作用是“print name of current/working directory”,这才是此命令的真实含义,当前的工作目录,这里没有任何意思说明,这个目录就是脚本存放的目录。所以,这是不对的。你可以试 试 bash shell/a.sh,a.sh 内容是 pwd,你会发现,显示的是执行命令的路径 …

2014-04-09 14:16 · 评论(0)

Processing 一些网站

http://www.openprocessing.org/ You can publish to Android and (with 3rd party tools) to iPhone using iProcessing or the faster P5Nitro You have support from the forums, quite a few books and online 'playgrounds' like OpenProcessing , SketchPatch , hascanvas or SketchPad . http://stackoverflow.com/q…

2014-04-02 11:21 · 评论(0)

JasperReport默认字体

You can try to use net.sf.jasperreports.default.font.name property. Or you can use the default style . <style name="Base" isDefault="true" ...> For more details you can read this article , the Default Fonts and Inheritance section. UPDATED: The quote from JasperReports Ultimate Guide : We strongly …

2014-03-24 17:15 · 评论(0)

查询系统默认字体

linux下: fc-match "sans" fc-match "serif" fc-match "mono" windows 左面右键,属性 。

2014-03-24 17:13 · 评论(0)

【字体区别】Serif和Sans Serif

【字体区别】Serif和Sans Serif 在西方国家罗马字母阵营中,字体分为两大种类:Sans Serif和Serif,打字机体虽然也属于Sans Serif,但由于是等宽字体,所以另外独立出Monospace这一种类,例如在Web中,表示代码时常常要使用等宽字体。 Serif的意思是,在字的笔划开始及结束的地方有额外的装饰,而且笔划的粗细会因直横的不同而有不同。相反的,Sans Serif则没有这些额外的装饰,笔划粗细大致差不多。如下图: 可 以看出,我们平时所用的Georgia、Times New Roman等就属于Serif字体,而Arial、Tahoma、Verdana等则属于 …

2014-03-24 17:11 · 评论(0)

sql同时查询出明细和汇总

做报表(ireport)时候要进行分组汇总,但是报表的汇总智能在 group footer 里面,写在group header里面没有值,于是打算从数据源里面做处理,实践出来有两种方式: 第一种: 储位 物料 数量 001 100 A 10 B 90 002 30 C 29 A 1 上面,通过两个查询union 和 order by 可以获得在每个明细之前或者之后,增加一个汇总行的结构,sql如下: select A.BILLID, SUM_QTY, ONL_NOTICE_QTY from ((SELECT BILLID, ONL_NOTICE_QTY FROM WM_OUTBOUND_NO…

2014-03-18 14:28 · 评论(0)