2007-04-30

Vincent Partington: Top 10 Java EE performance problems

Vincent Partington: Top 10 Java EE performance problems

For the last two and a half months, Vincent Partington has been blogging about the top ten Enterprise Java Application Performance Problems. The list:Now he wraps up the countdown with some conclusions about Enterprise Java performance in general:
  • First of all, Java developers should consider performance an importance quality requirement of their application to which they should pay attention from the start to the end of the project.
  • Secondly, Java developers need to work with the people that can help them improve the performance of their application like application server and database administrators.
Read more ...

在局域网内部实现MSN通讯服务 资讯中心-计世网

在局域网内部实现MSN通讯服务 资讯中心-计世网

MSNMessengerService集即时消息、网络电话、自动检查邮件等功能于一体,很受广大"网虫"的喜爱,但是您知道吗,MSNMessengerService不但可以登录到MSN的Messenge

rServer,还可以登录到局域网内的ExchangeServer呢!无需连接到Internet,您一样可以享受MSNMessengerService的强大功能!

下面笔者就如何建立局域网内部的通讯服务做详细介绍:

前提条件

网络中有一台计算机安装了MicrosoftExchangeServer2000(MicrosoftExchangeServer2000的安装方法不是本文重点,所以不做介绍了。详情请参阅: http://support.microsoft.com)

准备工作

1、一张MicrosoftExchangeServer2000安装光盘。

2、下载MSNMessengerService的最新版本( http://messenger.msn.com/lccn)。

安装与设置过程

一、添加ChatServices和InstantMessagingServices

1、将MicrosoftExchangeServer2000安装光盘放入服务器光驱,单击"ExchangeServerSetup"。

2、当出现"MicrosoftExchangeInstallation向导"时,单击"下一步"。在"Action"栏选择"Change",将ChatServices和InstantMessagingServices都选择成"Install",单击"下一步"安装向导会自动完成安装任务。

二、配置InstantMessaging

1、单击"开始",指向"程序→MicrosoftExchange",单击"SystemManager",双击"Servers",双击您的计算机名,双击" Protocols",右击"InstantMessaging(RVP)",选择"新建",单击"InstantMessagingVirtualServer",在DisplayName栏中输入配置文件名。

2、单击"下一步",在ChooseIISWebSite中选择Web站点。单击"下一步",在DN SDomainName栏中输入DNS名(例如:home.net),此DNS名将作为用户登录邮件地址@符号后面的部分。单击"下一步",在"Allowthisservertohostaccounts"前面打勾,使配置文件马上生效,配置完成后建议重新启动服务器。

三、配置用户账户

1、在"管理工具"中单击"ActiveDirectory用户和计算机",单击"Users",任意选择一个用户(例如:administrator),双击账户,在"ExchangeFeatures"选项卡中,选中"InstantMessaging"。

2、单击"Enable→Browse",在"ServerName"中选择配置文件名,单击"确定"。回到上一级选项卡。单击"确定",即完成用户账户配置。

四、安装、配置MSNMessengerService

1、将MicrosoftExchangeServer2000安装光盘放入客户机光驱;在客户机,单击"开始→运行",键入"X:INSTMSGI386CL IENTCHSMMSSETUP.EXE"(X代表您的光驱的盘符),开始安装MSNMessengerService2.2forExchange。

2、MSNMessengerService2.2forExchange安装完毕后,再安装您从网上下载的MSNMessengerService3.x。

3、安装完毕后在MSNMessengerService3.x主窗口, 单击"工具";选择"选项",在"账户"选项卡中的"首先用此账户登录"选项中选择"Exchange账户"在Exchange账户"登录名"框中输入登录名 administrator@home.net

4、单击"确定",选择"单击这里登录",即可登录到MicrosoftExchangeServer2000InstantMessagingService。

注意:您必须首先安装MSNMessengerService2.2forExchange,然后再升级到MSNMessengerService3.x才能有登录到MicrosoftExchangeServer2000InstantMessagingService的选项,否则MSNMessengerService3.x中将没有登录到MicrosoftExchangeServer2000InstantMessagingService选项 。

5、重复3、4步即可创建、配置用户账户及客户端。

Read more ...

2007-04-26

Yod'm 3D - About - Visual Tooltip

Yod'm 3D - About - Visual Tooltip: "Yet anOther Desktop Manager 3D
( Windows 2000/XP/Vista )
( DirectX 9 required )




Yod'm 3D is a virtual desktop manager with the fashionable effect : the cube





By default, the rotation of the cube is done with the keys CTRL+SHIFT+Arrows :

* CTRL+SHIFT+Left/Right = Next/prev desktop

* CTRL+SHIFT+Up = Activate and show a 'far' view of the current desktop, Left and right to turn the cube

* CTRL+SHIFT+Down = Activate and show a 'near' view of the current desktop, Left and right to turn the cube

Hold down CTRL+SHIFT to use the mouse to turn the cube.
( The rotation is possible only horizontally )" Read more ...

2007-04-25

Enum Types (The Java™ Tutorials > Learning the Java Language > Classes and Objects)

Enum Types (The Java™ Tutorials > Learning the Java Language > Classes and Objects): "Java programming language enum types are much more powerful than their counterparts in other languages. The enum declaration defines a class (called an enum type). The enum class body can include methods and other fields. The compiler automatically adds some special methods when it creates an enum. For example, they have a static values method that returns an array containing all of the values of the enum in the order they are declared. This method is commonly used in combination with the for-each construct to iterate over the values of an enum type. For example, this code from the Planet class example below iterates over all the planets in the solar system.

for (Planet p : Planet.values()) {
System.out.printf('Your weight on %s is %f%n',
p, p.surfaceWeight(mass));
}" Read more ...

Nested Classes (The Java™ Tutorials > Learning the Java Language > Classes and Objects)

Nested Classes (The Java™ Tutorials > Learning the Java Language > Classes and Objects): "A nested class is a member of its enclosing class and, as such, has access to other members of the enclosing class, even if they are declared private. As a member of OuterClass, a nested class can be declared private, public, protected, or package private. (Recall that outer classes can only be declared public or package private.)

Terminology: Nested classes are divided into two categories: static and non-static. Nested classes that are declared static are simply called static nested classes. Non-static nested classes are called inner classes." Read more ...

2007-04-24

60 best CSS directories you would die to watch! at Witty Sparks

60 best CSS directories you would die to watch! at Witty Sparks: "With new technologies flooding the web,different tools are available with which a web designer can showcase his creativity and craft. But despite putting in the effort and sweat, numerous websites with fantastic creativity fail to get noticed. Also, the surge in designing is driving designers to dig for creativity, color schemes and layouts.

Keeping these aspects in mind, we came up with a compendium of best CSS directories, CSS showcase, CSS galleries that rank / grade websites (using CSS) on the basis of ‘alexa ranking’, colors, categories, tags, ratings and RSS.

If you feel that a particular site is worth to get showcased, then drop the URL’s in your comments so that they become a part of our next list.

If you found this article useful, digg it to ensure that a designer’s effort doesn’t go unnoticed." Read more ...

2007-04-19

MSSQL数据库移植后的用户权限问题

把数据库备份还原到另一个服务器时,可能会遇到孤立用户的问题
举例:数据库test有用户U_tom,对应的登录帐户为L_tom,按以下步骤操作将会出现孤立用户U_tomf:

备份test->删除数据库test->删除登录L_tom->还原test

查看:
1、企业管理器->展开要查看的数据库->用户 ,会发现相应的用户没有对应的登录
2、在查询分析器中执行 EXECsp_change_users_login @Action='Report'

解决:
办法一、自动新增一个和用户名相同的登录帐户,并影射
EXEC sp_change_users_login 'Auto_Fix', 'U_tom'

办法二、新增一个登录帐户,然后将此登录帐户映射到孤立的用户
EXEC sp_addlogin 'L_tom'
--Change the user account to link with the 'L_tom' login.
EXEC sp_change_users_login 'Update_One', 'U_tom', 'L_tom'

或者:
1、找到该用户的ID 例如:
select sid from sysusers where name='U_tom'
结果为
0x67E19EC564D7344CB19AC35085C1A36B

2、新增一个登录帐户L_tom,将此登录帐户映射到孤立的用户
EXEC sp_addlogin @loginame = 'L_tom',
@sid = 0x67E19EC564D7344CB19AC35085C1A36B

参考:sp_change_users_login 、sp_addlogin 的语法参考 Read more ...

2007-04-17

VoIP Now: 74 Open Source VoIP Apps & Resources

VoIP Now: 74 Open Source VoIP Apps & Resources: "When a body of independent auditors and experts recommended that the State of California consider open-source software and voice over Internet Protocol telephony (VoIP) as two measures to cut costs in 2004, that was the signal that open source and VoIP should unite. After all, what's better than free software? Open source is better, because you have access to the code. What's better than open source? Open source that's focused on VoIP. That's what you get here — 74 open source apps tucked into categories that you can use 'as is' or change to fit your specific VoIP needs.

The following apps and resources are categorized by SIP, H.323, IAX, and RTP protocols and include clients, libraries, gatekeepers, and any other open source resource available for those specific protocols plus PBX and IVR platforms. You'll also find tools like faxware, voicemail apps, and middleware that applies to one or more of the previously mentioned protocols." Read more ...

2007-04-16

Zolved - How to reduce the memory usage on Firefox?

Zolved - How to reduce the memory usage on Firefox?: "Most of the time, Firefox doesn't use abnormal amount of system memory, it sometimes due to other sources, like number of plug-ins, themes and extensions. It is also highly recommended that you have the latest version of Firefox as the memory usage is minimized. If you want to download the latest copy of Firefox, click here.

Follow these steps to check what is causing the abnormal memory usage:

* Check your Extensions and Themes.
* Check the Plug-ins.
* Clear Download History.
* Restart Firefox Periodically.
* Assign Memory Cache on Firefox." Read more ...

2007-04-14

预防措施

预防措施: "★ 禁酒及含酒精类饮料
  酒精在体内主要通过肝脏分解、解毒,所以,酒精可直接损伤肝功能,引起肝胆功能失调,使胆汁的分泌、排出过程紊乱,从而刺激胆囊形成新的息肉及/或使原来的息肉增长、变大,增加胆囊息肉的癌变系数。
  ★ 饮食要规律、早餐要吃好
  规律饮食、吃好早餐对胆囊息肉患者极其重要。人体内肝脏主管分泌胆汁,分泌的胆汁存储入胆囊内,而胆汁的功能主要是消化油性食物。如果不吃早餐,则晚上分泌的胆汁利用不上,存留于胆囊内" Read more ...

2007-04-13

11amDesign Tutorials and Articles - 101 Hidden Tips & Secrets For Photoshop

1. Press Tab will hide tool bar and palette, Shift+Tab will hide only palette.

2. Hold Shift + click the top blue bar for toolbar and palette will move them to the nearest edge.

3. Double click the top blue bar, on any palette window, to minimize it.

4. Double click the gray background will bring up open file option, Hold Shift+double click will open up the browser.

5. Sick of the default gray background around your image? Select paint bucket, hold shift and click on the gray background, it will change to whatever color you have in your foreground color box.

6. In Photoshop, all "Cancel" buttons in a window can be changed to a "Reset" button by holding Alt.

7. Caps lock will switch your cursor for accuracy.

8. Press F button, it will switch between 3 different screen modes and give you more working area.

9. To draw a straight line, click then move to the end point and hold shift + click.

10. Hold Ctrl will temporary make any tool into move tool until you release Ctrl.

11. Ctrl + Alt and click drag the image, it will make a duplication of the current image over lay on top.

12. Hold Space bar, it will make any tool into "Hand Tool" until you release Space bar.

13. While in Zoom Tool, Ctrl+space = zoom in, alt+space = zoom out.

14. Hold Ctrl and press "+" or "-" it will change the % for image in navigator window.

15. When Using eyedropper tool to capture foreground color, hold Alt and click, it will instantly capture the color for background.

16. With Measure Tool, draw a line then hold Alt and draw another line from the end of the first line, it will measure the angle.

17. Ctrl+Alt+Z and Ctrl+Shift+Z will go back and forth in the history.

18. Alt+Backspace and Ctrl+Backspace will fill in the whole screen with foreground color or background color, Shift+backspace will bring up option window, Alt+Shift+Backspace and Ctrl+Shift+Backspace, will fill the image with foreground or background color but will leave the alpha transparent area alone.

19. When free transforming with Ctrl+T, hold Alt to keep the original image and then to transform a duplicated layer of it. Ctrl+Shift+T to repeat whatever you did in the last transform.

20. To make sure your Crop is on the edge of the image, hold Ctrl while cropping.

21. Ctrl+J will duplicate the current layer.

22. Ctrl+Shift+E will merge all visible layers to one layer, Ctrl+Shift+Alt+E will make a copy of the original and merge all visible layers.

23. While using Marquee Tools, hold Alt it will make the starting point as a center of the selection.

24. Ctrl + D to deselect, Ctrl+Shift+D to reselect what you deselected.

25. While selecting with Marquee tool, pressing the space bar can allow you to move the selection.

26. Hold Shift and press "+" or "-" it will switch between the layer mode:

N = Normal
I = Dissolve
M = Multiply
S = Screen
O = Overlay
F = Soft Light
H = Hard Light
D = Color Dodge
B = Color Burn
K = Darken
G = Lighten
E = Difference
X = Exclusion
U = Hue
T = Saturation
C = Color
Y = Luminosity
Q = Behind 1
L = Threshold 2
R = Clear 3
W = Shadow 4
V = Midtones 4
Z = Highlights 4


***The shortcut works even for following situation:

***Alpha turned off, Indexed Mode, Line tool, Bucket Tools, Dodge and Burn Tools

27. While using Brush or any other tools, change the opacity by typing the number.

*** type one number for % of it's ten times [4=40%]

***type two number for exact % [press 7 then 2 will get 72%]

28. Hold Alt while clicking on the eye icon beside the layer, it will hide all other layers.

29. Hold Alt while clicking the pen icon beside the layer, it will unchain this layer from all layers.

30. Select a layer, hold Alt and click the top edge of another layer, it will group them.

31. Hold Alt and click the button "Create a new layer", it will create a new adjustment layer.

32. Select a layer and hold Alt, then click on the garbage can button. It will instantly delete the layer, marquee where you want alpha and Ctrl+click the "Create new channel" button, it will create an alpha only on the area you marquee.

33. File> Automate > Contact Sheet: this can create a small thumbnail for every file, this can save you some time from searching.

34. When Move Tool is selected, toolbox on top can be useful from time to time, these are "Auto select layer" and "Show bounding box".

35. While Move Tool is selected, hold Shift (Alt+Shift+Right click) and allow whether or not to make a current layer chain with your upper layer.

36. With grid on, click the top left corner of the grid and drag to anywhere on the image to set the pivot, double clicking on the icon again reset the pivot.

37. After, draw a path on the image with pen tool, Ctrl+shift+H can hide/show it.

38. Control Navigator with keyboard sometimes can be more time efficient than mouse.

***

Home = move to top left corner
End = move to right bottom corner
PageUp = move up one page
PageDown = move down one page
Ctrl+PageUp = move left one page
Ctrl+PageDown = move right one page
Shift+PageUp = move up 10 pixel
Shift+PageDown = move down 10 pixel
Ctrl+Shift+PageUp = move left 10 pixel
Ctrl+Shift+PageDown = move right 10 pixel


39. Ctrl+Tab allows you to switch between different image files you are working on.


40. F12 = Revert to how the file was the last time you saved it.


41. Shortcuts for Channel: RGB, CMYK, indexed color...

***

Ctrl+"~" = RGB
Ctrl+1 = red
Ctrl+2 = green
Ctrl+3 = blue
Ctrl+4 = other path
Ctrl+9 = other path
Ctrl+"~" = CMYK
Ctrl+1 = light green
Ctrl+2 = pink red
Ctrl+3 = yellow
Ctrl+4 = black
Ctrl+5 = other path
Ctrl+9 = other path
Ctrl+1 = Indexed
Ctrl+2 = other path
Ctrl+9 = other path

42. hold Ctrl then you can draw a red box in the Navigator thumbnail for viewing.

43. Hold Alt and click on any of the history steps, that step will be copied and become the most recent one.

44. Alt drag a step from a serial action can copy it to another action.

45. Alt-click the flare preview thumb, and you can fill in numerical co-ordinates for lens flare.

46. Holding Shift + Alt while transforming an object will do it proportionally, from the center.

47. If you have the move tool selected and you want something duplicated just hold the alt key and move the image, holding the Shift + Alt while doing this, it will move it along one axis.

48. If you want to straighten an image that is crooked (maybe from scanning), click on the eyedropper tool or hit the I key 3 times to get the ruler. Click on the left side of the straight edge, then the right side of the straight (but crooked) edge. The choose Image> Rotate Canvas> Arbitrary, Photoshop will give you the degrees of rotation you just click ok.

49. If you create something in Illustrator, copy and paste it in Photoshop, it will ask you if you want this to be a pixel, path, or shape layer.

50. If you have a mask on a layer and you want to place a image in there and keep the mask. Simply open the image, say copy, and then Ctrl click on the layer to select the mask and use Shift + Ctrl + V to paste it into the mask which will also put it on a new layer as well.

51. To center an image, Ctrl + A , Ctrl + X, Ctrl + V, I think it also puts that image on a new layer.

52. Ctrl+E will merge the highlighted layer down to the next

53. When you have a brush selected, using [ or ] will scroll up or down that brush list.

54. Double clicking the zoom tool will make the image 100%, double clicking the hand tool will fit the image to your screen resolution.
55. Typing Content:

Ctrl + H will hide the highlight on your selected type.

If you click once while your type is selected on the font list, you can use your arrows to scroll up and down and see the fonts change on the fly!

Alt + Left or Right arrows will change your tracking in increments of 10
Ctrl + Alt + Left or Right arrows will change your tracking in increments of 100
Ctrl + Alt + Up or Down arrows will change your leading in increments of 10 pts
Shift + Ctrl with <> will change your font size in increments of 2 pts

56. Ctrl + Alt + T to make a copy of the layer in which you want to transform.

57. Ctrl + Alt + Right arrow. duplicates the layer you are on.

58. Change the active layer : Alt + [ or ].

59. Move the active layer up and down : Ctrl + [ or ].

60. Link 2 layers: with move tool click in the first layer hold Shift and click in the second one.

61. Ctrl+[plus key] will let you zoom in on an image anytime while Ctrl+[minus key] zooms out. Ctrl+Alt+[plus key] will zoom in AND RESIZE the window to fit the image size... same for Ctrl+Alt+[minus key] as well.

62. When using the Polygonal Lasso Tool, click backspace to undo a lasso step.

63. Pressing X will switch the selected foreground and background colors.

64. Pressing D will reset the foreground and backgrounds colors to black and white.

65. If your image has multiple layers, create a Marquee selection and press Ctrl+Shift+Cit won't work if you selected a hidden layer) will copy the image into memory as if they were flattened! Paste it on a new document to see the result.

66. Ctrl+Alt+Z will do multiple undo, versus just one.

67. Ctrl+click a layer thumbnail to select the layer transparency

68. To see what your layer mask looks like (and edit it), Alt+click its thumbnail in the layers palette

69. Press and hold Ctrl+Alt and click the Help bar with your mouse, drag it down and highlight "About Photoshop" and let go of the left mouse button for a different About Photoshop splash/screen.

70. When using Polygon lasso tool hold Shift to make a perfect line, it goes every 30 degrees

71.Photoshop CS2: Group many layers by clicking the layers you want to group by clicking it while holding the Shift key down, and then press Ctrl+G to group them into a folder for means of better organization.

72. Ctrl+Shift+N creates a new layer with a dialog box; Ctrl+Shift+Alt+N gets you a new layer without the hassle.

73. Back to brush, [ and ] will increase/decrease your brush size, Shift + [ or ] will soften or harden your brush edge.

74. Still in [ and ], Ctrl + [ or ] will move your currently selected layer up and down the hierarchy and Shift + [ or ] will select upper layer or lower layer.

75. Stamp Tool (s) is used to copy an area of image (defined by alt+clicking and area) and paint it somewhere else (cloning). It also works when you have multiple images open at the same time. Alt click an area of any opened file image and paint it anywhere else.

76. After you created a text you can click on font type tab and tap "down" key over and over to scroll through the font list and see the changes in (relatively) real time. A feature that I am tired of waiting to happen in illustrator.

77. Still in text mode, a trick from Microsoft word to apply hi-light to your text hit Ctrl+Shift+ <> to resize your text, to your preferred font size. Pressing Ctrl key while you are typing also gives you a free transform box temporarily and will go if you release it. Resizing text also works by pressing Ctrl+T (on selected layer, not when you are typing). It still retains as an editable text layer after.

78. And remember, pressing enter when you type will take you to a new line just like typing a letter but pressing Ctrl+Enter or Enter on numeric key will finish what you type.

79. You can drag a layer on to any other opened images in Photoshop and it will copy it as a layer (better than copy and paste image). Holding down Shift while moving it will snap the image right on the center of the other opened image

80. If you are working with sets....

Click on the set, in the blending mode it shows pass through by default... if you have an adjustment layer within a set and you want that adjustment layer to effect those layers underneath it within the set only, set the blending mode of the set to "normal" instead.

CODE


Mentioned before with more explanation:

- Pressed F to switch to 3 different viewing mode... when I first try it I said "wtf? what it's for?" Well, if you are sick of painting your image on the corners just to find yourself resizing your current image window, with F you can pan way outside your image. Happy corner painting!!


- Create a new file, 500x500 px, create a new layer, get a standard brush and paint a dot on the top center of your image (like the number 12 position on a clock). Press Ctrl+Alt+T, it will duplicate your original layer and free transform the new one. Move the pivot point (the circle with little dot in it found when you are free transforming something) to the center of your image, rotate your image 30 degrees to the right and hit OK to confirm the transform

now.........


Be excited..........


Hit Ctrl+Shift+Alt+T 10 times and see what happens!

81. When using the "move tool" you can select any layer by holding down the CTL key(CMD on a Mac) and clicking on the part of the layer on the canvas with your mouse. This way you won't have to go to the Layers palette every time and you don't have to keep checking on or off the auto select options for the move tool.

82. You can link up layers without going into the layers palette, by selecting the layer (how I just mentioned above) and holding down CTL + Shift(CMD + SHIT on a Mac) for each additional layer you want to link up. You can unlink them by clicking on the layer again.

83. You can delete more than one layer at a time.......by linking up all the layer you want to delete, and holding down CTL(CMD on a Mac) while you click on the garbage icon to delete the layer.

84. When using the type tool you can ok it by pressing CTL + Enter(CMD + Enter on a Mac) instead of clicking on the check mark on the options.

85. If you have more than one type layer, and want to make any of the following changes color/font/size/alignment/initializing to all of the type layers at the same time.....All you have to do is link up the type layer, hold down the Shift key and in the options for the type tool make your change i.e. color, size, etc.

86. You can use your number pad to change opacity for a layer.... I.e. type 5 and the opacity will be 50; type 55 and the opacity will be 55. You can use the number pad for any tool that uses opacity...like the airbrush tool, stamp tool, brush, gradient, etc.

87. Pressing Tab key will hide the Tools palette and any other palette that you have on the stage. Pressing "F" will change between Full Screen modes. Using these two tips you can view your work Full Screen without any palettes.(You can press CTL+Alt+0 to fit your work to the screen, or you can press CTL+0 to zoom to 100%)

88. Pressing the "+" and "-" keys while holding down CTL+Alt will resize the whole document window, not just the work area.

89. You can delete a layer by holding down the "Alt" key and pressing "L" twice......actually now with Photoshop 7 you got to press "L" three times. It's not actually a keyboard shortcut, but it's a quick way to do it....don't know if it works on a MAC.

90. Pan documents with the space bar.

91. Ctrl+click a layer (in layers palette) to select it's transparency.

92. Ctrl+Alt+click between 2 layers in the palette to group them.

93. Alt + click in “add layer mask” button to add a black layer mask (instead of a white one).

94. When you select something, pressing Ctrl+J will copy the selected area and add another layer with the copied area - opposing copying the layer, making a new layer, and pasting it.

95. To glue the palettes together (all palettes combined into one strip), you just drag & drop a palette onto the end of another palette (watch the rectangle that indicates where the palette will get attached to).

96. Hold down Alt while Burning to Dodge instead, and vice versa.

97. Ctrl-click a layer to select an objects; alternatively, you may select more than one object/s in more than 1 layer by holding Shift while using the method just mentioned (Ctrl-click). To deselect, just press Ctrl+D.

98. If you have a mini scroll on your mouse, you may use that to zoom in (scroll up) or zoom out (scroll down).

99. Need to locate a layer quick? Use the Move Tool (V) and right click on the area the object lays. There should now be a “cursor-menu” with all the layers that is in that particular area. Now take a good guess and see which one of them fits the shoe; select a layer and Ctrl-Click the layer in the Layer Palette - see if the selection traces the object you desired to edit/find. Useful for those messy people (i.e. me!).

100. Need to get rid of a background quick? Assuming you at least know how to crop around an object, do so. Now press Ctrl+I or Shift+Ctrl+I for Inverse Selection. Press Ctrl+X to %@#!* that part out, and you should be left with the object!

101. Want to save the time from loading All your Photoshop brushes, when your Photoshop accidentally forgets to load them up (happens to me sometimes)? Select the brush tool, and click the little arrow pointing right (located at the top toolbar), next to the Master Diameter tick. Go down to Preset Manager and now there should be a menu of all the brushes currently loaded. Click on the first brush (top left) and scroll down to the bottom. Now hold Shift and click the last brush (bottom right). This should highlight all the brushes. See the “Save Set” to the right in the menu? Click that and name your brush set whatever you want, for this matter I just name it All (so I remember that this brush set contains all the brushes I currently have loaded, and is located near the top when loading the brushes up).

Last update: 2007-03-22 07:13
Author: Gary Logsdon
Revision: 1.0

Read more ...

2007-04-12

EJSChart :: 100% Pure JavaScript Charting Solution

EJSChart :: 100% Pure JavaScript Charting Solution: "# Interactive: Features such as Hints, Mouse Tracking, Mouse Events, Key Tracking and Events, Zooming, Scrolling, and Crosshairs raise interactivity and user experience in web charting to a new level.
# Sample Area ChartAxis Scaling: There's no need to determine your data range before hand. EJSChart will calculate and scale automatically to fit whatever data it is presented with.
# Auto Zooming, Scrolling: Too much data and not enough screen real estate? Show it all. Let your end users zoom in on the pieces they're most interested in. Axis locking for single axis zoom, scrolling and automatic axis scaling are all included.
# Sample Stacked ChartStackable Series: Multiple chart series can be stacked and combined to fit many charting needs.
# Multiple Chart Types: Line, Area, Scatter, Pie, Bar and Function series are just the beginning. New series are just a few lines of JavaScript code away." Read more ...

2007-04-08

怎样让Delphi做出来的程序在任务栏上显示不止一个按钮?


主  题: 怎样让Delphi做出来的程序在任务栏上显示不止一个按钮?

怎样让Delphi做出来的程序在任务栏上显示不止一个按钮?
我想让一个不是主窗口的窗口在任务栏上显示一个按钮,以便和主窗口来回切换,怎么办?



回复人: u2m(breeze_wang) ( ) 信誉:125 2003-04-12 13:34:15Z 得分:0


在Delphi中我们可以静态或动态地创建窗体,所谓静态创建窗体是指在设计程序时一并建好窗体,动态创建是指在程序运行时根据需要使用Create方法 创建新窗体,然后使用Show方法来显示窗体。但令人遗憾的是,在显示非启动窗体时,不论用户在程序中创建多少个窗体,每个应用程序只能有一个程序图标, 在Windows的任务条上只显示一个程序图标。
在编写应用程序时,有时我们需要同一应用程序显示两个程序图标,那么如何实现呢?我们只需重载窗体的CreateParams过程即可实现,下面以一个示例来说明如何使用。
 
一、应用实例
 
在Delphi集成环境中创建两个窗体,其中窗体一为主窗体,即程序启动窗体,在其上添加显示窗体二的按钮。因为要让窗体显示的同时在任务栏上再显示一个 程序图标,为了区别,将窗体二的图标更换,然后在窗体二的private部分声明重载CreateParams过程:
unit Unit2;
……
private
{ Private declarations }
procedure CreateParams(var Params: TCreateParams); override;
最后在单元文件的实现部分(Implementation)添加重载过程的实现代码:
procedure TForm2.CreateParams(VAR Params: TCreateParams);
begin
Inherited CreateParams(Params);
Params.WndParent := GetDesktopWindow;
end;
运行程序中,当按下启动窗体中的“显示窗口二”按钮时,会显示窗体二,并且在Windows的任务栏上同时会出现一个新的程序图标,如图1所示。
 
二、程序分析
 
当程序需要创建一个窗体、向系统发出要创建一个新窗体的WM_CREATE消息时,系统将指示程序调用CreateWnd方法来创建窗体, CreateWnd方法在创建窗体前,需要调用CreateParams过程来获得窗体的初始化参数,在获得这些参数后,最后再调用 CreateWindowHandle方法创建一个窗体句柄,完成了一个窗体的创建工作。因此,如果我们要使某一窗体在任务栏上显示程序图标,就需要修改 窗体的初始化参数,重载CreateParams过程。
程序窗口的初始化参数被封装成一个TCreateParams类型的对象,该类型的定义如下所示:
type
TCreateParams = record
{窗体的标题文字}
Caption: PChar;
{窗体的类型,比如WS_CHILD 、WS_DISABLED等}
Style: DWORD;
{扩展的窗体类型}
ExStyle: DWORD;
{窗体的左上角位置}
X, Y: Integer;
{窗体的宽、高}
Width, Height: Integer;
{该窗体的父窗体句柄}
WndParent: HWND;
{指向WM_CREATE消息LParam参数}
Param: Pointer
{该类包含了一些与窗体有关的信息,如鼠标光标、选单等}
WindowClass: TWndClass;
{该窗体的类名}
WinClassName: array[0..63] of Char;
end;
CreateParams过程是当窗体创建时执行,它初始化窗体创建的参数记录。所以如果要显示某一窗体的图标,必须要提高该窗体的级别,即将它的父窗体 置为Windows的桌面,桌面的句柄可以通过API函数GetDesktopWindow来获得,因此只要我们在重载函数体中添加语句 “Params.WndParent
:= GetDesktopWindow;”,就可以实现窗体的图标显示,正如上例所演示的那样。

对MDI子窗口:
procedure TForm2.Button1Click(Sender: TObject);
var hd:hwnd;
begin
hd:=GetDesktopWindow();
windows.SetParent(self.Handle,hd);
self.WindowState:=wsMinimized;
end; Read more ...

2007-04-07

FullerScreen :: Firefox Add-ons

FullerScreen :: Firefox Add-ons: "This extension enhances the Full Screen mode into a really full screen mode, hiding the remaining toolbars and statusbar and making them visible again when the mouse pointer hits an edge of the screen.

This cross-platform extension is tested on Windows and Linux, should work fine on Mac, and is licensed under the Mozilla Public License." Read more ...

2007-04-06

ADG (IndySSL)

ADG (IndySSL): "SIMPLE INDY 9/10 SSL CLIENT AND SERVER EXAMPLES

Written by Ralph Sickinger, Best Manufacturing Practices Center of Excellence (BMPCOE)

e-mail: ralph @ bmpcoe.org

SSL CLIENT:
This program is a simple TCP Client that makes an SSL connection on port 3000. To connect to a server, enter the IP address of the server in the box labeled 'Host:', and then press the 'Connect' button. Once a connection has been established, the client displays any text received from the server in the memo area. To send text to the server, enter it in the available edit box, and then press [enter].

SSL SERVER:
This program establishes a TCP Server that listens for SSL connections on port 3000. When a connection is received, the server responds with 'Hello', and then listens for any other lines of text sent from the client. When a line is received, it is echoed to the screen as well as back to the client.

Note: in order to run this program, you must have libeay32.dll and ssleay32.dll installed where the application can find them (either in the Windows System32 folder, or in the same folder as the application itself. These files can be downloaded from: http://indy.fulgan.com/SSL/ The server also requires that the certificate files (sample.crt, sample.key, and sampleRoot.pem) be available in the same folder as the excutable." Read more ...