1.openwrt javaç¯å¢
2.vb6怎样读取win10下硬盘序列号
3.linuxlocate
4.linux系统管理命令shutdown源码linux系统管理命令
openwrt javaç¯å¢
jikes jamvm å classpath
æ¥çæ¹æ³ï¼
ipkg list |grep jamvm
å®è£
ipkg install jikes classpath jamvm
ç¶åbinä¸é¢ä¼æ jamvm
ln -s /opt/bin/jamvm /opt/bin/java
java -> /opt/bin/jamvm
===================
/opt/bin # java -version
java version "1.5.0"
JamVM version 1.5.4
Copyright (C) - Robert Lougher <rob@jamvm.org.uk>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2,
or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Build information:
Execution Engine: inline-threaded interpreter with stack-caching
Compiled with: gcc 4.2.3
Boot Library Path: /opt/lib/classpath
Boot Class Path: /opt/share/jamvm/classes.zip:/opt/share/classpath/glibj.zip
===================
javaå½ä»¤å¯ç¨ï¼åæ ·å¨æ¾ tomcatçæ¹æ³ï¼çè¿ä¸ä¸ªå¸ååç
tomcatéè¦ä¿®æ¹confæ件ï¼ä½¿ç¨jikes解æclassæ件
å®å¨çä¸ä¸å»å°å¤è´´ winç¯å¢çç©æçï¼å å享ä¸é¨åç»éªå§~
vb6怎样读取win下硬盘序列号
vb6读取win下硬盘序列号方法如下:1、是指硬盘物理序列号,格式化没有变化。
2、支持vista 及win系统。饿了吗程序源码
3、vpn全套源码支持多块硬盘(有的电脑装有几块硬盘)
4、支持串口及并口硬盘。
5、最好是源码或dll 等,代码如下:
Visual Basic code
'-------------------添加类模块clsMainInfo-------------------------
Option Explicit
Private Const VER_PLATFORM_WINS = 0
Private Const VER_PLATFORM_WIN_WINDOWS = 1
Private Const VER_PLATFORM_WIN_NT = 2
Private Const DFP_RECEIVE_DRIVE_DATA = &H7C
Private Const FILE_SHARE_READ = &H1
Private Const FILE_SHARE_WRITE = &H2
Private Const GENERIC_READ = &H
Private Const GENERIC_WRITE = &H
Private Const OPEN_EXISTING = 3
Private Const Create_NEW = 1
Private Enum HDINFO
HD_MODEL_NUMBER
HD_SERIAL_NUMBER
HD_FIRMWARE_REVISION
End Enum
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String *
End Type
Private Type IDEREGS
bFeaturesReg As Byte
bSectorCountReg As Byte
bSectorNumberReg As Byte
bCylLowReg As Byte
bCylHighReg As Byte
bDriveHeadReg As Byte
bCommandReg As Byte
bReserved As Byte
End Type
Private Type SENDCMDINPARAMS
cBufferSize As Long
irDriveRegs As IDEREGS
bDriveNumber As Byte
bReserved(1 To 3) As Byte
dwReserved(1 To 4) As Long
End Type
Private Type DRIVERSTATUS
bDriveError As Byte
bIDEStatus As Byte
bReserved(1 To 2) As Byte
dwReserved(1 To 2) As Long
End Type
Private Type SENDCMDOUTPARAMS
cBufferSize As Long
DStatus As DRIVERSTATUS
bBuffer(1 To ) As Byte
End Type
Private Declare Function GetVersionEx _
Lib "kernel" Alias "GetVersionExA" _
(lpVersionInformation As OSVERSIONINFO) As Long
Private Declare Function CreateFile _
Lib "kernel" Alias "CreateFileA" _
(ByVal lpFileName As String, _
ByVal dwDesiredAccess As Long, _
ByVal dwShareMode As Long, _
ByVal lpSecurityAttributes As Long, _
ByVal dwCreationDisposition As Long, _
ByVal dwFlagsAndAttributes As Long, _
ByVal hTemplateFile As Long) As Long
Private Declare Function CloseHandle _
Lib "kernel" _
(ByVal hObject As Long) As Long
Private Declare Function DeviceIoControl _
Lib "kernel" _
(ByVal hDevice As Long, _
ByVal dwIoControlCode As Long, _
lpInBuffer As Any, _
ByVal nInBufferSize As Long, _
lpOutBuffer As Any, _
ByVal nOutBufferSize As Long, _
lpBytesReturned As Long, _
ByVal lpOverlapped As Long) As Long
Private Declare Sub ZeroMemory _
Lib "kernel" Alias "RtlZeroMemory" _
(dest As Any, _
ByVal numBytes As Long)
Private Declare Sub CopyMemory _
Lib "kernel" Alias "RtlMoveMemory" _
(Destination As Any, _
Source As Any, _
ByVal Length As Long)
Private Declare Function GetLastError _
Lib "kernel" () As Long
Private mvarCurrentDrive As Byte
Private mvarPlatform As String
Public Function GetModelNumber() As String
GetModelNumber = CmnGetHDData(HD_MODEL_NUMBER)
End Function
Public Function GetSerialNumber() As String
GetSerialNumber = CmnGetHDData(HD_SERIAL_NUMBER)
End Function
Public Function GetFirmwareRevision() As String
GetFirmwareRevision = CmnGetHDData(HD_FIRMWARE_REVISION)
End Function
Public Property Let CurrentDrive(ByVal vData As Byte)
If vData < 0 Or vData > 3 Then
Err.Raise , , "Illegal Drive Number"
End If
mvarCurrentDrive = vData
End Property
Public Property Get CurrentDrive() As Byte
CurrentDrive = mvarCurrentDrive
End Property
Public Property Get Platform() As String
Platform = mvarPlatform
End Property
Private Sub Class_Initialize()
Dim OS As OSVERSIONINFO
OS.dwOSVersionInfoSize = Len(OS)
Call GetVersionEx(OS)
mvarPlatform = "Unk"
Select Case OS.dwPlatformId
Case Is = VER_PLATFORM_WINS
mvarPlatform = "S"
Case Is = VER_PLATFORM_WIN_WINDOWS
If OS.dwMinorVersion = 0 Then
mvarPlatform = "W"
Else
mvarPlatform = "W"
End If
Case Is = VER_PLATFORM_WIN_NT
mvarPlatform = "WNT"
End Select
End Sub
Private Function CmnGetHDData(hdi As HDINFO) As String
Dim bin As SENDCMDINPARAMS
Dim bout As SENDCMDOUTPARAMS
Dim hdh As Long
Dim br As Long
Dim ix As Long
Dim hddfr As Long
Dim hddln As Long
Dim s As String
Select Case hdi
Case HD_MODEL_NUMBER
hddfr =
hddln =
Case HD_SERIAL_NUMBER
hddfr =
hddln =
Case HD_FIRMWARE_REVISION
hddfr =
hddln = 8
Case Else
Err.Raise , "Illegal HD Data type"
End Select
Select Case mvarPlatform
Case "WNT"
hdh = CreateFile("\\.\PhysicalDrive" & mvarCurrentDrive, GENERIC_READ + GENERIC_WRITE, FILE_SHARE_READ + FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0)
Case "W", "W"
hdh = CreateFile("\\.\Smartvsd", 0, 0, 0, Create_NEW, 0, 0)
Case Else
Err.Raise , , "Illegal platform (only WNT, W or W)"
End Select
If hdh = 0 Then
Err.Raise , , "Error on CreateFile"
End If
ZeroMemory bin, Len(bin)
ZeroMemory bout, Len(bout)
With bin
.bDriveNumber = mvarCurrentDrive
.cBufferSize =
With .irDriveRegs
If (mvarCurrentDrive And 1) Then
.bDriveHeadReg = &HB0
Else
.bDriveHeadReg = &HA0
End If
.bCommandReg = &HEC
.bSectorCountReg = 1
.bSectorNumberReg = 1
End With
End With
DeviceIoControl hdh, DFP_RECEIVE_DRIVE_DATA, bin, Len(bin), bout, Len(bout), br, 0
s = vbNullString
For ix = hddfr To hddfr + hddln - 1 Step 2
If bout.bBuffer(ix + 1) = 0 Then Exit For
s = s & Chr(bout.bBuffer(ix + 1))
If bout.bBuffer(ix) = 0 Then Exit For
s = s & Chr(bout.bBuffer(ix))
Next ix
CloseHandle hdh
CmnGetHDData = Trim(s)
End Function
Visual Basic code
Option Explicit
'纯vb的获取硬盘序列号代码 (摘自枕善居)
'窗体放置1个ComBox,命名为cbDrive,1个ListBox,命名为lstMain,一个CommandButton,采集源码52命名为cmdGo,添加如下代码
Dim h As clsMainInfo
Private Sub cmdGo_Click()
Dim hT As Long
Dim uW() As Byte
Dim dW() As Byte
Dim pW() As Byte
Set h = New clsMainInfo
With h
.CurrentDrive = Val(cbDrive.Text)
lstMain.Clear
lstMain.AddItem "当前驱动器: " & .CurrentDrive
lstMain.AddItem ""
lstMain.AddItem "硬盘型号: " & .GetModelNumber
lstMain.AddItem "序列号: " & .GetSerialNumber
lstMain.AddItem "固件版本: " & .GetFirmwareRevision
End With
Set h = Nothing
End Sub
Private Sub Form_Load()
cbDrive.AddItem 0
cbDrive.AddItem 1
cbDrive.AddItem 2
cbDrive.AddItem 3
cbDrive.ListIndex = 0
End Sub
linuxlocate
linuxæ¥è¯¢å½ä»¤ï¼1.find
findæ¯æ常è§åæ强大çæ¥æ¾å½ä»¤ï¼ä½ å¯ä»¥ç¨å®æ¾å°ä»»ä½ä½ æ³æ¾çæ件ã
2.locate
locateå½ä»¤å ¶å®æ¯find-nameçå¦ä¸ç§åæ³ï¼ä½æ¯è¦æ¯åè å¿«å¾å¤ï¼åå å¨äºå®ä¸æç´¢å ·ä½ç®å½ï¼èæ¯æç´¢ä¸ä¸ªæ°æ®åºã
3.whereis
whereiså½ä»¤åªè½ç¨äºç¨åºåçæç´¢ï¼èä¸åªæç´¢äºè¿å¶æ件ï¼åæ°-bï¼ãman说ææ件ï¼åæ°-mï¼åæºä»£ç æ件ï¼åæ°-sï¼ã
4.which
whichå½ä»¤çä½ç¨æ¯ï¼å¨PATHåéæå®çè·¯å¾ä¸ï¼æç´¢æ个系ç»å½ä»¤çä½ç½®ï¼å¹¶ä¸è¿å第ä¸ä¸ªæç´¢ç»æã
5.type
typeå½ä»¤å ¶å®ä¸è½ç®æ¥æ¾å½ä»¤ï¼å®æ¯ç¨æ¥åºåæ个å½ä»¤å°åºæ¯ç±shellèªå¸¦çï¼è¿æ¯ç±shellå¤é¨çç¬ç«äºè¿å¶æ件æä¾çã
linuxä¸cè¯è¨åºå½æ°ç®å½ï¼
ä¸è¬æ¥è¯´æ¯æ¾å¨/usr/includeç®å½ä¸çï¼
ä½æ¯è¿ä¸ªå¹¶ä¸å±éä¹æ¯å¯æ§çï¼å¦ææ们è¿è¡å¼åè¿ç¨ä¸ï¼å°±ä¼å¨å æ ¸çåºå½æ°æ件ç®å½ï¼
ä¾å¦å¨:/XXX/XXX/linux-X.X/include
æä»¥æ ¹æ®ä¸åçæ åµï¼å¤´æ件åæ¾çç®å½ä¹æ¯ä¸åçï¼å ·ä½éè¦å¯ä»¥æ ¹æ®locateågrepå½ä»¤è¿è¡æ¥è¯¢ã
å¦ä½å¨linuxä¸ç¨å½ä»¤å®ç°ç¨æ·åç»ç管çï¼
Linuxä¸ç¨å½ä»¤å®ç°æ¬å°ç¨æ·åç»ç管ç
æ¬å°ç¨æ·åç»ï¼ç®¡çæ件åè¿ç¨çç
æ¬å°ç¨æ·åç»ï¼
1ï¼root:è¶ çº§ç®¡çåç³»ç»å建ç第ä¸ä¸ªè´¦æ·
ç¹ç¹ï¼
id为:0
家ç®å½ï¼/root
å ·æç³»ç»çå®å ¨æ§å¶æ:å°å¿ä½¿ç¨ã
#id
uid=0(root)gid=0(root)groups=0(root)context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c
#
2ï¼æ®éç¨æ·ï¼ä¸å ·æ管çåæé
ç¹ç¹ï¼
idèå´ï¼
=id=
家ç®å½ï¼/home/ç¨æ·å
#idstudent
uid=(student)gid=(student)groups=(student),(wheel)
#
3ï¼æå¡ç¨æ·ï¼ä¸ºæå¡æä¾æé
ç¹ç¹ï¼
idèå´ï¼
0id
家ç®å½ï¼åºç¨ç¨åºæå¡ç®å½
#idapache
uid=(apache)gid=(apache)groups=(apache)
#
å¦ææ¯yumï¼rpmå®è£ ç软件ï¼ç±rpmå ä¸çèæ¬å建æå¡è´¦æ·
Includeconf.modules.d/*.conf
#
#Ifyouwish。
Linux操作系统的基本功能3:创新能力
“如果你总是使用微软的开发工具,你一生只能做个操作人员。”这话一点都不假.linux是自由软件,而自由软件和非自由软的信息类 源码区别在于:
1.自由软件是开放的,成千上万的人可以检查这个软件,快速地找到并修改其错误码。
2.最终用户可以按照自己的意愿自定义自由软件,有特殊需要的寻秦记gotv源码用户也可以完全按照他们认为合适的方式定制自己的Linux。
3.自由软件为了防止重复发明,通过共享源代码和思想来节省很多工作量。
Linux操作系统的基本功能4:UNIX能力
人们所以选择Linux的又一个重要原因是在于它的UNIX兼容性。由于Linux是一套自由软件,用户可以无偿地得到它及其源代码,无偿地获得大量的应用程序,还可以任意地修改和补充它们。这对用户学习、了解UNIX操作系统的内核非常有益。可以说Linux为广大用户提供了一个在家里学习和使用UNIX操作系统的廉价的机会。