this m file can Find a (near) optimal solution to the Traveling Salesman Problem (TSP) by setting up a Genetic Algorithm (GA) to search for the shortest path (least distance needed to travel to each city exactly once)
Notes:
1. Input error checking included
2. Inputs can be specified in any order, so long as the parameter pairs are specified as a parameter , value
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盤。
With the release of PHP 5 web developers need a guide to developing with PHP 5 to both learn its complex new features and more fully implement the long-standing features on which PHP s success is built. PHP 5 in Practice is a reference guide that provides developers with easy-to-use and easily extensible code to solve common PHP problems. It focuses on providing real code solutions to problems, allowing the reader to learn by seeing exactly what is happening behind the scenes to get your solution. Because a real-life situation will rarely match the book s example problems precisely, PHP 5 in Practice explains the solution well enough that you will understand it and can learn how to truly solve your own problem.
This paper presents several low-latency mixed-timing
FIFO (first-in–first-out) interfaces designs that interface systems
on a chip working at different speeds. The connected systems
can be either synchronous or asynchronous. The designs are then
adapted to work between systems with very long interconnect
delays, by migrating a single-clock solution by Carloni et al.
(1999, 2000, and 2001) (for “latency-insensitive” protocols) to
mixed-timing domains. The new designs can be made arbitrarily
robust with regard to metastability and interface operating speeds.
Initial simulations for both latency and throughput are promising.
%CHECKBOUNDS Move the initial point within the (valid) bounds.
% [X,LB,UB,X,FLAG] = CHECKBOUNDS(X0,LB,UB,nvars)
% checks that the upper and lower
% bounds are valid (LB <= UB) and the same length as X (pad with -inf/inf
% if necessary) warn if too long. Also make LB and UB vectors if not
% already.
% Finally, inf in LB or -inf in UB throws an error.
This an excellent collection of XML best practices: essential reading for any developer using XML. This book will help you avoid common pitfalls and ensure your XML applications remain practical and interoperable for as long as possible."
Edd Dumbill, Managing Editor, XML.com and Program Chair, XML Europe
The Game:
Make the snake grow longer by directing it to the food.
Extra bonus points are given from hearts, eat them as fast as possible as amount of bonus points decreases with time.
Higher level gives more points for the food but will also make it tougher to steer a long snake as speed increaces.
Five different mazes as well as play w/o maze are possible.
編碼方式的解碼示范uuencode and uudecode are in the public domain. dos2unix and
unix2dos are hereby placed in the public domain. They may be shared
or copied as long as NO fee is charged for their distribution or use.
The ability to write efficient, high-speed arithmetic routines ultimately depends
upon your knowledge of the elements of arithmetic as they exist on a computer. That
conclusion and this book are the result of a long and frustrating search for
information on writing arithmetic routines for real-time embedded systems.
With instruction cycle times coming down and clock rates going up, it would
seem that speed is not a problem in writing fast routines. In addition, math
coprocessors are becoming more popular and less expensive than ever before and are
readily available. These factors make arithmetic easier and faster to use and
implement. However, for many of you the systems that you are working on do not
include the latest chips or the faster processors. Some of the most widely used
microcontrollers used today are not Digital Signal Processors (DSP), but simple
eight-bit controllers such as the Intel 8051 or 8048 microprocessors.