Skip to content

Posts from the ‘Website’ Category

18

Top 21 Helpful Color Tools for Designers[转]

If you are a designer that is stumped on color variations for your project, you’re in luck. Choosing colors for your project can be a hard task. You have an idea in your head but you can only pick one. For this type of situation you should play around with different color variations. For this task we have gathered many useful color combination tools to make this process easier. Although the tools are all different, their main goal is color schemes. We found other tools, but they didn’t meet the criteria, so the tools below are the best on the web!

1. Colourlovers
01-colourlovers-1024x496

2. Colorjack
02-colorjack-1024x491

3. Colorschemedesigner
03-colorschemedesigner.-1024x491

4. Checkmycolours
04-checkmycolours-1024x496

5. Colorschemer
05-colorschemer-1024x496

6. Colorotate
06-colorotate-1024x497

7. Kuler
07-kuler-1024x497

8. Colorexplorer
08-colorexplorer-1024x496

9. Pictaculous
09-pictaculous-1024x496

10. Dasplankton
10-dasplankton-1024x497

11. Colorhunter
11-colorhunter-1024x496

12. Colorblender
12-colorblender-1024x491

13. Genopal
13-genopal-1024x491

14. Colr
14-colr-1024x496

15. Colormixers
15-colormixers-1024x496

16. Degraeve
16-degraeve-1024x496

17. Colortools
17-colortools-1024x496

18. Colormunki
18-colormunki-1024x496

19. Colorcombos
19-colorcombos-1024x496

20. Colorspire
20-colorspire-1024x496

21. Colorsontheweb
21-colorsontheweb-1024x496

30

迅雷/快车/QQ旋风地址 在线转换

源代码如下:

  1. <?php
  2. $txt1=trim($_POST['text1']);
  3. $txt2=trim($_POST['text2']);
  4. $txt3=trim($_POST['text3']);
  5. $button=$_POST['button'];
  6. ?>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  8. <html>
  9. <head>
  10. <title>迅雷和FlashGet,QQ旋风地址 在线转换工具</title>
  11. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  12. <meta content="迅雷,FlashGet,在线地址转换,ahlang.com,ahlang" name="keywords">
  13. </head>
  14. <body>
  15. <form name="form1" method="post" action="">
  16. <hr size="1">
  17. <h3>迅雷转换</h3>
  18. <P>转换地址:
  19. <input name="text1" value="<?php echo $txt1;?>" type="text" style="width:516px;" /></P>
  20. <P>转换后的:
  21. <input type="text" value="<?php
  22. if($button=="普通地址->迅雷地址") echo "thunder://".base64_encode("AA".$txt1."ZZ");
  23. if($button=="迅雷地址->普通地址") echo substr(base64_decode(str_ireplace("thunder://","",$txt1)),2,-2);
  24. ?>" style="width:516px;" /></P>
  25. <P>
  26. <input type="submit" name="button" value="普通地址->迅雷地址" />
  27. <input type="submit" name="button" value="迅雷地址->普通地址" /></P>
  28. <h3>FlashGet转换</h3>
  29. <P>FlashGet地址:
  30. <input name="text2" value="<?php echo $txt2;?>" type="text" style="width:516px;" /></P>
  31. <P>转换后 地址:
  32. <input type="text" value="<?php
  33. if($button=="普通地址->FlashGet地址") echo "flashget://".base64_encode($txt2);
  34. if($button=="FlashGet地址->普通地址") echo str_ireplace("[FLASHGET]","",base64_decode(str_ireplace("flashget://","",$txt2)));
  35. ?>" style="width:516px;" /></P>
  36. <P>
  37. <input type="submit" value="普通地址->FlashGet地址" name="button" />
  38. <input type="submit" value="FlashGet地址->普通地址" name="button" /></P>
  39. <h3>QQ旋风转换</h3>
  40. <P>QQ旋风地址:
  41. <input name="text3" value="<?php echo $txt3;?>" type="text" style="width:516px;" /></P>
  42. <P>转换后 地址:
  43. <input type="text" value="<?php
  44. if($button=="普通地址->QQ旋风") echo "qqdl://".base64_encode($txt3);
  45. if($button=="QQ旋风->普通地址") echo base64_decode(str_ireplace("qqdl://","",$txt3));
  46. ?>" style="width:516px;" /></P>
  47. <P>
  48. <input type="submit" value="普通地址->QQ旋风" name="button" />
  49. <input type="submit" value="QQ旋风->普通地址" name="button" /></P>
  50. </form>
  51. </body>
  52. </html>
2

Adobe Dreamweaver 10 : Stiletto

亲爱的 **,

我们很荣幸地邀请您参加 Stiletto 国际预发行计划。

测试版将很快发给参与人,我们期待收到您关于代号为“Stiletto”的 Adobe Dreamweaver 10 的反馈。

请在论坛上随意讨论与 Dreamweaver 有关的任何事情。我们非常感谢您能参加论坛!

请单击本邮件底部的 “Click Here to Activate Your Account” 链接(英文网站),然后执行以下操作之一:
* 如果这是您首次访问当前的 Adobe 预发行计划站点(即您在 Adobe 预发行系统中没有帐户),则在系统询问您是否有帐户时请单击“否”,然后在预发行系统上创建新的预发行用户帐户。
* 如果您在 Adobe 预发行系统中拥有帐户,则在系统询问您是否有帐户时请单击“是”,然后使用现有的预发行用户凭据登录,并加入预发行计划。

您的帐户激活后,您将有权访问 Stiletto 国际预发行计划。

请查看有关参与预发行计划的以下标准 Adobe 政策:

* 仅在您成功完成所有注册程序并签署在线预发行协议后,您才能得到批准参与 Stiletto 国际预发行计划。
* 参与 Stiletto 国际预发行计划的过程将受到预发行协议(即评估未发行软件的系列协议)规定的条款和条件的约束。请在签署系列协议之前仔细阅读。
* 本邮件中的链接还包含您的登录和密码信息,仅供您个人使用。请勿与您组织内外的任何人共享上述信息。

如果您有与 Dreamweaver 国际预发行计划或网站有关的任何问题或支持请求,请与 Silas Lepcha (slepcha@adobe.com) 联系。

感谢您的合作!我们期待您能参与 Stiletto 国际预发行计划!

顺祝商祺,

Dreamweaver 国际团队

Adobe System Incorporated

仅仅只是感慨Adobe的软件升级,一年一个版本永不落后……

到现在用的最多的还是dw8……

17
十一

页面如何实现显示随机标题

类似于Verycd的效果。

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML>
  3. <HEAD>
  4. <TITLE> New Document </TITLE>
  5. <META NAME="Generator" CONTENT="EditPlus">
  6. <META NAME="Author" CONTENT="">
  7. <META NAME="Keywords" CONTENT="">
  8. <META NAME="Description" CONTENT="">
  9. </HEAD>
  10.  
  11. <BODY>
  12. <body onload="oload()">
  13.  
  14. </body>
  15. <script type="text/javascript">
  16. function oload(){
  17. theTIT = new Array('共享世界,有你才精彩!'
  18. ,'目标愈高,志向愈可贵。'
  19. ,'生活的理想,就是为了理想的生活。'
  20. ,'每一天都是一个全新的开始。'
  21. ,'今天的执著,会造成明日的后悔。'
  22. ,'世间的活动,缺点虽多,但仍是美好的。'
  23. ,'不要浪费你的生命在你一定会后悔的地方上。'
  24. ,'人没有自由,犹如木偶。'
  25. ,'寻找本身就是一种幸福。'
  26. ,'不懂得自爱的人,是没有能力去爱别人的。'
  27. ,'如果你能像看别人缺点一样,如此准确地发现自己的缺点,那么你的生命将会不平凡。'
  28. ,'有个等待也不错。'
  29. ,'生活中的万事万物,无不可以吸收教益,无不可以成文,只要”求思之深而无不在”定能有所得益。'
  30. ,'不招人妒是庸才。'
  31. ,'精神里需要的东西,超出现实的负荷,是失败的一个原因。'
  32. ,'灵感,不过是顽强地劳动而获得的奖赏。'
  33. ,'春蚕到死丝方尽,人至期颐亦不休。一息尚存须努力,留作青年好范畴。'
  34. ,'要知道你用食指指着别人大骂时,手中另外三个指头是指着自己的。'
  35. ,'逆境中不自弃,顺境中不张扬。'
  36. ,'人家怕你,并不是一种福;人家欺你,并不是一种辱。'
  37. ,'分享互联网'
  38. ,'人生在世界是短暂的,对这短暂的人生,我们最好的报答就是工作。'
  39. ,'睡觉是为了踏实地工作,工作是为了踏实地睡觉。'
  40. ,'不是事业为了思想,而是思想为了事业。'
  41. ,'使生活变成幻想,再把幻想化为现实。'
  42. ,'来是偶然的,走是必然的。所以你必须,随缘不变,不变随缘。'
  43. ,'我们必须接受失望, 因为它是有限的,但千万不可失去希望,因为它是无穷的。'
  44. ,'羞耻心是所有品德的源泉。'
  45. ,'修行就是修正自己错误的观念。'
  46. ,'坐而论道,不如起而行动。'
  47. ,'有所成就是人生唯一的真正乐趣。'
  48. ,'你什么时候放下, 什么时候就没有烦恼。'
  49. ,'与其事过境还不时地感叹,不如用心地好好珍惜所有。'
  50. ,'一个人的价值,应该看他贡献什么,而不应当看他取得什么。'
  51. ,'忌妒别人,不会给自己增加任何的好处。忌妒别人,也不可能减少别人的成就。'
  52. ,'对人恭敬,就是在庄严你自己。','我的世界有我的真理,正义的立场由我决定。'
  53. ,'想象力比知识更重要。','你希望掌握永恒,那你必须控制现在。'
  54. ,'勇于接受别人的批评,正好可以调整自己的缺点。'
  55. ,'无事莫把闲话聊,是非往往闲话生。'
  56. ,'人生的价值,并不是用时间,而是用深度去衡量的。'
  57. ,'真正没有资格谈明天的人,是那个不懂得珍惜今天的人。'
  58. ,'超越自我。','随缘不是得过且过,因循苟且,而是尽人事听天命。'
  59. ,'只要自觉心安,东西南北都好。如有一人未度,切莫自己逃了。'
  60. ,'朋友就是另一个我。','谁给我一滴水, 我便回报他整个大海。'
  61. ,'人类最大的错误, 在于不敢承担圣人的心。'
  62. ,'一个不是我们有所求的朋友才是真正的朋友。'
  63. ,'拥有一颗无私的爱心,便拥有了一切。'
  64. ,'站在光明中看到的只是黑暗,站在黑暗中却拥有光明。'
  65. ,'你的选择是做或不做,但不做就永远不会有机会。'
  66. ,'不要在智慧中夹杂着傲慢,不要使谦虚缺乏智慧。'
  67. ,'我们确实有如是的优点, 但也要隐藏几分,这个叫做涵养。'
  68. ,'当你对自己诚实的时候,世界上没有人能够欺骗得了你。'
  69. ,'十日画一水,五日画一石。','最足以显示一个人性格的,莫过于他所嘲笑的是什么东西。'
  70. ,'和你一同笑过的人,你可能把他忘掉;但是和你一同哭过的人,你却永远不忘。'
  71. ,'沉默是诽谤最好的答复。'
  72. ,'戏言不能伤敌但能伤友。'
  73. ,'你的谦逊会使别人感到高兴。'
  74. ,'与人相处之道,在于无限的容忍。'
  75. ,'能为别人设想的人,永远不寂寞。'
  76. ,'学历代表过去,学习力掌握将来。'
  77. ,'要不得谦词是废话。'
  78. ,'自由的目的是为了为他人创造自由。'
  79. ,'人生得一知己足已,斯世当以同怀视之。'
  80. ,'广结众缘,就是不要去伤害任何一个人。'
  81. ,'人和人的心最远又最近,真诚便是中间的通道。'
  82. ,'自己不曾拥有,就快乐地欣赏别人的拥有。'
  83. ,'原谅别人,就是给自己心中留下空间,以便回旋。'
  84. ,'宁可自己去原谅原谅别人,莫让别人来原谅你。'
  85. ,'一个人如果不能从内心去原谅别人,那他就永远不会心安理得。');
  86. titID = Math.floor(Math.random()*theTIT.length);
  87. document.title = 'Life is like a dream :'+theTIT[titID]
  88. }
  89. </script>
  90.  
  91. </BODY>
  92. </HTML>
16
十一

中文域名的Punycode编码

Punycode, defined in RFC 3492, is the self-proclaimed "bootstring encoding" of Unicode strings into the limited character set permitted in host names. The encoding is used as part of IDNA, which is a system enabling the use of internationalized domain names in all languages that are supported by Unicode, where the burden of translation lies entirely with the user application (a web browser for example).

The encoding is applied separately to each component of a domain name which is not represented solely within the ASCII character set, and a reserved prefix 'xn--' is added to the translated Punycode string. For example, bücher becomes bcher-kva in Punycode, and therefore the domain name bücher.ch would be represented as xn--bcher-kva.ch in IDNA.

Encoding of non-ASCII character insertions as code numbers

Special characters are removed from the string, while at the end a sequence of codes is added, one code for each insertion of a special character; these insertions are done primarily in the order of their Unicode-values, and secondarily in the order in which they occur in the string. The code for each insertion represents the number of possibilities of inserting a special character at the given stage (that is, without regard to characters that will be inserted afterwards), before the actual insertion, where these possible insertions are again ordered primarily according to their Unicode-values, and secondarily according to position. The first possibility, denoted by the code "a", means that character 128 is inserted at the beginning of the string, or, if there has already been an insertion of a special character, that the same character is added again immediately after the previous one.

The described coding is a form of delta encoding. Special characters in a word are usually from the same language, hence often with nearby Unicode values. Thus the numbers to be used are often smaller with this method. In the case of multiple occurrences of a character it also helps that positions are counted from the previous position.

In the case of "bücher", the code "kva" is used for inserting "ü" (character 252) in "bcher". Of all possibilities of inserting a special character somewhere in "bcher", there are potentially the characters 128–251, each in six possible positions, as well as "ü" in front of the "b", which come before the actual insertion of "ü" after the "b", hence 124 × 6 + 1 = 745 possibilities.

Re-encoding of code numbers as ASCII sequences
Punycode uses generalized variable length integers to represent these values. For example, this is how "kva" is used to represent the code number 745:

A number system with little-endian ordering is used which allows variable-length codes without separate delimiters: a digit lower than a threshold value marks that it is the most-significant digit, hence the end of the number. The threshold value depends on the position in the number and also on previous insertions, to increase efficiency. Correspondingly the weights of the digits (like the third digit from the right in ordinary numbers having a weight 100) varies.

In this case a "number system" with 36 "digits" is used, with the case-insensitive 'a' through 'z' equal to the numbers 0 through 25, and '0' through '9' equal to 26 through 35. Thus "kva", corresponds to "10 21 0". The second digit has a weight of 35 instead of 36 because for three-digit numbers the first (least significant) digit is in the range b-9, "a" would mark the end of the number. Therefore "kva" represents the number 10 + 35 × 21 = 745.

For the insertion of a second special character in "bücher", the first possibility is "büücher" with code "bcher-kvaa", the second "bücüher" with code "bcher-kvab", etc. After "bücherü" with code "bcher-kvae" comes "ýbücher" with code "bcher-kvaf", etc.

To make the encoding and decoding algorithms simple, no attempt has been made to prevent some encoded values from encoding inadmissible Unicode values: however, these should be checked for and detected during decoding.

Compare an ASCII 'punycoded' URL http://xn--tdali-d8a8w.lv/ (working) and its full Unicode counterpart that does include Latvian characters with appropriate diacritics: http://tūdaliņ.lv.

Punycode is designed to work across all script systems, and to be self-optimizing by attempting to adapt to the character set ranges within the string as it operates. It is optimized for the case where the string is composed of zero or more ASCII characters and in addition characters from only one other script system, but will cope with any arbitrary Unicode string. Note that for DNS use, the domain name string is assumed to have been normalized using Nameprep and (for top-level domains) filtered against an officially registered language table before being Punycoded, and that the DNS protocol sets limits on the acceptable lengths of the output Punycode string.


在线转码链接:
CNNIC
http://www.motobit.com/util/punycode-decoder-encoder.asp
—–

27

ASP中如何访问SQL Server

介绍如何使用 ActiveX 数据对象 (ADO) 在 ASP 脚本中建立到 SQL Server 的连接,同时利用 ODBC 3.0 的连接池功能。

连接池
启用 ODBC 连接池。
有关连接池的其他信息以及有关如何启用连接池功能的说明,请单击下面的文章编号,以查看 Microsoft 知识库中相应的文章:
164221 INFO:如何在 ODBC 应用程序中启用连接池

ODBC DSN

使用“ODBC 管理器”,在安装了 Microsoft Internet Information Server (IIS) 的计算机上创建一个系统数据源名称 (DSN)。指定一次连接属性,然后在每个页面上重新使用此属性。例如,在 Global.asa 文件的“Session_OnStart”事件中,将连接属性定义为:

  1. Session("ConnectionString") =
  2. "dsn=SQLSysDSN;uid=<username>;pwd=<strong password>;DATABASE=pubs;APP=ASP Script"

确保满足下列所有条件:
• “系统 DSN”定义中没有选中“受信任连接”框。
• SQL Server 安全模式不是“Windows NT 集成”。
• 在连接属性中,uid 不为空。
否则,到 SQL Server 的连接可能会失败,并收到以下错误消息:

Microsoft OLE DB provider for ODBC Drivers error ’80004005′
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed- User:_
Reason: Not defined as a valid user of a trusted SQL Server connection.

Global.asa是否使用 Global.asa 文件是可选的。在其位置上,在此文件中创建的条目通常可以放到应用程序调用的第一页上。假定 ASP 脚本位于一个在“Internet 服务管理器”中没有定义为虚拟目录的文件夹中,而是位于另一个虚拟目录下面,那么包含 Session 变量和 DSN 定义的 Global.asa 文件就必须保留在该虚拟目录中。否则,将收到以下错误消息:
Microsoft OLE DB Provider for ODBC Drivers error ’80004005′
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified

ASP 脚本中的连接
通过打开和关闭到每个 Active Server Pages 上的数据库的连接来利用连接池。要打开该连接,请在页面的 部分中键入以下语句:

  1. <%
  2. Set OBJdbConnection = Server.CreateObject("ADODB.Connection")
  3. OBJdbConnection.Open Session("ConnectionString") %>

要关闭该连接,请直接将以下内容放到 标记后:

  1. <%
  2. OBJdbConnection.Close
  3. Set OBJdbConnection = Nothing
  4. %>

如果没有按照本文前面介绍的那样正确定义连接设置,您可能会收到以下两条错误消息:

Microsoft OLE DB Provider for ODBC Drivers error ’80004005′
[Microsoft][ODBC SQL Server Driver][DBNMPNTW]Connection broken.

- 或者 -
Microsoft OLE DB Provider for ODBC Drivers error ’80004005′
[Microsoft][ODBC SQL Server Driver]Communication link failure

此处是一个包含 Global.asa 和 Authors.asp 文件的示例应用程序。此示例应用程序将返回名为“authors”的“pubs”表中的四列和所有记录。

注意:您必须先将 UID 和 pwd = 更改为正确的值,然后才能运行此代码。请确保该 UID 具有在数据库中执行此操作所需的适当权限。

Global.asa

  1. <SCRIPT LANGUAGE=VBScript RUNAT=Server>
  2. Sub Session_OnStart
  3. Session("ConnectionString") =
  4. "DSN=SQLSysDSN;UID=<username>;PWD=<strong password>;DATABASE=pubs;APP=ASP script"
  5. Session("ConnectionTimeout") = 15
  6. Session("CommandTimeout") = 30
  7. End Sub
  8.  
  9. Sub Session_OnEnd
  10.  
  11. End Sub
  12. </SCRIPT>

Authors.asp

  1. <HTML>
  2. <HEAD>
  3. <TITLE>All Authors</TITLE>
  4. </HEAD>
  5. <BODY BGCOLOR="#FFFFFF">
  6.  
  7. <% Set OBJdbConnection = Server.CreateObject("ADODB.Connection")
  8. OBJdbConnection.ConnectionTimeout = Session("ConnectionTimeout")
  9. OBJdbConnection.CommandTimeout = Session("CommandTimeout")
  10. OBJdbConnection.Open Session("ConnectionString")
  11. Set SQLStmt = Server.CreateObject("ADODB.Command")
  12. Set RS = Server.CreateObject ("ADODB.Recordset")
  13. %>
  14.  
  15. <p>
  16. <table border="0" bordercolor="#000000">
  17. <%
  18. SQLStmt.CommandText = "select * from authors"
  19. SQLStmt.CommandType = 1
  20. Set SQLStmt.ActiveConnection = OBJdbConnection
  21. RS.Open SQLStmt
  22.  
  23. Do While Not RS.EOF
  24. %>
  25. <TR>
  26. <TD Width = 150 ALIGN=LEFT>
  27. <FONT SIZE=+1>
  28. <%= RS("au_id") %>
  29. </FONT></TD>
  30. <TD></TD>
  31. <TD Width = 150 ALIGN=LEFT>
  32. <FONT SIZE=+1>
  33. <%= RS("au_lname") %>
  34. </FONT></TD>
  35. <TD Width = 150 ALIGN=LEFT>
  36. <FONT SIZE=+1>
  37. <%= RS("au_fname") %>
  38. </FONT></TD>
  39. <TD Width = 150 ALIGN=LEFT>
  40. <FONT SIZE=+1>
  41. <%= RS("phone") %>
  42. </FONT></TD>
  43. </TR>
  44. <%
  45. RS.MoveNext
  46. Loop
  47. %>
  48. </table>
  49. <hr>
  50. <p>
  51. </BODY>
  52. <% OBJdbConnection.Close
  53. Set OBJdbConnection = Nothing
  54. %>
  55. </HTML>

适用于:
• Microsoft SQL Server 2000 标准版
• Microsoft SQL Server 7.0 标准版
• Microsoft SQL Server 6.5 标准版
• Microsoft SQL Server 6.0 标准版
• Microsoft SQL Server 4.21a 标准版
• Microsoft Internet Information Server 4.0
• Microsoft Internet Information Server 3.0
• Microsoft Internet Information Services 5.0
• Microsoft SQL Server 2005 Standard Edition
• Microsoft SQL Server 2005 Express Edition
• Microsoft SQL Server 2005 Developer Edition
• Microsoft SQL 2005 Server Enterprise
• Microsoft SQL 2005 Server Workgroup

Premium WordPress Themes
WordPress Themes