MantisChess -- A Chinese Chess Program
Copyright (C) Chen Chengtao, China
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
of the License, or (at your Option) any later version.
% [BestPop,Trace]=fmaxga(FUN,LB,UB,eranum,popsize,pcross,pmutation)
% Finds a maximum of a function of several variables.
% fmaxga solves problems of the form:
% max F(X) subject to: LB <= X <= UB
% BestPop--------最優的群體即為最優的染色體群
% Trace----------最佳染色體所對應的目標函數值
% FUN------------目標函數
% LB-------------自變量下限
% UB-------------自變量上限
% eranum---------種群的代數,取100--1000(默認1000)
% popsize--------每一代種群的規模;此可取50--100(默認50)
% pcross---------交叉的概率,此概率一般取0.5--0.85之間較好(默認0.8)
% pmutation------變異的概率,該概率一般取0.05-0.2左右較好(默認0.1)
% Options--------1×2矩陣,Options(1)=0二進制編碼(默認0),Option(1)~=0十進制編碼,Option(2)設定求解精度(默認1e-4)
Predefined Style Options define the style by setting several other Options. If other Options are also used, the placement of the predefined style Option in the command line is important. If the predefined style Option is placed first, the other Options may override the predefined style. If placed last, the predefined style will override the other Options.
For example the style --style=ansi sets the Option --brackets=break . If the command line specifies "--style=ansi --brackets=attach", the brackets will be attached and the style will not be ansi style. If the order on the command line is reversed to "--brackets=attach --style=ansi ", the brackets will be broken (ansi style) and the attach Option will be ignored.
For the Options set by each style check the parseOption function in astyle_main.cpp
Visual Basic 6.0可以通過調用API函數格式化一個磁盤,無論是軟盤還是硬盤。
打開一個新的項目(工程1) ,如果你沒有更改過缺省模式,那么Visual Basic 6.0會自動添加一個form1文件,在form1上添加一個命令控件,將下面的代碼拷入。
Option Explicit
Private Declare Function SHFormatDrive Lib"shell32"( ByVal Hend AS Long,ByVal Drive AS Long,ByVal FormatID AS Long,ByVal Options AS Long) as Long
Private Sub FormatDisk(intDrive as integer,blnQuickFormat as Boolean)
dim lngReturn As Long
if (blnQuickFormat) then
lngReturn= SHFormatDrive(0,intDrive,0&,1&)
else
lngReturn= SHFormatDrive(0,intDrive,0&,0&)
end if
end Sub
Private Sub Command1_Click()
call FormatDisk(0,True)
End Sub
運行此程序。
注意FormatDisk函數的第一個變量很重要,他的值是0,1,2時代表格式化的分別是:A、B、C盤。
About:
Paco (pacKAGE oRGANIZER) is a simple, yet powerful tool to aid package management when installing programs from source code. It uses the LD_PRELOAD method to track package installations, and provides various Options to keep the installed software organized. It s mainly a command line application but it has also an Optional GTKMM interface.
Release focus: Minor bugfixes
Changes:
Libpaco-log has been rewritten in C. This prevents a glibc installation failure when building LFS in chapter 6. The Option -x|--expand has been removed. Several bugs have been fixed in paco, gpaco, and rpm2paco.
Author:
David Rosal
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
of the License, or (at your Option) any later version.