How to install Code::Blocks with a Fortran compiler

To install a Fortran compiler (gFortran) to be used within the Code::Blocks IDE editor:

  1. Go to http://www.codeblocks.org/downloads
  2. Click on “Download the binary release”
  3. Click on “Windows 2000/XP/Vista/7//8”
  4. Click on “codeblocks-13.12mingw-setup.exe” to download from SourceForge.net
  5. Once downloaded (~100MB), install Code::Blocks IDE
    • Full installation
    • Destination “Program Files\CodeBlocks”
    • “Do you want to run CodeBlocks now?” NO
  6. Start Code::Blocks from the shortcut on Desktop (or find in programs)
  7. When the IDE opens, go to “Settings” > “Compiler…”
  8. From the “Selected Compiler” option, select the “GNU Fortran Compiler” from the list
  9. From below, select “Toolchain executables” TAB
  10. Now check that the “Compilers installation directory” is set to the MinGW folder within Codeblocks
    [bash]c:\Program Files\CodeBlocks\MinGW[/bash]
  11. Click Ok to close the options dialog, close Code::Blocks and re-open
  12. You should now be able to create and compile Fortran sources

Create a simple program (try .f90 or .f95 or .f) and compile:

[cpp]program test
do i=1,5
print*, ‘Hello Fortran’
end do
end program[/cpp]

How to create a simple Backup script using windows HTA

Prerequisites:

  • a notepad (I recommend: notepad++)
  • some HTML knowledge
  1. Start a simple HTML page and add the following as the main structure:[xml]<head>
    <title>Backup Reminder</title>
    <HTA:APPLICATION
    APPLICATIONNAME=”Backup Reminder”
    ID=”myware”
    VERSION=”1.0″
    CAPTION=”yes”
    BORDER=”normal”
    SYSTEMMENU=”yes”
    MAXIMIZEBUTTON=”no”
    MINIMIZEBUTTON=”no”
    ICON=”gumware.ico”
    SCROLL=”no”
    SCROLLFLAT=”yes”
    SINGLEINSTANCE=”yes”
    CONTEXTMENU=”yes”/><style>
    img{border: 0px}
    input{color: blue; background-color: white; font-variant:small-caps;
    font-family: Arial,Helvetica,sans-serif; border: 1px solid blue}
    H1,H2,H3,H4,H5,H6,P,BODY,UL{font-family: Arial, Helvetica, sans-serif}
    </style>
    </head>[/xml] (more…)

How to create a multiboot USB with XBoot 1.0 b14

  1. Repartition and format the USB: Primary volume, 4k cluster size (default), FAT32 format.
  2. XBoot requires dot.NET Framework 4.0 installed on the system it will be run off
  3. Download a copy of XBoot 1.0 beta 14 and run it, not install required!
  4. Download your favourite ISO distros and drag-n-drop them on the XBoot “Drag-n-drop Box”
    (each one will prompt you what type of boot-loader it needs, major distros are listed and if not
    you should choose ISO file -iso/scan parameter for Linux distros and GrubForDOS iso emulation
    for Windows distros)
  5. Click on “Create USB”
  6. Select the USB from the list of drives and set boot-loader to Syslinux
  7. After a few minutes the drive will be ready

If you need to update an ISO already added, just drag the updated ISO to XBoot (keep same name as
previous entry) and Create USB without the boot-loader. This may be a bit messy sometimes but is doable to some extent. Most of the times you will have your menu changed, but you could edit it after the iso omport.

Notes:

  • You can use the internal QEMU emulator to check your USB or even better boot directly from a PC
  • You can also check this out for installing and using a permanent emulator for booting USBs
  • I have found that XBoot acts a bit weird on a 64bit Windows, at least surely Windows 8

How to create a bootable usb to install Windows X

Firstly, insert your USB  (WARNING: the following steps will erase ALL DATA on selected USB!!).

Open a cmd prompt and type “diskpart” to start the partitioning program:

[bash]list disk # <– to list the disks on the system

# Disk ### Status Size Free Dyn Gpt
# ——– ————- ——- ——- — —
# Disk 0 Online 931 GB 3072 KB
# Disk 1 Online 1944 MB 0 B
# Disk 2 Online 7498 MB 0 B <– this will be our selected disk

select disk 2

# Disk 2 is now the selected disk.

clean

# DiskPart succeeded in cleaning the disk.

create primary partition

# DiskPart succeeded in creating the specified partition.

select partition 1

# Partition 1 is now the selected partition.

active # <– make the partition active

# DiskPart marked the current partition as active.

format fs=ntfs quick

assign # <– assign a letter to the drive

# DiskPart successfully assigned the drive letter or mount point.[/bash]

Your drive is now ready to copy a loaded iso DVD of your version of Windows.