今年是龙年,大家都想生一个龙baby,但是我们中国的农历年应该从什么时候开始计算了
1.现在的农历年是每年的农历一月初一,是从民国时开始的;
2.真正的农历年开始应该从春分开始计算。2012年也就是阳历2月4号。
今年是龙年,大家都想生一个龙baby,但是我们中国的农历年应该从什么时候开始计算了
1.现在的农历年是每年的农历一月初一,是从民国时开始的;
2.真正的农历年开始应该从春分开始计算。2012年也就是阳历2月4号。
IC 测试基本原理:drive inputs to the DUT(device under test), and measures signals
from the DUT
给一个输入,根据DUT的逻辑来测量输出
Digital: drive low/high, measure low/high
输入高低电平或电流, 测量高低电平或电流;
Analog: drive sine singal, measure signal-to-noise ratio(SNR) ;
输入sin波,测量信噪比;
这里需要感谢傅立叶:
任何一个波形都可以分解成无限多个sine波的叠加;
时域和频域可以相互转换
RF: ?
Memory: ?
Using vi edit multiple file:
1. vi -p file1 file2 file3
2. siwth with :tabn and :tabp
3. list all tabs with :tabs or :tabl
4. add new tab with :tabnew fil4
http://www.techrepublic.com/blog/opensource/use-tabs-to-open-multiple-files-
in-vim/678
http://www.cyberciti.biz/faq/vim-editing-multiple-files-with-windows-buffers/
command-line window of vim就是把vim在:模式下输入的命令列出来的窗口,当你保存文件时,按错键,会进入该窗口;
下面两种方法会进入该窗口:
There are two ways to open the command-line window:
1. From Command-line mode, use the key specified with the ‘cedit’ option.
The default is CTRL-F when ‘compatible’ is not set.
2. From Normal mode, use the “q:”, “q/“ or “q?” command.
This starts editing an Ex command-line (“q:”) or search string (“q/“ or
“q?”). Note that this is not possible while recording is in progress (the
“q” stops recording then).
如何退出:
把它当成正常的文件输入:q,就可以退出了。
the color of ls command output:
my current LS_COLORS is
‘di=36;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:exit’
http://linux-sxs.org/housekeeping/lscolors.html
http://geoff.greer.fm/lscolors/
the color of vi highlight:
turn highlight :syntax on
change the comment color in vim:
1. when vi edit file, input
:highlight Comment ctermfg=darkcyan
2. touch ~/.vimrc file
add ‘hi Comment ctermfg=darkcyan’ to .vimrc file, restart shell
VBA入门
http://blog.csdn.net/sunxing007/article/details/5658384
1. alt+F11 vba编程界面
2. Excel cell color and color index map:
#00FF00 4
#CCFFCC 35
FFFF00 6
FF0000 3
C0C0C0 15
http://dmcritchie.mvps.org/excel/colors.htm
3. when copy sheet to another workbook, the color of some cell is lost. You
should first copy the custom color from source workbook to target workbook;
attention: when you change the color, but the color index is not change;
Such as: normally color index is map to #008000; when you changed the stardard
color to #CCFFCC, but the color index
is not change.
http://www.excelbanter.com/showthread.php?t=102323
‘ copy color
targetWorkbook.Colors = targetWorkbook1.Colors
4. select and open excel file
Dim NewFN As String
Dim targetWorkbook1 As Workbook
NewFN = Application.GetOpenFilename(FileFilter:=”Excel Files (.xls), .xls”,
title:=”Please select first file”)
If Len(NewFN) = 0 Then
‘ They pressed Cancel
MsgBox “Stopping because you did not select a file”
Exit Sub
Else
Set targetWorkbook1 = Workbooks.Open(Filename:=NewFN, ReadOnly:=False)
End If
5. the last sheet of excel can not be delete
Sub RemoveAllSheet(ByRef wb As Workbook)
Application.DisplayAlerts = False
Dim sh As Worksheet
For Each sh In wb.Worksheets
If sh.Name <> “Sheet1” Then sh.Delete
Next
Application.DisplayAlerts = True
End Sub
6. sheet copy
Sub CopyFirtstSheetToTarget(ByRef souce As Workbook, ByRef Target As Workbook)
Application.DisplayAlerts = False
souce.Sheets(1).Copy after:=Target.Sheets(“Sheet1”)
‘ rename
Dim sheetName As String
sheetName = ActiveSheet.Name
ActiveSheet.Name = souce.Name & “_” & sheetName
Application.DisplayAlerts = True
End Sub
7. get table range
Sub GetTableRange(ByRef lastTableIndex As Integer)
Last = ActiveSheet.Underline(Rows.count, “A”).End(xlUp).Row
Dim myInterior As Interior
For i = TABLE_START_INDEX To Last
Set myInterior = ActiveSheet.Underline(i, “B”).Interior
If (myInterior.ColorIndex = 5) Then
lastTableIndex = i
End If
Next i
End Sub
8. delete all content
Sub DeleteAllContent()
ActiveSheet.Underline.Clear
End Sub
给swt中的control追加Paintlistener,listener被调用的先后顺序和Control 被布局(不包括父子关系)的先后顺序有关
;
每个Control 都在org.eclipse.swt.widgets.Display类中的变量:Control [] controlTable;
按照被布局的先后顺序被组织起来;
在调用PaintListener时,Control已经有size了;
因为parent和child的PaintListener被调用的先后顺序不一样,所以
不要在父亲里面去取孩子的相关信息,每个Control取得自己的信息和进行Paint就好
检查 MANIFEST.MF文件是否包含 “Bundle-Localization: plugin” ,没有的话,就表示两种没有关联起来;
http://stackoverflow.com/questions/1831117/what-is-the-osgi-bundle-package-
structure
常用的OSGi Manifest header:
http://wiki.osgi.org/wiki/Category:Manifest_Header
1. 启动vnc server:
vncserver -geometry 1590x1180 -depth 24
//它会启动vncserver,同时屏幕的分辨率是1590x1180,会自动分配vnc端口号;这个端口号会在连接server时用的;
当然你也可以指定端口号,但是前提是该端口号没有被占用;
vncserver -geometry 1590x1180 -depth 24 :2
2. 连接vnc server,在windows下有两个vnc viewer,一个是tightvnc,一个是RealVNC,
tightvnc是开源的,但是在连接server之后,alt+tab组合键失效,可以保存密码,可以将配置保存成文件。
RealVNC viewer免费的,但是下载之前需要注册信息,alt+tab组合键可以使用,但是不能保存密码,不能将配置保存成文件。
3. kill vnc server
vncserver -kill :端口号
4. 在vncserver和vncviewer之间使copy/paste可用:
vncconfig -nowin &