Archive for 七月, 2011

MySQL查询及删除重复记录的方法

查询及删除重复记录的方法
(一)
1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断
select * from people
where peopleId in (select  peopleId  from  people  group  by  peopleId  having  count(peopleId) > 1) (continue reading…)

1 Comment more...

How to compile PHP-Qt?

error code:

cmake ..
-- Found Qt-Version 4.5.0
CMake Error at cmake/modules/FindPHP5.cmake:139 (LIST):
  list index: 0 out of range (-0, 18446744073709551615)
Call Stack (most recent call first):
  CMakeLists.txt:13 (include)

-- /main
CMake Error at CMakeLists.txt:16 (MESSAGE):
  PHP5 could not be found!

-- Configuring incomplete, errors occurred!

(continue reading…)


background black instead of white for EPS->JPG

Part of the problem here was that your command line order is not quite right.
See here: http://www.imagemagick.org/Usage/basics/#cmdline

When you’re using “convert -colorspace RGB input.tiff output.jpg”, then it will still work, as ImageMagick will use it like that: “convert input.tiff -colorspace RGB output.jpg” But it’s better to specify it like that (first the input image, then the options, then the output image) right at the start. (continue reading…)


psd,eps,tif to jpg

  • psd: “/usr/bin/convert test1.psd[0] -profile ISOcoated_v2_eci.icc -profile eciRGB_v2.icc -resize 1000×1000 -size 1000×1000 xc:white +swap -compose over -composite -trim -colorspace RGB -quality 100 test1.jpg”
  • psd: “$imagick_path test1.psd[0] -profile ISOcoated_v2_eci.icc -profile eciRGB_v2.icc -geometry 1000×1000 -flatten -colorspace RGB -quality 100 test1.jpg”
  • eps: “$imagick_path test1.eps[0]  -density 600 -colorspace RGB -quality 100 test1.jpg”
  • tif:  “$imagick_path test1.tif[0]  -profile ISOcoated_v2_eci.icc -profile eciRGB_v2.icc -colorspace RGB  -antialias -geometry 1000×1000 -quality 100 test1.jpg”

Linux文件查找命令find,xargs详述

由于find具有强大的功能,所以它的选项也很多,其中大部分选项都值得我们花时间来了解一下。即使系统中含有网络文件系统( NFS),find命令在该文件系统中同样有效,只你具有相应的权限。 (continue reading…)


Linux查看磁盘空间命令分享

在windows下可以很方便的查看磁盘空间的。但是到了Linux查看磁盘空间,你可能就有点摸不着头脑了,呵呵。不要急,我这就要给你解决这个问题。 (continue reading…)


让网页可编辑

此JavaScript代码,可以让你实时修改任何的网页,在Firefox中,你甚至可以把修改的网页保存到起来,对于网页设计者来说,这个功能可以辅助完善页面效果。

javascript:document.body.contentEditable=’true’; document.designMode=’on’; void(0);

stopPropagation() 方法

定义和用法

不再派发事件。

终止事件在传播过程的捕获、目标处理或起泡阶段进一步传播。调用该方法后,该节点上处理该事件的处理程序将被调用,事件不再被分派到其他节点。

语法

event.stopPropagation()

说明

该方法将停止事件的传播,阻止它被分派到其他 Document 节点。在事件传播的任何阶段都可以调用它。注意,虽然该方法不能阻止同一个 Document 节点上的其他事件句柄被调用,但是它可以阻止把事件分派到其他节点。
可用于$(document).click


25个Apache性能优化技巧推荐

Apache至今仍处于web服务器领域的霸主,无人撼动,没有开发者不知道。本篇文章介绍25个Apache性能优化的技巧,如果你能理解并掌握,将让你的Apache性能有显著的提升! (continue reading…)


MySQL分数排名

方法一、自增列(速度快,但需要重写全表)

方法二、select @rank:=@rank+1 as rank  (continue reading…)

1 Comment more...

Copyright © 1996-2010 Add Lives. All rights reserved.
iDream theme by Templates Next | Powered by WordPress