The Difference Between Fedora, Redhat, and CentOS

refer to https://danielmiessler.com/study/fedora_redhat_centos/

frc

People are often confused by the relationship between Fedora, Redhat, and CentOS. Are they the same company? Is one another version of the other? Which one is more up to date? Etc.

They go in order starting from the top, as shown in the graphic above.

  1. Fedora is the main project, and it’s a communitity-based, free distro focused on quick releases of new features and functionality.
  2. Redhat is the corporate version based on the progress of that project, and it has slower releases, comes with support, and isn’t free.
  3. CentOS is basically the community version of Redhat. So it’s pretty much identical, but it is free and support comes from the community as opposed to Redhat itself.
Posted in Uncategorized | Leave a comment

HTTPS Sequence Diagram

http://blog.expressionsoftware.com/2011/02/https-sequence-diagram.html

Posted in Uncategorized | Leave a comment

SSH without password using Putty

http://www.tonido.com/blog/index.php/2009/02/20/ssh-without-password-using-putty/

SSH without password using Putty

SSH Protocol

SSH (Secure Shell) is a network protocol that provides secure access to a computer (mostly Unix based).  When you want to connect to a remote Unix server, SSH is one way of accessing the server. SSH is very powerful by combining both security of the data transmitted over network and accessibility to the remote system. SSH protocol works between two computers by a client-server architecture. When a client computer connects to the server, the server requires the client to authenticate itself. There are different ways a client can authenticate itself to the server. A typical authentication mode will be to enter a password when logging into a remote system. In this howto we can explore another mode of authentication in which server doesn’t require a password to be entered by the user. This mode will be very useful if you are connecting to a remote system frequently and dont want to enter the password everytime.

Before we see the steps, just to give a background on the components involved:

SSH SERVER

When you need to connect to a remote computer via SSH, that computer should have a SSH server running on it. All Unix based distributions ( Linux, Mac OSX etc.,) includes a ssh server. For Windows based systems Cygwin can be used as an SSH server.

SSH CLIENT

Assuming your remote computer has an SSH server running on it, to connect to that computer you would need a SSH client on the local computer. On Unix based systems, SSH clients are available as command line utilities. For Windows based systems, putty is an excellent client. Check here for more information about putty.

CONFIGURATION

  1. We start the configuration at the client windows computer. Download the latest version of Putty.exe and Puttygen.exe from here. Using the Puttygen tool we have to generate an authentication key. This key will serve as a substitute for the password that will be entered during login.
  2. Start puttygen.exe by double clicking on the executable. The following window opens up. 

    puttygen window

    Puttygen Window

  3. Leave the default ‘SSH-2 RSA’ selection and click on the ‘Generate’ button. The following window opens. Move mouse randomly over the empty space below the progress bar to create some randomness in the generated key. 

    RSA key generation by Puttygen

    RSA key generation by Puttygen

  4. Don’t enter any key phrase. Click on ‘Save private Key’ button. Click ‘Yes’ on the window asking for confirmation for saving the key without a password. 

    Key generated successfully

    Key generated successfully

  5. Save the key file to a safe location (Let us assume you will be saving it as C:\Personal\SSHKey\Laptop.ppk).
  6. Now you can close the Puttygen window.
  7. Open the Laptop.ppk file in a notepad. Copy the four lines under ‘Public-Lines’ section to windows clipboard. 

    Copy Public Key Section

    Copy Public Key Section

  8. Now open putty and connect to the remote system using the user id you want to use for future no password connections. (Let us assume you will connect to the remote machine using user name ‘ubu’. This time when you login, you have to provide the password at the prompt. Future logins won’t require this password.
  9. Under the logged in user’s  home directory there will be .ssh directory, under that create a new  file called authorized_keys using a text editor such as vi. (In our case the file will be created under /home/ubu/.ssh/authorized_keys).
  10. Type the word ” ssh-rsa ” (including  spaces on both ends of the word) and paste the 4 lines copied from step 7. Remove the carriage return at end of each line, merging four lines into one single line. Be careful not to delete any characters while doing that.  Final output should like the following window. 

    Add generated key to remote system

    Add generated key to remote system

  11. Save the file and quit the text editor. Assign rw permissions only for the owner. $ chmod 600 ~/.ssh/authorized_keys. 

    Set file permissions

    Set file permissions

  12. Now we have configured SSH server, its time to test our setup.
  13. On the local system, open Putty, enter the ip address details of the remote system.
  14. Now from the left navigation, select Connection -> Data. Enter ‘ubu’ as ‘Auto-login username’ on the right panel. 

    Enter User name on Putty

    Enter User name on Putty

  15. Again from the left navigation menu, scroll down and select Connection -> SSH -> Auth. Enter the path of the saved private key file ( In our case C:\Personal\SSHKey\Laptop.ppk ). Leave other defaults as such and press open button. 

    Specify key file location

    Specify key file location

  16. Now the putty connects to the remote SSH server and there won’t be any password prompt here after :-) . 

    No Password Connection

    No Password Connection

Caution
SSH is a powerful tool and relies on password as a security. We just bypassed that security for sake of convenience. If a hacker get holds of the private key we generated, it allows a free access to your systems. So use this technique with care.

Posted in Uncategorized | Leave a comment

那年夏天 亚特兰大

在网上听歌,看演唱会,无意中点开了1996 那年夏季奥运会开幕式的链接,看到了一段Celine Dion的The power of dream 的视频,感慨良多。

视频中,那时的Dion确实有怀旧的范儿,一头金发干练的打扮,气死嘉宝,不让凯利。

CelineDionAtlantic

其中的上任伊始、意气风发克林顿还不认识莱温斯基,而希拉里也是目光炯炯、风采依存。

Clinton

96年转眼至今已有17年了,那年的夏天我们刚搬了新家,才装上有线电视,刚刚看上了中央5,而这个新的频道里,张斌、黄健翔也还是血气方刚的小伙子,连一些德甲、意甲的绯闻八卦也要靠于大川和张慧德老师来传播,刘建宏也还在编辑甲B的进球集锦。

周围的一切都是那么新鲜,那么多可以尝试。受到更高、更快、更强的鼓舞,我发自肺腑的想要试试一夜不睡是什么感觉,印象中我熬了一夜看奥运,目睹了王义夫最后一环痛失金牌,担架伺候的无奈场面。

那时没有网络,新闻也都是来自于报纸或电视,报纸的几角旮旯也要扫一遍。夜深了,心情好了听听电台,心情不好也听听电台。噢,似乎听电台和心情没什么关系,只是因为夜深了。电台里的英文歌曲也都是飙高音,注重的还是旋律,不想如今想方设法的比节奏、赛骂街。中文歌曲也大多是苦情人和怨妇、弃妇,或者朋友别哭的,我依然是你心灵的归宿。

暑假里还有忙不完的暑假作业、和游记见闻作文,每个月还有个返校。我一生中无比美好的初中时代就这样的度过了,那时是我第一次离家到远到5公里以外的地方去闯荡,周围的同学都是那么纯洁、清澈,如今我想再聚起来,你开我个玩笑,博个哄堂大笑,也是一种奢望了。

曾经你做过的事、看过的影像,倏然在当前的生活中冒出来,总是勾起你联想到那年那时那景那人,画面轮转,记忆回放,珠珠串串散落开来,又靠着一份感情一丝感慨串联起来,剪不断,理还乱的纠结着,推着你写点什么祭奠缅怀一下,也就成了今天。

本想聊发感慨,可想想一会还要给儿子喂奶的任务,显然生活已经让我卑服了,也呻吟不出了。未来的某一天,也许还会想起今天熬夜的那份场景,就当是生活中的调味剂吧。

Posted in Uncategorized | Leave a comment

to find out which schema a table belongs to

select owner, table_name
from all_tables
where table_name like ‘TB_EMP_CODES’;

select object_name,owner
from all_objects
where object_name like ‘TB_EMP_CODES’;

Posted in Uncategorized | Leave a comment

Spring 3.0 – Application Context – three ways to get the context

http://mythinkpond.wordpress.com/2010/03/22/spring-application-context/

Spring 3.0 – Application Context – three ways to get the context

Posted by Venkatt Guhesan on March 22, 2010

In searching Google for “Spring ApplicationContextAware“, you come across a lot of recommendations and I also see a lot of folks continuing to complain saying that their setApplicationContext method does not get invoked. So to help clarify, I’m blogging a few notes in hope that it helps clarify a few things.

Two Ways to Get Application Context:

Method #1:  In your class you implement ApplicationContextAware class like this:

 

01 public class MyClass implements ApplicationContextAware {
02
03     static final long serialVersionUID = 02L;
04
05     ApplicationContext applicationContext = null;
06
07     public void doSomething(){
08         if (applicationContext != null && applicationContext.containsBean("accessKeys")){
09             MyBean beanA = (MyBean) applicationContext.getBean("mybean");
10             //Do something with this AccessBean
11         }
12
13         return null;
14     }
15
16     @Override
17     public void setApplicationContext(final ApplicationContext applicationContext) throws BeansException {
18         System.out.println("setting context");
19         this.applicationContext = applicationContext;
20     }
21
22 }

 

Method #2: If you are in a Java Servlet, you can do the following:

 

01 public class gzservlet extends HttpServlet {
02     static final long serialVersionUID = 02L;
03
04     ApplicationContext applicationContext = null;
05
06     @Override
07     protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
08         if (applicationContext == null){
09             System.out.println("setting context in get");
10             applicationContext = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
11         }
12         if (applicationContext != null && applicationContext.containsBean("accessKeys")){
13             AccessBean thisAccessBean = (AccessBean) applicationContext.getBean("accessKeys");
14             req.setAttribute("keys", thisAccessBean.toString());
15             System.out.println("setting keys");
16         }
17
18         req.getRequestDispatcher("/index2.jsp").include(req,resp);
19     }
20
21 }

 

So the question one would ask is when to use what? And the answer is. Depends on how you are invoking Spring.

What works for Method #1: when you invoke Spring you are using the DispatcherServlet link this. Then Method #1 will resolve the implementation of ApplicationContextAware and call the setApplicationContext() method to set the context.

 

01 In web.xml.
02
03 <servlet>
04     <servlet-name>dispatchservlet</servlet-name>
05     <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
06     <load-on-startup>1</load-on-startup>
07 </servlet>
08
09 <servlet-mapping>
10     <servlet-name>dispatchservlet</servlet-name>
11     <url-pattern>/*</url-pattern>
12 </servlet-mapping>

 

If you are not using the DispatcherServlet and you are initializing Spring using a Listener and you have your own Servlet that’s driving the Request\Response scope then use Method #2. Below is an example of how the web.xml will look like in this case.

 

01 <listener>
02    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
03 </listener>
04
05 <servlet>
06   <servlet-name>MyOwnServlet</servlet-name>
07   <servlet-class>com.something.myservlet</servlet-class>
08   <load-on-startup>2</load-on-startup>
09 </servlet>
10
11 <servlet-mapping>
12   <servlet-name>MyOwnServlet</servlet-name>
13   <url-pattern>*.do</url-pattern>
14 </servlet-mapping>

 

I hope this clarifies why sometimes even though you have implemented the ApplicationContextAware interface, your setter does not get invoked.

[09/12/2010] Here is a third way to get your context:

Create the following class with a static method to get your context:

 

01 import org.springframework.beans.BeansException;
02 import org.springframework.context.ApplicationContext;
03 import org.springframework.context.ApplicationContextAware;
04
05 public class ApplicationContextProvider implements ApplicationContextAware{
06  private static ApplicationContext ctx = null;
07  public static ApplicationContext getApplicationContext() {
08 return ctx;
09  }
10  public void setApplicationContext(ApplicationContext ctx) throws BeansException {
11 this.ctx = ctx;
12  }
13 }

 

and in your spring bean configuration xml file add the following:

 

1 <bean id="applicationContextProvider" class="ApplicationContextProvider"></bean>

 

And now in your classes, you can do the following:

ApplicationContext ctx = ApplicationContextProvider.getApplicationContext();

That’s it!!!

Cheers.

Posted in Uncategorized | Leave a comment

Accessing Spring beans from Legacy code

Accessing Spring beans from Legacy code

 

As I have blogged before, we have been trying to move to using the Spring framework in our web applications. We inherited a large body of working code which used a home-grown framework based on a combination of what Martin Fowler describes as the “JSP as Handler” web presentation pattern in his Enterprise Application Architecture book and Webwork action controllers. Our rationale for introducing Spring into this application is that maintenance and enhancement are very difficult and time-consuming with the existing architecture.

However, the conversion is not going to happen overnight, and neither can we mandate that all new development should stop as we move to the new architecture. It is also not possible to build and deploy the new functionality in separate web applications, because we don’t have the resources to handle the deployment issues that such an approach would require. So our new Spring enabled code co-exists with the legacy code in the same web application.

One by-product of this setup is that we often end up developing non-GUI components using Spring, which need to be hooked into existing legacy code so we can reuse the legacy request flow. There are three ways we could do this:

 

  • Build the Spring bean manually in our legacy code using explict constructor and setter calls.
  • Scrap the legacy request flow and rebuild it using Spring.
  • Obtain a reference to the Spring bean that has been configured and built declaratively by the Spring container from the legacy code.

 

The first approach is feasible, but it is extra code that you don’t need to write. Also, the first approach may result in strange null pointer exceptions if you missed something. It is also less efficient to construct them each time than having it be built once by Spring. The second approach is good if your long term goal is to get rid of the existing architecture altogether, but it is even more risky than the first approach because new code will generally contain new bugs. Also, because writing code takes time, you will have to build this extra time into your estimates. In my opinion, the last approach takes the minimum effort, code and poses the least risk, and can be accomplished quite simply, as I show below.

Our approach is to build a Singleton bean which is ApplicationContextAware and instantiate it in the Spring container by defining it in the spring-servlet.xml file in our web application. Because it is ApplicationContextAware, Spring would populate it with a reference to the ApplicationContext. Since we just want references to Spring beans from it, we implement a static getBean() method which would delegate to the ApplicationContext.getBean() method. Here is the code for our Singleton.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// SpringApplicationContext.java

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 * Wrapper to always return a reference to the Spring Application Context from
 * within non-Spring enabled beans. Unlike Spring MVC's WebApplicationContextUtils
 * we do not need a reference to the Servlet context for this. All we need is
 * for this bean to be initialized during application startup.
 */
public class SpringApplicationContext implements ApplicationContextAware {

  private static ApplicationContext CONTEXT;

  /**
   * This method is called from within the ApplicationContext once it is 
   * done starting up, it will stick a reference to itself into this bean.
   * @param context a reference to the ApplicationContext.
   */
  public void setApplicationContext(ApplicationContext context) throws BeansException {
    CONTEXT = context;
  }

  /**
   * This is about the same as context.getBean("beanName"), except it has its
   * own static handle to the Spring context, so calling this method statically
   * will give access to the beans by name in the Spring application context.
   * As in the context.getBean("beanName") call, the caller must cast to the
   * appropriate target class. If the bean does not exist, then a Runtime error
   * will be thrown.
   * @param beanName the name of the bean to get.
   * @return an Object reference to the named bean.
   */
  public static Object getBean(String beanName) {
    return CONTEXT.getBean(beanName);
  }
}

The bean definition for this bean is just this one line:

1
  <bean id="springApplicationContext" class="com.mycompany.util.SpringApplicationContext"/>

In order to now get a reference to a bean named “mySpringBean” that has been defined in the Spring context, we will issue from somewhere in our legacy (non Spring-enabled) code:

1
2
  MySpringBean mySpringBean = (MySpringBean) SpringApplicationContext.getBean("mySpringBean");
  // do something with MySpringBean

The only caveat is that your DispatcherServlet must be loaded in web.xml before any component that needs to call the SpringApplicationContext.getBean(). This ensures that the ApplicationContext has finished loading and SpringApplicationContext has a populated reference to it.

This is the second time I had a need for this kind of bridge. The last time was at my previous employer where we were embedding Jive Forumssoftware within our Spring enabled web application. We used the standard approach there, using the Spring ContextListener to store the ApplicationContext in the ServletContext, and then calling WebApplicationContextUtils.getApplicationContext(ServletContext) to get at the Spring context. I believe the approach I have outlined is better, since it is less code and there does not have to be a web container for this functionality to be available.

Posted in Uncategorized | Leave a comment

openoffice odt page use different header

1. click the header part on the page, then press F11

2. select “page style”, click the black space to add new style or click the existing style to change the current page style.

Posted in Uncategorized | Leave a comment

windows 7 快捷键大全

来自官方的 windows 7 快捷键大全

MS Windows 7 快捷键大全,来自微软官方[1],共大家参考。这些内容由 sfufoet 网友提议翻译,感谢飞天fainy、yanqian 的翻译,感谢 EraserKing 贴出了全部内容——“摘自官方帮助,build 7264”[2]

目录
1. 轻松访问键盘快捷方式
2. 常规键盘快捷方式
3. 对话框键盘快捷方式
4. Windows 徽标键相关的快捷键
5. Windows Explorer相关快捷键
6. 放大镜键盘快捷方式
7. 远程桌面相关快捷键
8. 画图键盘快捷方式
9. 写字板的键盘快捷方式
10. 计算器的键盘快捷方式
11. Windows 日记本键盘快捷方式
12. Windows 帮助查看器键盘快捷方式
在线电子表格版

1. 轻松访问键盘快捷方式 

下表包含了可以有助于使计算机更易于使用的键盘快捷方式。
按键 功能
按住右 Shift 八秒钟 启用和关闭筛选键
按左 Alt+左 Shift+PrtScn(或 PrtScn) 启用或关闭高对比度
按左 Alt+左 Shift+Num Lock 启用或关闭鼠标键
按 Shift 五次 启用或关闭粘滞键
按住 Num Lock 五秒钟 启用或关闭切换键
Windows 徽标键 + U 打开轻松访问中心

2. 常规键盘快捷方式 

下表包含了常规键盘快捷方式。
按键 功能
F1 显示帮助
Ctrl+C 复制选择的项目
Ctrl+X 剪切选择的项目
Ctrl+V 粘贴选择的项目
Ctrl+Z 撤消操作
Ctrl+Y 重新执行某项操作
Delete 删除所选项目并将其移动到“回收站”
Shift+Delete 不先将所选项目移动到“回收站”而直接将其删除
F2 重命名选定项目
Ctrl+向右键 将光标移动到下一个字词的起始处
Ctrl+向左键 将光标移动到上一个字词的起始处
Ctrl+向下键 将光标移动到下一个段落的起始处
Ctrl+向上键 将光标移动到上一个段落的起始处
Ctrl+Shift 加某个箭头键 选择一块文本
Shift 加任意箭头键 在窗口中或桌面上选择多个项目,或者在文档中选择文本
Ctrl 加任意箭头键+空格键 选择窗口中或桌面上的多个单个项目
Ctrl+A 选择文档或窗口中的所有项目
F3 搜索文件或文件夹
Alt+Enter 显示所选项的属性
Alt+F4 关闭活动项目或者退出活动程序
Alt+空格键 为活动窗口打开快捷方式菜单
Ctrl+F4 关闭活动文档(在允许同时打开多个文档的程序中)
Alt+Tab 在打开的项目之间切换
Ctrl+Alt+Tab 使用箭头键在打开的项目之间切换
Ctrl+鼠标滚轮 更改桌面上的图标大小
Windows 徽标键 + Tab 使用 Aero Flip 3-D 循环切换任务栏上的程序
Ctrl + Windows 徽标键 + Tab 通过 Aero Flip 3-D 使用箭头键循环切换任务栏上的程序
Alt+Esc 以项目打开的顺序循环切换项目
F6 在窗口中或桌面上循环切换屏幕元素
F4 在 Windows 资源管理器中显示地址栏列表
Shift+F10 显示选定项目的快捷菜单
Ctrl+Esc 打开「开始」菜单
Alt+加下划线的字母 显示相应的菜单
Alt+加下划线的字母 执行菜单命令(或其他有下划线的命令)
F10 激活活动程序中的菜单栏
向右键 打开右侧的下一个菜单或者打开子菜单
向左键 打开左侧的下一个菜单或者关闭子菜单
F5 刷新活动窗口
Alt+向上键 在 Windows 资源管理器中查看上一级文件夹
Esc 取消当前任务
Ctrl+Shift+Esc 打开任务管理器
插入 CD 时按住 Shift 阻止 CD 自动播放

3. 对话框键盘快捷方式 

下表包含了在对话框中使用的键盘快捷方式。
按键 功能
Ctrl+Tab 在选项卡上向前移动
Ctrl+Shift+Tab 在选项卡上向后移动
Tab 在选项上向前移动
Shift+Tab 在选项上向后移动
Alt+加下划线的字母 执行与该字母匹配的命令(或选择选项)
Enter 对于许多选定命令代替单击鼠标
空格键 如果活动选项是复选框,则选中或清除该复选框
箭头键 如果活动选项是一组选项按钮,则选择某个按钮
F1 显示帮助
F4 显示活动列表中的项目
Backspace 如果在“另存为”或“打开”对话框中选中了某个文件夹,则打开上一级文件夹

4. Windows 徽标键相关的快捷键 

Windows徽标键就是显示为Windows旗帜,或标有文字Win或Windows的按键,以下简称Win键。XP时代有4个经典的 Win 键组合:R/E/F/L。到了 Win7,花样更多了。
Win:打开或关闭开始菜单。
Win + Pause:显示系统属性对话框。
Win + D:显示桌面。
Win + M:最小化所有窗口。
Win + SHIFT + M:还原最小化窗口到桌面上。
Win + E:打开我的电脑
Win + F:搜索文件或文件夹。
Ctrl + Win + F:搜索计算机(如果您在网络上) 。
Win + L:锁定您的计算机或切换用户。
Win + R:打开运行对话框。
Win + T:切换任务栏上的程序(感觉是和alt+ESC 一样 )
Win + 数字:让位于任务栏指定位置(按下的数字作为序号)的程序,新开一个实例。(感觉这个比较新颖,貌似快速启动。) Shift + Windows logo key +number:Start a new instance of the program pinned to the taskbar in the position indicated by the number.
Ctrl + Win + 数字:让位于任务栏指定位置(按下的数字作为序号)的程序,切换到上一次的活动窗口。 Ctrl+Windows logo key +number:Switch to the last active window of the program pinned to the taskbar in the position indicated by the number.
ALT + Win + 数字:让位于任务栏指定位置(按下的数字作为序号)的程序,显示跳转清单。 Alt+Windows logo key +number: Open the Jump List for the program pinned to the taskbar in the position indicated by the number.
Win + TAB:循环切换任务栏上的程序并使用的Aero三维效果。
Ctrl + Win + TAB:使用方向键来循环循环切换任务栏上的程序,并使用的Aero三维效果。
按Ctrl + Win + B:切换到在通知区域中显示信息的程序
Win + 空格:预览桌面。
Win + ↑:最大化窗口。
Win + ↓:最小化窗口。
Win + ←:最大化到窗口左侧的屏幕上。
Win + →:最大化窗口到右侧的屏幕上。
Win + Home:最小化所有窗口,除了当前激活窗口。
Win+ SHIFT + ↑:拉伸窗口的到屏幕的顶部和底部。
Win+ SHIFT + →/←:移动一个窗口,从一个显示器到另一个。
Win + P:选择一个演示文稿显示模式。
Win + G:循环切换侧边栏的小工具。
Win + U:打开轻松访问中心。
Win + x:打开Windows移动中心。

5. Windows Explorer相关快捷键 

Ctrl+N 打开新窗口
Ctrl+Shift+N 新建文件夹
End 显示活动窗口的底部
Home 显示活动窗口的顶部
F11 最大化或最小化活动窗口
Num Lock+小键盘星号(*) 显示选中文件夹的所有子文件夹
Num Lock+小键盘加号(+) 显示选中文件夹的内容
Num Lock+小键盘减号(-) 折叠选中文件夹
左方向键 折叠当前展开的选中文件夹或选中上层文件夹
Alt+Enter 打开选中项目的属性对话框
Alt+P 显示预览窗格
Alt+左方向键 切换到前一次打开的文件夹
右方向键 显示(展开)当前选中项目或选中第一个子文件夹
Alt+右方向键 切换到下一次后打开的文件夹
Alt+上方向键 打开上层文件夹
Ctrl+鼠标滚轮 改变文件和文件夹图标的大小和外观
Alt+D 选中地址栏(定位到地址栏)
Ctrl+E 选中搜索框(定位到搜索框)

6. 放大镜键盘快捷方式 

下表包含了使用放大镜的键盘快捷方式。
按键 功能
Windows 徽标键 + 加号或减号 放大或缩小
Ctrl+Alt+空格键 显示鼠标指针
Ctrl+Alt+F 切换到全屏模式
Ctrl+Alt+L 切换到镜头模式
Ctrl+Alt+D 切换到停靠模式
Ctrl+Alt+I 反色
Ctrl+Alt+箭头键 按箭头键的方向平移
Ctrl+Alt+R 调整镜头的大小
Windows 徽标键 + Esc 退出放大镜

7. 远程桌面相关快捷键 

Alt+Page Up 按从左向右顺序切换程序
Alt+Page Down 按从右向左切换程序
Alt+Insert 按程序打开先后顺序循环切换程序
Alt+Home 显示“开始”菜单
Ctrl+Alt+Break 在窗口模式和全屏之间切换
Ctrl+Alt+End 显示Windows安全性对话框
Alt+Delete 显示当前窗口的系统菜单
Ctrl+Alt+-(小键盘减号) 当前活动窗口截图
Ctrl+Alt++(小键盘加号) 全屏截图
Ctrl+Alt+向右键 从远程桌面控件“跳转”到主机程序中的控件(如按钮或文本框)。将远程桌面控件嵌入到其他(主机)程序后,此功能非常有用。
Ctrl+Alt+向左键 从远程桌面控件“跳转”到主机程序中的控件(如按钮或文本框)。将远程桌面控件嵌入到其他(主机)程序后,此功能非常有用。

8. 画图键盘快捷方式 

下表包含了使用画图的键盘快捷方式。
按键 功能
Ctrl+N 创建新的图片
Ctrl+O 打开现有图片
Ctrl+S 将更改保存到图片
F12 将此图片另存为新文件
Ctrl+P 打印图片
Alt+F4 关闭图片及其画图窗口
Ctrl+Z 撤消更改
Ctrl+Y 恢复更改
Ctrl+A 选择整个图片
Ctrl+X 剪切选择内容
Ctrl+C 将选择内容复制到剪贴板
Ctrl+V 从剪贴板粘贴选择内容
向右键 将选择内容或活动图形向右移动一个像素
向左键 将选择内容或活动图形向左移动一个像素
向下键 将选择内容或活动图形向下移动一个像素
向上键 将选择内容或活动图形向上移动一个像素
Esc 取消某个选择
Delete 删除某个选择
Ctrl+B 粗体选择文本
Ctrl++ 将画笔、直线或形状轮廓的宽度增加一个像素
Ctrl+- 将画笔、直线或形状轮廓的宽度减少一个像素
Ctrl+I 将所选文本改为斜体
Ctrl+U 为所选文本添加下划线
Ctrl+E 打开“属性”对话框
Ctrl+W 打开“调整大小和扭曲”对话框
Ctrl+Page Up 放大
Ctrl+Page Down 缩小
F11 以全屏模式查看图片
Ctrl+R 显示或隐藏标尺
Ctrl+G 显示或隐藏网格线
F10 或 Alt 显示快捷键提示
Shift+F10 显示当前快捷菜单
F1 打开“画图”帮助

9. 写字板的键盘快捷方式 

按键 功能
Ctrl+N 新建一个文档
Ctrl+O 打开一个现有文档
Ctrl+S 将更改保存到文档
F12 将此文档另存为新文件
Ctrl+P 打印文档
Alt+F4 关闭“写字板”
Ctrl+Z 撤消更改
Ctrl+Y 恢复更改
Ctrl+A 选择整个文档
Ctrl+X 剪切选择内容
Ctrl+C 将选择内容复制到剪贴板
Ctrl+V 从剪贴板粘贴选择内容
Ctrl+B 将所选文本改为粗体
Ctrl+I 将所选文本改为斜体
Ctrl+U 为所选文本添加下划线
Ctrl+= 使选择的文本成为下标
Ctrl+Shift+= 使选择的文本成为上标
Ctrl+L 向左对齐文本
Ctrl+E 向中心对齐文本
Ctrl+R 向右对齐文本
Ctrl+J 对齐文本
Ctrl+1 设置单倍行距
Ctrl+2 设置双倍行距
Ctrl+5 将行距设置为 1.5
Ctrl+Shift+> 增加字体大小
Ctrl+Shift+< 减小字体大小
Ctrl+Shift+A 将字符更改为全部使用大写字母
Ctrl+Shift+L 更改项目符号样式
Ctrl+D 插入 Microsoft 画图图片
Ctrl+F 在文档中查找文本
F3 在“查找”对话框中查找文本的下一个实例
Ctrl+H 在文档中替换文本
Ctrl+向左键 将光标向左移动一个字
Ctrl+向右键 将光标向右移动一个字
Ctrl+向上键 将光标移动到上一行
Ctrl+向下键 将光标移动到下一行
Ctrl+Home 移动到文档的开头
Ctrl+End 移动到文档的结尾
Ctrl+Page Up 向上移动一个页面
Ctrl+Page Down 向下移动一个页面
Ctrl+Delete 删除下一个字
F10 显示快捷键提示
Shift+F10 显示当前快捷菜单
F1 打开“写字板”帮助

10. 计算器的键盘快捷方式 

按键 功能
Atl+1 切换到标准模式
Alt+2 切换到科学型模式
Alt+3 切换到程序员模式
Alt+4 切换到统计信息模式
Ctrl+E 打开日期计算
Ctrl+H 将计算历史记录打开或关闭
Ctrl+U 打开单位转换
Alt+C 计算或解决日期计算和工作表
F1 打开“计算器”帮助
Ctrl+Q 按下 M- 按钮
Ctrl+P 按下 M+ 按钮
Ctrl+M 按下 MS 按钮
Ctrl+R 按下 MR 按钮
Ctrl+L 按下 MC 按钮
% 按下 % 按钮
F9 按下 +/– 按钮
/ 按下 / 按钮
* 按下 * 按钮
+ 按下 + 按钮
– 按下 – 按钮
R 按下 1/× 按钮
@ 按下平方根按钮
0-9 按下数字按钮 (0-9)
= 按下 = 按钮
. 按下 .(小数点)按钮
Backspace 按下 Backspace 按钮
Esc 按下 C 按钮
Del 按下 CE 按钮
Ctrl+Shift+D 清除计算历史记录
F2 编辑计算历史记录
向上箭头键 在计算历史记录中向上导航
向下箭头键 在计算历史记录中向下导航
Esc 取消编辑计算历史记录
Enter 编辑后重新计算计算历史记录
F3 在科学型模式下选择“角度”
F4 在科学型模式下选择“弧度”
F5 在科学型模式下选择“梯度”
I 在科学型模式下按 Inv 按钮
D 在科学型模式下按 Mod 按钮
Ctrl+S 在科学型模式下按 sinh 按钮
Ctrl+O 在科学型模式下按 cosh 按钮
Ctrl+T 在科学型模式下按 tanh 按钮
( 在科学型模式下按 ( 按钮
) 在科学型模式下按 ) 按钮
N 在科学型模式下按 ln 按钮
; 在科学型模式下按 Int 按钮
S 在科学型模式下按 sin 按钮
O 在科学型模式下按 cos 按钮
T 在科学型模式下按 tan 按钮
M 在科学型模式下按 dms 按钮
P 在科学型模式下按 pi 按钮
V 在科学型模式下按 F-E 按钮
X 在科学型模式下按 Exp 按钮
Q 在科学型模式下按 x^2 按钮
Y 在科学型模式下按 x^y 按钮
# 在科学型模式下按 x^3 按钮
L 在科学型模式下按 log 按钮
! 在科学型模式下按 n! 按钮
Ctrl+Y 在科学型模式下按 y√x 按钮
Ctrl+B 在科学型模式下按 3√x 按钮
Ctrl+G 在科学型模式下按 10x 按钮
F5 在程序员模式下选择 Hex
F6 在程序员模式下选择 Dec
F7 在程序员模式下选择 Oct
F8 在程序员模式下选择 Bin
F12 在程序员模式下选择 Qword
F2 在程序员模式下选择 Dword
F3 在程序员模式下选择 Word
F4 在程序员模式下选择 Byte
K 在程序员模式下按 RoR 按钮
J 在程序员模式下按 RoL 按钮
% 在程序员模式下按 Mod 按钮
( 在程序员模式下按 ( 按钮
) 在程序员模式下按 ) 按钮
| 在程序员模式下按 Or 按钮
^ 在程序员模式下按 Xor 按钮
~ 在程序员模式下按 Not 按钮
& 在程序员模式下按 And 按钮
A-F 在程序员模式下按 A-F 按钮
空格键 在程序员模式下切换位值
A 在统计信息模式下按 Average 按钮
Ctrl+A 在统计信息模式下按 Average Sq 按钮
S 在统计信息模式下按 Sum 按钮
Ctrl+S 在统计信息模式下按 Sum Sq 按钮
T 在统计信息模式下按 S.D. 按钮
Ctrl+T 在统计信息模式下按 Inv S.D. 按钮
D 在统计信息模式下按 CAD 按钮

11. Windows 日记本键盘快捷方式 

下表包含了使用 Windows 日记的键盘快捷方式。
按键 功能
Ctrl+N 开始新的便笺
Ctrl+O 打开最近使用的便笺
Ctrl+S 将更改保存到便笺
Ctrl+Shift+V 将便笺移动到特定的文件夹
Ctrl+P 打印便笺
Alt+F4 关闭便笺及其日记本窗口
Ctrl+Z 撤消更改
Ctrl+Y 恢复更改
Ctrl+A 选择页面上的所有项目
Ctrl+X 剪切选择内容
Ctrl+C 将选择内容复制到剪贴板
Ctrl+V 从剪贴板粘贴选择内容
Esc 取消某个选择
Delete 删除某个选择
Ctrl+F 开始基本查找
Ctrl+G 转到页面
F5 刷新查找结果
F5 刷新便笺列表
F6 在便笺列表和便笺之间切换
Ctrl+Shift+C 显示便笺列表中列标题的快捷菜单
F11 以全屏模式查看便笺
F1 打开“日记本”帮助

12. Windows 帮助查看器键盘快捷方式 

下表包含了帮助查看器使用的键盘快捷方式。
按键 功能
Alt+C 显示目录
Alt+N 显示“连接设置”菜单
F10 显示“选项”菜单
Alt+向左键 返回先前查看过的主题
Alt+向右键 向前移动到下一个(先前已查看过的)主题
Alt+A 显示客户支持页面
Alt+Home 显示帮助和支持主页
Home 移动到主题的开头
End 移动到主题的末尾
Ctrl+F 搜索当前主题
Ctrl+P 打印主题
F3 将光标移动到搜索框

附录:注释

[1]:参见在线英文版 Windows 7 Keyboard shortcuts .
[2]:当初组织翻译时,只搜过网上内容以避免重复翻译,忽略了自带的帮助文件。但无论如何,以我的经验,翻译是比阅读最有效的学习方式——某种程度可以说,学习速度与效果是成反比的

Posted in Uncategorized | Leave a comment

Print text in Oracle SQL Developer DBMS_OUTPUT.put_line

set serveroutput on format wrapped;
begin
DBMS_OUTPUT.put_line(‘simple comment’);
end;
/

— do something
select acer.issue_util.getCardPrtInd(‘F0018890P’, ‘M’,”,”,”,”,”) from dual;

— do something

begin
DBMS_OUTPUT.put_line(‘second simple comment’);
end;
/

Posted in Uncategorized | Leave a comment