To make sure your slide numbers etc show up you need to:
Declare Function GetDC Lib
"user32" (ByVal hwnd As Long) As Long
Declare Function GetDeviceCaps Lib
"gdi32" (ByVal hDC As Long, ByVal nIndex As Long) As Long
Const LOGPIXELSX = 88 ' Logical
pixels/inch in X
Const LOGPIXELSY = 90 ' Logical
pixels/inch in Y
Sub WindowedSlideShow()
Dim new_width As Double
Dim new_height As Double
Dim XDPI As Double
Dim YDPI As Double
Dim hDC As Long
ActivePresentation.SlideShowSettings.Run
hDC = GetDC(0)
XDPI = GetDeviceCaps(hDC,
LOGPIXELSX)
YDPI = GetDeviceCaps(hDC,
LOGPIXELSY)
With SlideShowWindows(1)
new_width = 352# * 72#
/ XDPI
.Width = new_width
new_height = 288# *
72# / YDPI
.Height = new_height
Rem Offsets below are in points
(1/72 inch), not pixels
Rem .Left = 30
Rem .Top = 100
End With
End Sub
When you want to invoke the slideshow, just type Alt-f8 and select the macro. As written, the macro generates a slideshow of "normal" size (352 x 288 pixels) in the top left corner of the screen. You can just change the numbers to change the size, or uncomment the positioning lines to change the position. The only tricky bit is that the sizes and offsets are in points (1/72 inch) whereas the normal screen resolution (set in Control Panel→Display→Settings→Advanced) is 96dpi; here we get the screen resolution from Windows so everything should always work properly.
You can add this macro to a tool bar by selecting View→Toolbars→Customize...→Commands and select Macros in Categories: Then drag your macro onto a suitable toolbar and close the dialog.
If you need to find the magic Win32 API declarations for another macro, they are in Win32API.txt.
HDLs:
My point today is that, if we wish to count lines of code, we should
not regard them as "lines produced" but as "lines spent": the
current conventional wisdom is so foolish as to book that count on
the wrong side of the ledger.
Edsger W. Dijkstra
Some notes from Steve Harris on getting Real-Time performance under Linux:
The
kernel patches:
http://www.zip.com.au/~akpm/linux/schedlat.html#downloads
Pre-patched kernels:
http://ccrma-www.stanford.edu/planetccrma/software/installkernelandsound.htm
The instructions tell you to install apt, but you can just download the
RPMs if you can find them.
There is
a patch here which contains all the performance hacks against
2.6.4:
http://members.optusnet.com.au/ckolivas/kernel/
In order to set SCHED_FIFO, use:
struct sched_param rtparam;
int x;
memset (&rtparam, 0, sizeof (rtparam));
rtparam.sched_priority = priority;
rtparam.sched_priority, x, strerror (errno));
return -1;
}
or use sched_setscheduler(2) if you're not using pthreads.
A few notes on reading legacy3.5 and 5.25 inch floppies under Linux. Covers Tripos, P-System and CP/M disks, amongst others.
It is sometimes necessary to hide global symbols while linking a C program. If, for example, you need to link two functions of the same name into a single image or if you want to build an object file which only exposes its intended entry points. The Gnu tools make this easy.
Cvs is our preferred tool for software version control. It supports simultaneous development by multiple programmers at remote sites.
There is a Fortran 90 subset, F which is essentially Fortran 90 without Fortran 77, with free compilers. It works well for writing new Fortran 90 code. The F restrictions seem to offer a reasonable starting point for a Fortran 90 coding standard.
Several European weather services have written European Standards For Writing and Documenting Exchangeable Fortran 90 Code which gives style guidance.
There is also some progress with a GNU Fortran 95 system.
The Fortran 77 standard is now available on-line. Several popular features, such as DO...ENDDO are not part of Fortran77 proper but can be found in the "DoD Supplement to ANSI X3.9-1978, MIL-STD-1793". This includes DO ... ENDDO, DO WHILE, INCLUDE, IMPLICIT NONE, bit manipulation intrinsics and octal and hexadecimal constants.
If you don't have a Fortran 77 compiler, the free fortran-to-C system does a good job. There is also the GNU Fortran compiler, g77. Both can be found in most Linux distributions; g77 is also in Cygwin for Windows.
There are several useful free tools for Fortran 77 restructuring and semantic checking. The most popular is probably ftnchek. You will also probably want to get the vcg graph display tool to view call graphs generated by ftnchek. A restricted version of the plusfort system can also be obtained. Finally, the rather old NAG toolpack, while very "picky" about strict FORTRAN standard adherence, can sometimes be useful, although you might want to use the Makefile for it in the Debian Linux distribution.
Some of us have used MicroEmacs as their principal text editor for many years; we ran versions under DOS, Windows, SunOS, Linux and AIX. We mainly use a a version based on the MicroEmacs 3.10 sources and modified by various people at INMOS and Southampton to include folding and X-windows mouse and resize support. In the meantime, MicroEmacs itself has moved onward:
|
Here, for what it's worth, are the sources, manual, and Linux, SunOS4 and AIX4 binaries for the current version of folding MicroEmacs that we use. |
|
The JASSPA distribution is based on MicroEmacs 3.8 and has a solid
look and feel. The Windows version has a rather Unix/X feel about it. I
expect we'll eventually merge our folding version with this one. |
|
Programmer's
File Editor was a popular editor in Windows environments, but is unfortunately
no longer supported.
Local copy.
Nedit is a popular X-based programmer's editor. Some time ago, we built a WindowsNT version. You need nedit.exe and all the DLLs on your path. It is still an X application, so you must set the DISPLAY variable, eg with set DISPLAY :0 on the command line. You also need to have an X server (eg Hummingbird) on your NT box or you need to use a remote display with an X server. This is a useful editor to run if you are remotely logging into the NT system from UNIX/Linux.
We used to use FORGE Explorer to examine large FORTRAN programs for consortia. Its descendants are now handled by Visual Numerics.
A large class of programming problems in the C language arise from the use of invalid pointers or exceeding array bounds. Paul Kelly at Imperial College has developed a bounds checking C compiler. This is a very useful tool---it handles large scale programs and can be used with ordinary system libraries such as X. The patches have been regularly updated and the latest version, for GCC 4.0.4, is here. Earlier versions may be found on Sourceforge. Version 4.04 will be the end of the line; extensive changes to the parser in GCC mean that the patch is unlikely to be ported to it. Do not worry, there is now (late 2007) a completely new reworked project, MIRO, which also supports C++.
A warning: these bounds checkers confirm that the pointer reference is correctly inside the correct allocated static, stack or heap object. They do not check for pointer overflow between fields of a single object/struct. They do check that pointer arithmetic has not moved the pointer from one object to another.
Finally, note that much of the same functionality can be achieved on Linux/ELF systems using Valgrind, which executes unmodified binaries.
There are
a few things you need to do to make editing work sensibly in a ksh environment.
First. to make sure subshells pick everything up correctly, you want something
like:
export ENV=$HOME/.env
. $ENV
in
your .profile file. Then you can set up your terminal type and command line
editing by putting something like:
export TERM=xterm
VISUAL=emacs
alias __A=^P
alias __B=^N
alias __C=^F
alias __D=^B
in
your
.env
file. Here
the
^P
etc represent actual control characters in the script. If you are using vi or
vim as your editor, you enter them by typing, for example, ctrl-V ctrl-P (hold
down the control key, type V, then type P, then release the control key).
Another
simple shell command, also with embedded control characters, lets you change the
name of your
xterm
windows and
icons. I call it xtitle:
#!/bin/sh
echo -n "^[]0;$1^G"
Again, the ^[ and ^G are control characters. If you are using vi or vim as your editor, you enter them by typing, ctrl-V Esc (hold down the control key, type V, release the control key, press and release the Esc key) and ctrl-V ctrl-G (hold down the control key, type V, then type G, then release the control key) respectively.
The Southampton Portable occam Compiler has its own web pages here. This is now a substantial system which includes:
Generation of efficient portable C from occam 2.5, including user data types.
Support for big- and little-endian architectures.
Support for portable occam source-level debugging using gdb.
Flattening transformations removing replicators and PROCs; these are used by the SMV and PIC back ends.
Generation of occam 2 output, for occam 2.5 to occam 2 translation.
Generation of PIC assembler output
Use of the SMV model checker to validate correctness of occam programs.
Support for the Linux and Windows 95,98, NT4 and 2000.
Here are some notes on generating good quality antialiased PNG images for web pages. I'm interested in this mainly because of the need to generate transparent overlays for on-demand weather forecasts, but it is also useful in generating high-quality maths and figures in tools such as latex2html.
On Windpws XP, type ifconfig/all at a command prompt. The MAC address is reported as the Physical Address and usually starts with two zeros. This is what you need to tell you system administrator so she can register your machine on the network. On many machines it is possible (but not a good idea) to change the MAC address, so such registration does not offer a lot of security. You can find out who made your card from its MAC address.