每天进步一点点
Welcome ,My new friends!!!
posts - 11,comments - 1,trackbacks - 0
     摘要:       上次出去帮一个朋友的朋友给一个原有的.net项目添加一个新的功能模块。结果,很伤,原因很简单,由于我对dotnet的工作机理想当然,个人观点占据上风,导致在初期设计的时候就走上了一天错误的道路,郁闷了很长一段时间,决定花一定时间去真正理解一些更底层,更基础的东西。现在忽然发现自己在过去很长的一段时间有些舍本逐末了,检讨~~~~ 这...  阅读全文
posted @ 2009-05-27 11:38 moonandsun 阅读(411) | 评论 (0)编辑 收藏

web2.0这个名词不止一次的在我眼前出现,有时候由于它的出现过于频繁,以至于我还没来得及去想,已渐渐的在内心中接受了这个名词。初识web2.0是在去年,具体什么时候已记不太清楚,当初我脑海中的web2.0和我现在的认识不尽相同,我当时的认识只是web2.0的一个方面,甚至可以说与我们所说的web2.0不相关。当时我和我的几个师兄在一起做一个web项目,当然他们常常会提到web2.0标准,起初我不是很理解,当然现在也依然模糊。从网上在了点资料。网上如是说:WEB2.0标准不是某一个标准,而是一系列标准的集合。网页主要由三部分组成:结构(Structure)、表现(Presentation)和行为(Behavior)。对应的标准也分三方面:结构化标准语言主要包括XHTML和XML,表现标准语言主要包括CSS,行为标准主要包括对象模型(如W3C DOM)、ECMAScript等。这些标准大部分由W3C起草和发布,也有一些是其他标准组织制订的标准,比如ECMA(European Computer Manufacturers Association)的ECMAScript标准。恍然大明白,原来自己在很长一段时间都在为web2.0标准努力。不由暗暗自喜。后来,每次上网,看杂志(尤其程序员),看报纸(电脑报),web2.0的字眼是满天飞。既然自己要考研,并且准备在计算机方面发展,我认为有必要了解web2.0。


web2.0是相对于web1.0来说的. 首先就易用性和交互性方面来说,Web1.0里,互联网内容是由少数编辑人员(或站长)定制的,比如搜狐;而在Web2.0里,每个人都是内容的供稿者。标由于web2.0主张多然参与,所以互联网内容也更加丰富和多样化,同时web2.0采用了标签(tag),多媒体技术,rss订阅,在线协作等功能,用户在使用互联网的过程也更方便、快捷。就我的一个上网习惯来说,我关注最多的是IT技术方面的发展,一般我经常去csdn,cnblogs,itpub等网站,以前我看文章都是一个网站一个网站的打开,有时候发现某个人的博客很适合自己的口味,于是想关注这位博主的最新动态,于是收藏的网址越来越多,每天想把自己关注的事情看一遍很费时间。现在可不一样了,发现自己的喜欢网站或博客,订阅到自己的google reader中,每天上网第一件事,打开google reader,有什么最新新闻,最新动态一目了然。都是互联网提供的便利啊。

其次,web2.0相对于web1.0来说更突出人的作用,在互联网的新时代,信息是由每个人贡献出来的。各个人共同组成互联网信息源。Web2.0的灵魂是人。同是,为了更好的发挥“人”的作用,web2.0的形式也更多样化,出现了各种各样的互联网服务,例如博客、威客、播客、维基、P2P下载、社区、分享服务等等。是“人”能够从互联网上得到不同程度上的满足。现如今,用户即所谓的“人”所产生的信息在互联网内容中所占的比重越来越大,而且随着web2.0的发展,这一趋势还会不断加强。web2.0为所有互联网用户提供了一个展示自我和自我实现的平台。而且随着互联网技术的发展,web2.0在生活信息化、办公信息化方面的作用也会一步步提升,是人们的生活、学习、工作更加便捷和轻松。

总之,web2.0从某种程度上改变了人们的生活。


 

posted @ 2009-05-20 21:14 moonandsun 阅读(158) | 评论 (0)编辑 收藏

        好长一段时间没有写日志,生活在繁忙中迷茫了一段,细细想来也不知道都干了些什么,于技术方面更是毫无长进,静下心来下篇文章,安抚一下浮躁的心灵。

        现在开始Maven2的学习。

        第一步不用说,下载Maven2,以待安装。

        其实我们有必要了解Maven2到底是一个干么的东西,要使用它首先得知道它是干么的。

        先看看ReadMe.txt

  What is it?
  -----------

  Maven is a software project management and comprehension tool. Based on
  the concept of a Project Object Model (POM), Maven can manage a project's
  build, reporting and documentation from a central piece of information.
 
         now we got it .it is a tool which can manage and  comprehend  our project .

         系统需求,一般我们都能达到,忽略。

 System Requirements
  -------------------

  JDK:
    1.4 or above (this is to execute Maven - it still allows you to build against 1.3
    and prior JDK's).
  Memory:
    No minimum requirement.
  Disk:
    No minimum requirement. Approximately 100MB will be used for your local repository,
    however this will vary depending on usage and can be removed and redownloaded at
    any time.
  Operating System:
    No minimum requirement. On Windows, Windows NT and above or Cygwin is required for
    the startup scripts. Tested on Windows XP, Fedora Core and Mac OS X.s
       
         下一步,安装。我建议看看文档。
 
  Installing Maven
  ----------------

  1) Unpack the archive where you would like to store the binaries, eg:

    Unix-based Operating Systems (Linux, Solaris and Mac OS X)
      tar zxvf apache-maven-2.0.x.tar.gz
    Windows 2000/XP
      unzip apache-maven-2.0.x.zip

  2) A directory called "apache-maven-2.0.x" will be created.

  3) Add the bin directory to your PATH, eg:

    Unix-based Operating Systems (Linux, Solaris and Mac OS X)
      export PATH=/usr/local/apache-maven-2.0.x/bin:$PATH
    Windows 2000/XP
      set PATH="c:\program files\apache-maven-2.0.x\bin";%PATH%

  4) Make sure JAVA_HOME is set to the location of your JDK


         我用的是winXP,看这句就可以了。

         set PATH="c:\program files\apache-maven-2.0.x\bin";%PATH% 

        其中 “c:\program files\apache-maven-2.0.x\bin”为maven2解压路径。

        最后一步测试一下是否成功。

  5) Run "mvn --version" to verify that it is correctly installed.

        


        OK,it works~~~


     














posted @ 2009-05-05 22:10 moonandsun 阅读(215) | 评论 (0)编辑 收藏

十进制,八进制,十六进制,二进制相互转换

' 用途:将十进制转化为二进
' 输入:Dec(十进制数)
' 输入数据类型:Long
' 输出:DEC_to_BIN(二进制数)
' 输出数据类型:String
' 输入的最大数为2147483647,输出最大数为1111111111111111111111111111111(31个1)
Public Function DEC_to_BIN(Dec As Long) As String
    DEC_to_BIN = ""
    Do While Dec > 0
        DEC_to_BIN = Dec Mod 2 & DEC_to_BIN
        Dec = Dec \ 2
    Loop
End Function

' 用途:将二进制转化为十进制
' 输入:Bin(二进制数)
' 输入数据类型:String
' 输出:BIN_to_DEC(十进制数)
' 输出数据类型:Long
' 输入的最大数为1111111111111111111111111111111(31个1),输出最大数为2147483647
Public Function BIN_to_DEC(ByVal Bin As String) As Long
    Dim i As Long
    For i = 1 To Len(Bin)
        BIN_to_DEC = BIN_to_DEC * 2 + Val(Mid(Bin, i, 1))
    Next i
End Function

' 用途:将十六进制转化为二进制
' 输入:Hex(十六进制数)
' 输入数据类型:String
' 输出:HEX_to_BIN(二进制数)
' 输出数据类型:String
' 输入的最大数为2147483647个字符
Public Function HEX_to_BIN(ByVal Hex As String) As String
    Dim i As Long
    Dim B As String
    
    Hex = UCase(Hex)
    For i = 1 To Len(Hex)
        Select Case Mid(Hex, i, 1)
            Case "0": B = B & "0000"
            Case "1": B = B & "0001"
            Case "2": B = B & "0010"
            Case "3": B = B & "0011"
            Case "4": B = B & "0100"
            Case "5": B = B & "0101"
            Case "6": B = B & "0110"
            Case "7": B = B & "0111"
            Case "8": B = B & "1000"
            Case "9": B = B & "1001"
            Case "A": B = B & "1010"
            Case "B": B = B & "1011"
            Case "C": B = B & "1100"
            Case "D": B = B & "1101"
            Case "E": B = B & "1110"
            Case "F": B = B & "1111"
        End Select
    Next i
    While Left(B, 1) = "0"
        B = Right(B, Len(B) - 1)
    Wend
    HEX_to_BIN = B
End Function

' 用途:将二进制转化为十六进制
' 输入:Bin(二进制数)
' 输入数据类型:String
' 输出:BIN_to_HEX(十六进制数)
' 输出数据类型:String
' 输入的最大数为2147483647个字符
Public Function BIN_to_HEX(ByVal Bin As String) As String
    Dim i As Long
    Dim H As String
    If Len(Bin) Mod 4 <> 0 Then
        Bin = String(4 - Len(Bin) Mod 4, "0") & Bin
    End If
    
    For i = 1 To Len(Bin) Step 4
        Select Case Mid(Bin, i, 4)
            Case "0000": H = H & "0"
            Case "0001": H = H & "1"
            Case "0010": H = H & "2"
            Case "0011": H = H & "3"
            Case "0100": H = H & "4"
            Case "0101": H = H & "5"
            Case "0110": H = H & "6"
            Case "0111": H = H & "7"
            Case "1000": H = H & "8"
            Case "1001": H = H & "9"
            Case "1010": H = H & "A"
            Case "1011": H = H & "B"
            Case "1100": H = H & "C"
            Case "1101": H = H & "D"
            Case "1110": H = H & "E"
            Case "1111": H = H & "F"
        End Select
    Next i
    While Left(H, 1) = "0"
        H = Right(H, Len(H) - 1)
    Wend
    BIN_to_HEX = H
End Function

' 用途:将十六进制转化为十进制
' 输入:Hex(十六进制数)
' 输入数据类型:String
' 输出:HEX_to_DEC(十进制数)
' 输出数据类型:Long
' 输入的最大数为7FFFFFFF,输出的最大数为2147483647
Public Function HEX_to_DEC(ByVal Hex As String) As Long
    Dim i As Long
    Dim B As Long
    
    Hex = UCase(Hex)
    For i = 1 To Len(Hex)
        Select Case Mid(Hex, Len(Hex) - i + 1, 1)
            Case "0": B = B + 16 ^ (i - 1) * 0
            Case "1": B = B + 16 ^ (i - 1) * 1
            Case "2": B = B + 16 ^ (i - 1) * 2
            Case "3": B = B + 16 ^ (i - 1) * 3
            Case "4": B = B + 16 ^ (i - 1) * 4
            Case "5": B = B + 16 ^ (i - 1) * 5
            Case "6": B = B + 16 ^ (i - 1) * 6
            Case "7": B = B + 16 ^ (i - 1) * 7
            Case "8": B = B + 16 ^ (i - 1) * 8
            Case "9": B = B + 16 ^ (i - 1) * 9
            Case "A": B = B + 16 ^ (i - 1) * 10
            Case "B": B = B + 16 ^ (i - 1) * 11
            Case "C": B = B + 16 ^ (i - 1) * 12
            Case "D": B = B + 16 ^ (i - 1) * 13
            Case "E": B = B + 16 ^ (i - 1) * 14
            Case "F": B = B + 16 ^ (i - 1) * 15
        End Select
    Next i
    HEX_to_DEC = B
End Function
' 用途:将十进制转化为十六进制
' 输入:Dec(十进制数)
' 输入数据类型:Long
' 输出:DEC_to_HEX(十六进制数)
' 输出数据类型:String
' 输入的最大数为2147483647,输出最大数为7FFFFFFF
Public Function DEC_to_HEX(Dec As Long) As String
    Dim a As String
    DEC_to_HEX = ""
    Do While Dec > 0
        a = CStr(Dec Mod 16)
        Select Case a
            Case "10": a = "A"
            Case "11": a = "B"
            Case "12": a = "C"
            Case "13": a = "D"
            Case "14": a = "E"
            Case "15": a = "F"
        End Select
        DEC_to_HEX = a & DEC_to_HEX
        Dec = Dec \ 16
    Loop
End Function

' 用途:将十进制转化为八进制
' 输入:Dec(十进制数)
' 输入数据类型:Long
' 输出:DEC_to_OCT(八进制数)
' 输出数据类型:String
' 输入的最大数为2147483647,输出最大数为17777777777
Public Function DEC_to_OCT(Dec As Long) As String
    DEC_to_OCT = ""
    Do While Dec > 0
        DEC_to_OCT = Dec Mod 8 & DEC_to_OCT
        Dec = Dec \ 8
    Loop
End Function

' 用途:将八进制转化为十进制
' 输入:Oct(八进制数)
' 输入数据类型:String
' 输出:OCT_to_DEC(十进制数)
' 输出数据类型:Long
' 输入的最大数为17777777777,输出的最大数为2147483647
Public Function OCT_to_DEC(ByVal Oct As String) As Long
    Dim i As Long
    Dim B As Long
    
    For i = 1 To Len(Oct)
        Select Case Mid(Oct, Len(Oct) - i + 1, 1)
            Case "0": B = B + 8 ^ (i - 1) * 0
            Case "1": B = B + 8 ^ (i - 1) * 1
            Case "2": B = B + 8 ^ (i - 1) * 2
            Case "3": B = B + 8 ^ (i - 1) * 3
            Case "4": B = B + 8 ^ (i - 1) * 4
            Case "5": B = B + 8 ^ (i - 1) * 5
            Case "6": B = B + 8 ^ (i - 1) * 6
            Case "7": B = B + 8 ^ (i - 1) * 7
        End Select
    Next i
    OCT_to_DEC = B
End Function

' 用途:将二进制转化为八进制
' 输入:Bin(二进制数)
' 输入数据类型:String
' 输出:BIN_to_OCT(八进制数)
' 输出数据类型:String
' 输入的最大数为2147483647个字符
Public Function BIN_to_OCT(ByVal Bin As String) As String
    Dim i As Long
    Dim H As String
    If Len(Bin) Mod 3 <> 0 Then
        Bin = String(3 - Len(Bin) Mod 3, "0") & Bin
    End If
    
    For i = 1 To Len(Bin) Step 3
        Select Case Mid(Bin, i, 3)
            Case "000": H = H & "0"
            Case "001": H = H & "1"
            Case "010": H = H & "2"
            Case "011": H = H & "3"
            Case "100": H = H & "4"
            Case "101": H = H & "5"
            Case "110": H = H & "6"
            Case "111": H = H & "7"
        End Select
    Next i
    While Left(H, 1) = "0"
        H = Right(H, Len(H) - 1)
    Wend
    BIN_to_OCT = H
End Function

' 用途:将八进制转化为二进制
' 输入:Oct(八进制数)
' 输入数据类型:String
' 输出:OCT_to_BIN(二进制数)
' 输出数据类型:String
' 输入的最大数为2147483647个字符
Public Function OCT_to_BIN(ByVal Oct As String) As String
    Dim i As Long
    Dim B As String
    
    For i = 1 To Len(Oct)
        Select Case Mid(Oct, i, 1)
            Case "0": B = B & "000"
            Case "1": B = B & "001"
            Case "2": B = B & "010"
            Case "3": B = B & "011"
            Case "4": B = B & "100"
            Case "5": B = B & "101"
            Case "6": B = B & "110"
            Case "7": B = B & "111"
        End Select
    Next i
    While Left(B, 1) = "0"
        B = Right(B, Len(B) - 1)
    Wend
    OCT_to_BIN = B
End Function

' 用途:将八进制转化为十六进制
' 输入:Oct(八进制数)
' 输入数据类型:String
' 输出:OCT_to_HEX(十六进制数)
' 输出数据类型:String
' 输入的最大数为2147483647个字符
Public Function OCT_to_HEX(ByVal Oct As String) As String
    Dim Bin As String
    Bin = OCT_to_BIN(Oct)
    OCT_to_HEX = BIN_to_HEX(Bin)
End Function

' 用途:将十六进制转化为八进制
' 输入:Hex(十六进制数)
' 输入数据类型:String
' 输出:HEX_to_OCT(八进制数)
' 输出数据类型:String
' 输入的最大数为2147483647个字符
Public Function HEX_to_OCT(ByVal Hex As String) As String
    Dim Bin As String
    Hex = UCase(Hex)
    Bin = HEX_to_BIN(Hex)
    HEX_to_OCT = BIN_to_OCT(Bin)
End Function


VB自带函数:
十进制转八进制:Oct(num)
十六进制转八进制:oct("&H" & num)
十进制转十六进制:hex(num)
八进制转十六进制:hex("&O" & num)

十六进制转换为十进制
    Dim str As String                     
    str = Text2.Text
    Text10.Text = CLng("&H" & str)

文章出处:http://blog.programfan.com/article.asp?id=11903
感谢作者的无私奉献、、、、

posted @ 2009-03-29 10:57 moonandsun 阅读(1457) | 评论 (0)编辑 收藏