Thursday, November 18, 2010

Matlab Function in Fortran - perms - permutation

Below is the Fortran implementation of the perms algorithm found in Matlab. It creates a matrix whose rows consist of all possible permutations of the n elements of vector vecIn.

There are many useful utility functions in Matlab and occassionally an important but rare (difficult to find source in the internet) algorithm such as this permutation algorithm. Hopefully there will be more Fortran version of Matlab utility functions appearing here in the future.

The one listed below is unpolished and unoptimized and not suitable for large inputs. It is a very basic implementation taken directly from the mathematical definition. It is also tested only for a small number of cases. Corrections, suggestions and comments are welcomed.




!/*
! * perms - All Possible permutations
! * 
! *     (C)  Copyright 2010 xTechNotes.blogspot.com
! * 
! *   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 3 of the License, 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.
! *
! *    You should have received a copy of the GNU General Public License
! *    along with this program.  If not, see .
! */ 


    RECURSIVE subroutine perms(n, nfact, vecIn, vecOut)
        IMPLICIT NONE 
        INTEGER, INTENT(IN) :: n                ! number of elements of original vector
        INTEGER, INTENT(IN) :: nfact            ! Factorial(n)
        REAL, INTENT(IN) :: vecIn(n)            ! original vector to be permuted
        REAL, INTENT(OUT):: vecOut(nfact, n)    ! Permutations of original vector


        ! local variables         
        real :: vecInTmp(n)
        integer :: ii , mfact
        real :: dtmp
        
        vecOut = 0.0
        if (n .le. 0) then 
            return
        elseif ( n .eq. 1 ) then            
            vecOut(1,1) = vecIn(1)
        elseif ( n .eq. 2 ) then
            vecOut(1, :) = vecIn(:)
            vecOut(2, :) = (/vecIn(2), vecIn(1)/)
        else        
            ! ii = 1
            call factorial(n-1, mfact)
            vecOut(1:mfact, 1) = vecIn(1)
            call perms(n-1, mfact,  vecIn(2:n), vecOut(1:mfact, 2:n))
            
            do ii = 2, n
                vecInTmp = VecIn
                vecInTmp(1) = VecIn(ii)
                vecInTmp(ii) = VecIn(1)
                vecOut((ii-1)*mfact+1 : ii*mfact, 1) = vecInTmp(1)                
                call perms(n-1, mfact, vecInTmp(2:n), vecOut( (ii-1)*mfact+1 : ii*mfact, 2:n))
            enddo 
        
        endif    
        
    end subroutine perms

Friday, November 12, 2010

Matlab Function in Fortran - conv2 - Convolution in 2D

Below is the Fortran implementation of the Convolution 2D algorithm, or conv2 as found in Matlab. There are many useful utility functions in Matlab and occassionally an important but rare (difficult to find source in the internet) algorithm such as this convolution algorithm. Hopefully there will be more Fortran version of Matlab utility functions appearing here in the future.

The one listed below is unpolished and unoptimized and not suitable for large inputs. It is a very basic implementation taken directly from the mathematical definition of discrete convolution in 2D. It is also tested only for a small number of cases. Corrections, suggestions and comments are welcomed.




!/*
! * CONV2 - Convolution in 2D
! *
! *     (C)  Copyright 2010 xTechNotes.blogspot.com
! *
! *   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 3 of the License, 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.
! *
! *    You should have received a copy of the GNU General Public License
! *    along with this program.  If not, see .
! */  
  
    subroutine conv2(nXi, nXj, nHi, nHj, nYi, nYj, X, H, Y)
        INTEGER, INTENT(IN) :: nXi, nXj, nHi, nHj           ! Dimensions of Input, Kernel
        INTEGER, INTENT(IN) :: nYi, nYj                     ! Dimensions of Output - MUST BE nXi+nHi-1, nXj+nHj-1
        REAL, INTENT(IN) :: X(0:nXi-1, 0:nXj-1)   ! Input
        REAL, INTENT(IN) :: H(0:nHi-1, 0:nHj-1)   ! Kernel
        REAL, INTENT(OUT) :: Y(0:nYi-1, 0:nYj-1)  ! Output
        integer :: im, in, ii, ij, ip, iq
      
        Y = 0.0d0
        if( nYi .ne. nXi+nHi-1  .or. nYj .ne. nXj+nHj-1 ) RETURN
      
        do in = 0, nYj-1
            do im = 0, nYi-1
                do ij = 0, nXj-1
                    do ii = 0, nXi-1
                    ip = im - ii
                    iq = in - ij
                    if (ip .ge. 0 .and. ip .le. nHi-1 .and. iq .ge. 0 .and. iq .le. nHj-1) then
                        Y(im, in) = Y(im, in) + X(ii, ij) * H(ip, iq)
                    endif                      
                    enddo
                enddo
            enddo
        enddo
        return
    end subroutine conv2

Tuesday, November 02, 2010

How to Improve Video Capture Quality

How to Improve Video Capture Quality
======================================
This step may require additional filters for VirtualDub. See the previous section for filters available for VirtualDub.

White Balance Filter - Jim Leonard
- to correct for white balance problems.
- Example: when the video in general looks orange, blue or too dark.
- may occur when white balance is on automatic mode, so different types of light having different temperatures causes this problem
- this filter can also be used to adjust Hue, Saturation, Intensity, Brightness, Contrast

Deinterlacing filter
- used to remove the effect of interlacing, ie. when not all frames are processed.
- fast motion causes edges of objects to look jagged.
- the filter will also make the video look far sharper

Sharpening Filter
- used when video seem to have soft edges or lack detail.

Dynamic Noise Reduction
- used when video is grainy

Chroma Noise Reduction Filter
- used when there is chroma noise; ie where rainbow effects shimmer across the screen.

VHS filter - flaXen
- used when video has timing issues and skips a bit
- try using the Stabilize section of this filter only

For instructions on Video Capture using VirtualDub, see:
http://xtechnotes.blogspot.com/2007/07/notesvideocapture.html



VirtualDub filters plugins
============================
Filter pack from Dee Mon:
http://www.infognition.com/VDFilterPack/
Jim Leonard's White Balance filter
http://neuron2.net/whitebalance/whitebalance.html
flaXen filter
http://neuron2.net/flaxen/flaxen.html

To use this filter, install Virtual Dub, then install these plugins into the VirtualDub's plugins folder.


VirtualDub MPEG2 codecs
========================
To use the Virtual Dub and encode with the MPEG2, the following codes need to be installed.
Panasonic VfW DV codec
http://www.free-codecs.com/download/panasonic_dv_codec.htm 
 Adaptec VfW DV codec
http://www.free-codecs.com/download/adaptec_dvsoft_codec.htm 

How to find hidden Web Sites, Pages

This is the beginning of a collection of resource about the techniques of searching the internet for websites that are not well known and do not come up on top searches. These information are not hidden deliberately but are just not well publicized or optimized to be found from regular search engines.

Some of the links are:
How To Find Hidden Web Pages
Uncovering the Hidden Web part 1

Thursday, October 28, 2010

How to Convert or Rip Audio CD into AAC format

This is a simple process if you know how and have got the right tools.

Objective: To convert CD Audio into the AAC format.

Requirements:
These are needed for extracting and converting into AAC audio format.

1. Audio CD extracting software

2. AAC encoding codec

Why AAC?
The real practical reason for my case in choosing AAC was simply because my Nokia phone accepts AAC format. I understand AAC is also used by iPhone and other Apple products. In addition, although MP3 is widely used, there is always a cloud of uncertainty over the licence of MP3 encoding algorithms. This is one reason it is difficult to get free MP3 encoders. Also AAC is newer and is supposed to be a bit better in quality than MP3 formats. Like MP3, AAC is also a lossy format.

Specific Tools Download:
The above requirement are satisfied with the tools listed here. (Please note that this guide shows you the quick and simple way to save your Audio CD into AAC format. They are not the best tool, they are not the only tool, they are simply the tools I found and they work)

1. CD Ex
http://cdexos.sourceforge.net/?q=download
This is a simple yet powerful CD extracting software. It can support extraction into various format such as MP3, OGG, VQF, AAC and others. A few of the format such as AAC require you to obtain the codecs by yourself - see next step.

2. PsyTEL MPEG-4 AAC Encoder
http://www.afterdawn.com/software/audio_video/convert_audio/psytel_aac_enc.cfm
Alternative site:
http://cid-3157d7aac580c23e.office.live.com/self.aspx/Public/aacenc%5E_v215.zip

There is only a few AAC encoders available and this (PsyTEL) seems to work OK. The other AAC encoder is from Nero.
Note that this encoder allow the audio extracting software such as CDEx to encode the audio into the AAC format. If you want to play it back, then your software player (eg WinAMP) may need to add a plugin AAC decoder (Not covered in this article)


Usage:
1. Install the CDEx.
2. Unzip the AAC encoder and put somewhere in your local drive.
3. Run the CDEx program.
4. Go to Options -> Settings.
5. Go to the Encoder tab.
6. Select the "Psytel AAC Encoder" from the dropdown list called Encoder.
7. In the same dialog box, in the Encoder Path text field, choose the correct path where the AAC encoder was unpacked to in Step 2. Click OK.
8. Wait for the audio files to appear on CDEx.
9. Go to the Convert menu.
10. Select "Extract CD track(s) to a Compressed Audio File"

Friday, October 15, 2010

How to Cook ROMs

Currently this page is a collection of links on how to cook ROMs.

What is cooking ROMs about? It is for people wanting to replace their Operating Systems (OS) on portable devices (mobile phones, PDA, tablets, iPads) with their own customized version with their own choice of built in applications.

Why is this page just links? Because I am in the process of learning and researching on how to actually cook some ROMs. So here is a record of links which I think provide good information. When I have successfully cook some ROMs and have something to add, I may write my own guide.

Mobile Phone / PDAs
http://forum.xda-developers.com/showthread.php?t=313920
http://forum.xda-developers.com/showthread.php?t=691789
http://forum.xda-developers.com/showthread.php?t=628948
http://www.1800pocketpc.com/2010/09/06/rom-cooking-tutorial-for-windows-mobile-from-techparaiso-tutorial.html
http://www.1800pocketpc.com/2010/06/02/want-to-know-how-to-cook-a-rom-like-the-pros-new-step-by-step-guide-in-the-making.html


Tablets
http://www.androidtablets.net/forum/gome-flytouch/1655-how-install-rom-your-tablet.html
http://androidforums.com/tablets-mids/90106-warning-anyone-interested-eken-apad-100-tablets.html

Thursday, August 05, 2010

Online Scan - Browsers

This is a list of site that allow you to determine how secure your browser is. The security focus may be different for each of the online browser scan sites below but they reveal information of the browser that you are using. So if you are not sure how secure is your browser, try some of these tools to check the security of your browser. Most of the popular browsers should be able to use the online browser scanning tools below.

BrowserSpy.dk - "When you surf around the internet your browser leaves behind a trail of digital footprints. Websites can use these footprints to check your system. BrowserSpy.dk is a service where you can check just what information it's possible to gather from your system, just by visiting a website."


browserscope - "Browserscope is a community-driven project for profiling web browsers. The goals are to foster innovation by tracking browser functionality and to be a resource for web developers.
Gathering test results from users "in the wild" is the most important and useful feature of Browserscope - and you can participate!"


pcflank - "checks whether your browser exposes any personal information, such as sites you have visited, the region you live in, who your Internet Service Provider is, etc. After the test, you will be given specific recommendations for changes to your browser settings."

browsercheck - "Qualys BrowserCheck will perform a security analysis of your browser and its plugins to identify any security issues. Install the plugin to get started."

scanit - "The test will try to crash your browser! Close all other browser windows before starting and bookmark this page. If your browser crashes during the test, restart it and return to this page. It will show which vulnerability crashed your browser and offer you to continue the test or view the results. "

Friday, July 30, 2010

Online Scan - PC tools

This page is a collection of links to websites that provide various online scanning services. They range from scanning your computer speed, to online colour calibration for your monitor, online scanning of your IP address and so on.

A few online scanning tools categories have extensive links and they are available separately at the following:
Online Scan - Websites
Online Scan - AntiVirus

Scan your internet connection speed. This sites help you determine your ADSL speed or broadband speed. They are useful if you suspect some problems with your internet connection, or suspect you are not provided with the appropriate speed advertised by your ISP.
SpeedTest
Oz Broadband Speed Test - originally designed for Australian tests
Internet Speed Test - from AuditMyPC.com

LCD monitor calibration
http://www.lagom.nl/lcd-test/

Internet Related
https://whatismyipaddress.com/  - Find IP address
https://lookup.icann.org/ - Domain name registration name lookup
https://haveibeenpwned.com/ - Enter your email or mobile number to check if you've been compromised.


What's My IP
An incredible amount of tools can be found on this webpage including the following:
More Info About You
Port Scanners
Traceroute
HTTP Compression
Ping
WHOIS & DNS
Website Rankings
IP Location
HTTP Headers

    Text Related Tools
HTML Characters
String & Timestamps
Hash Generator
Hash Lookup
Text Case Changer
Regexp Tester
String Encoding
Password Generator
Upside-Down Text
Text to Code Ratio

     Other Tools
Library
MAC Address Lookup
Random Websites
Statistical Accuracy
WhatsMyIP PixelAds

Friday, July 16, 2010

Windows Command Prompt

To run the Command Prompt in Windows XP, click START button and select the RUN option.




In the Run dialog above, type "cmd" and click OK. Then the Command Prompt window / terminal will open.


A summary of MS DOS commands can be found here:
http://www.commandpromptcommands.com/  - a few basic commands
http://commandwindows.com/vista-commands.htm - commands for Windows Vista.



Thursday, June 24, 2010

Mobile Applications for Apple, Android, Symbian, Windows

The table below is a list of FREE mobile applications for these platforms:
And = Android
App = Apple
Sym = Symbian
Win = Windows

Please let me know if you know of other good free applications.

In the table, the first 4 columns show which platform the application is for. The mobile application names are given and a brief description for the mobile applications is given unless it is a well know application.




And App Sym Win Mobile App


x 0 0 0 3G Watchdog
x 0 0 0 Picsay - picture editor
x 0 0 0 Backgrounds
x 0 0 0 BBC News
x 0 0 0 Twidroid - twitter app
x 0 0 0 Dolphin Browser
x 0 0 0 Jewels  - game
x 0 0 0 Task Manager
x 0 0 0 Sweetdreams - organise email, phone calls, etc
x 0 0 0 Barcode Scanner
x 0 0 0 Quickpedia
x 0 0 0 Uber Keyboard
x 0 0 0 Locale - using GPS
x 0 0 0 Plink Art - camera for paintings
x 0 0 0 Double Twist - Multimedia player for photo, music, video

x x x x Rebtel - international calling
x x x x Trapster - GPS for speed camera

x x x 0 Shazam - identify songs

x x x 0 Facebook
x x x 0 Tunewiki - media app
x x 0 0 ISP Usage

x x 0 0 Google
x x 0 0 Last.FM
x x 0 0 Photoshop.com Mobile
x x 0 0 Bigoven - cooking recipes
x x 0 0 Around Me - GPS to locate ATMs, shops, etc
x x 0 x Evernote - note taking
x x 0 x Aloqa - using GPS
x 0 x x Wavesecure - security for smartphone




0 x 0 0 Echofon for Twitter
0 x 0 0 Mobyko - transfer phone contacts
0 x 0 0 Flickr - for photos
0 x 0 0 Logitech Touch Mouse
0 x 0 0 Audiboo - audio blogging
0 x 0 0 Units - conversion
0 x 0 0 Metro - public transport
0 x 0 0 Blurb - make phone to banner
0 x 0 0 Ski and Snow Report

0 x 0 0 TVGuide
0 x 0 0 ABC - news service
0 x 0 0 My First Words Lite - educational
0 x 0 0 Wordweb
0 x 0 0 Kindle for Iphone
0 x 0 0 Ebay
0 x 0 0 Domain - real estate search

0 x 0 0 Seadragon - artwork
0 x 0 0 Simplify Music 2 - stream music PC-iPhone
0 x 0 0 Ozweather
0 x 0 0 Currency
0 x 0 0 Filmtrailer
0 x 0 0 Time Magazine
0 x 0 0 Tripit - travel itineraries to iPhone
0 x 0 0 Tip and Split - calculates tips at restaurant
0 x 0 0 Lasoo - shopping app
0 x 0 0 Paypal
0 x 0 0 Gorillacam - camear app
0 x 0 0 Epicurious - cooking recipes


0 0 x 0 Ovi Maps 3
0 x x 0 Fring - phone and video calls via wifi

0 0 x x Opera Mobile browser
0 x x x Skype
0 0 0 x Live Mesh - file synchronisation


Android Apps
Dolphin Browser HD
Amazon Kindle
Google Sky Map
Google Maps
Google Translate
YouTube
Instant Heart Rate
One Note - with access to cloud storage via SkyDrive
http://windowsteamblog.com/windows_live/b/windowslive/archive/2012/02/07/connect-your-android-device-to-skydrive-with-onenote-and-other-apps.aspx

Navigation
How to make use of navigation from FREE apps.
GPS - needed to locate where the device is. Do not need WiFi or internet
Maps - Needed to show the map of where you are and where to go. Google Maps have the ability to cache maps and can be useful later when there is no internet connection.
Navigation - this software calculates where you are to where you want to go.

This site explains the requirements for navigation apps in much greater details.
http://productforums.google.com/forum/#!topic/maps/rkSBMoJD14s

Other navigations and map apps are:
Navit
Route 66 Maps and Navigation,
MapsWithMe

Adobe Flash
Apple does not support Adobe flash on its devices.
The latest Android JellyBean is also dropping its support for Flash.
But it may yet be possible to install flash by yourself. This website seems to have a step to step guide on installing flash for Android devices.
http://www.itpro.co.uk/641869/installing-adobe-flash-on-android-jelly-bean-devices



Fortran Debugging, Threading, Optimising articles

This post is a quick summary to some online articles which I find useful. Only the extract are given below. The full articles can be found in their original sources via their URL.


Threading Fortran applications for parallel performance on multi-core systems

Most processors now come with multiple cores, and future increases in performance are expected to come mostly from increases in core count. Performance sensitive applications that neglect the opportunities presented by additional cores will soon be left behind. This article discusses ways for an existing, serial Fortran application to take advantage of these opportunities on a single, shared memory system with multiple cores. Issues addressed include data layout, thread safety, performance and debugging. Intel provides software tools that can help in the development of robust, parallel applications that scale well.

Levels of Parallelism

1 SIMD instructions
2 Instruction level
3 Threading (usually shared memory)
4 Distributed memory clusters
5 “embarassingly parallel” multiprocessing

Ways to Introduce Threading

1 Threaded libraries, e.g. Intel® MKL
2 Auto-parallelization by the compiler
3 Asynchronous I/O (very specialized; see compiler documentation)
4 Native threads
5 OpenMP

Intel® Math Kernel Library
1 Many components of MKL have threaded versions
2 Link threaded or non-threaded interface
3 Set the number of threads

Example: PARDISO (Parallel Direct Sparse Solver)
1 Solver for large, sparse symmetric and antisymmetric systems of linear equations on shared memory systems
2 For algorithms, see http://www.pardiso-project.org

Auto-parallelization

1 The compiler can thread simple loops automatically
2 Based on the same RTL threading calls as OpenMP:

Conditions for Auto-parallelization

1 Loop count known at entry (no DO WHILE)
2 Loop iterations are independent
3 Enough work to amortize parallel overhead
4 Conditions for OpenMP loops are similar
5 Directives may be used to guide the compiler:

Example: matrix multiply


OPENMP - advantages

1 Standardized API based on compiler directives

OpenMP Programming Model

Fork-Join Parallelism:

1 Master thread spawns a team of threads as needed

Note that Intel’s implementation of OpenMP creates a separate monitor thread in addition to any user threads.


OPENMP – where to thread

1 Start by mapping out high level structure
2 Where does your program spend the most time?
3 Prefer data parallelism
4 Favor coarse grain (high level) parallelism

Example: Square_Charge

1 calculates the electrostatic potential at a series of points in a plane
   due to a uniform square distribution of charge


Openmp: How do threads interact?

1 OpenMP is a shared memory model
2 Unintended sharing of data causes race conditions:
3 To control race conditions…
4 Synchronization is expensive so…

OPENMP – data

1 Identify which data are shared between threads, which need a separate copy for each thread

2 It’s helpful (but not required) to make shared data explicitly global in Modules or common blocks,
   thread private data as local and automatic.

3 Dynamic allocation is OK (malloc, ALLOCATE)

4 Each thread gets its own private stack, but the heap is shared by all threads

OPENMP – data scoping

1 Distinguish lexically explicit parallel regions from the “dynamic extent” (Functions or subroutines called from within an explicit parallel region. These might contain no OpenMP directives or only “orphaned” OpenMP directives)

2 Lexically explicit: !$OMP PARALLEL to !$OMP END PARALLEL


Thread Safety

1 A threadsafe function can be called simultaneously from multiple threads, and still give correct results
2 ifort serial defaults:
3 When compiling with –openmp, default changes

Making a function thread safe

1 With the compiler
2 In source code
3 In either case:
4 OpenMP has various synchronization constructs to protect operations that are potentially unsafe

Thread Safe Libraries

1 The Intel® Math Kernel library is threadsafe
2 The Intel Fortran runtime library has two versions

Performance considerations

1 Start with optimized serial code, vectorized inner loops, etc. (-O3 –xsse4.2 –ipo …)
2 Ensure sufficient parallel work
3 Minimize data sharing between threads
4 Avoid false sharing of cache lines
5 Scheduling options

Timers for threaded apps

1 The Fortran standard timer CPU_TIME returns “processor time”
2 The Fortran intrinsic subroutine SYSTEM_CLOCK returns data from the real time clock
3 dclock (Intel-specific function) can also be used

Thread Affinity Interface

1 Allows OpenMP threads to be bound to physical or logical cores

NUMA considerations

1 Want memory allocated “close” to where it will be used
2 Remember to set KMP_AFFINITY


Common problems

1 Insufficient stack size
2 For whole program (shared + local data):
3 For individual thread (thread local data only)

Tips for Debugging OpenMP apps

1 Run with OMP_NUM_THREADS=1
2 Build with -openmp-stubs -auto
3 If works without –auto, implicates changed memory model
4 If debugging with PRINT statements
5 Debug with –O0 –openmp

Floating-Point Reproducibility

1 Runs of the same executable with different numbers of threads may give slightly different answers
2 Floating point reductions are still not strictly reproducible in OpenMP, even for same number of threads

Intel-specific Environment Variables

1 KMP_SETTINGS = 0 | 1
2 KMP_VERSION = off | on
3 KMP_LIBRARY = turnaround | throughput | serial
4 KMP_BLOCKTIME
5 KMP_AFFINITY (See main documentation for full API)
6 KMP_MONITOR_STACKSIZE
7 KMP_CPUINFO_FILE

Tools for Debugging OpenMP apps

1 The compiler source checker (‘parallel lint’)
2 Updated Intel Parallel Debugger, idb (Linux) and Intel Parallel Debugger Extension (on Windows)

Intel® Thread Checker
1 Unified set of tools that pinpoint hard-to-find errors in multi-threaded applications
2 Display data at the Linux command line or via a Windows GUI

Intel® Thread Profiler
1 Features & Benefits

Summary
Intel software tools provide extensive support for threading applications to take advantage of multi-core architectures.
Advice and background information are provided for a variety of issues that may arise when threading a Fortran application.





Tips for Debugging Run-time Failures in Applications Built with the Intel(R) Fortran Compiler

Your app builds successfully, but crashes at runtime. What Next? Try some useful Intel compiler diagnostic options before launching into lengthy debugger sessions.

1) Build with /traceback (Windows*) or –traceback (Linux* or Mac OS* X).

2) Build with /gen-interfaces /warn:interfaces (Windows) or –gen-interfaces –warn interfaces (Linux or Mac OS X).

3) Try building and running with /check (Windows) or –check (Linux and Mac OS X).

4) Build your program, including the main routine, with /fpe:0 (Windows) or –fpe0 (Linux or Mac OS X).

5) If your application fails early on with a segmentation fault, you might be exceeding the default maximum stack size. On Linux or Mac OS X, try setting
ulimit –s unlimited (bash) or limit stacksize unlimited (C shell)

6) Use the compiler provided interfaces. If you call run-time library functions, build with
      USE IFLPORT
If you call OpenMP run-time library functions, compile with
      USE OMP_LIB
If you call functions from MKL or IMSL*, USE the corresponding module(s).

7) Look carefully for any error messages in your output log file.

8) If you are building an application using OpenMP*, check out the advice under “Tips for Debugging OpenMP Apps” at http://software.intel.com/en-us/articles/threading-fortran-applications-for-parallel-performance-on-multi-core-systems/


9) For Windows, see the section Building Applications / Debugging in the main compiler documentation. For Linux or Mac OS X, see the documentation for the Intel(R) Debugger (idb).

Thursday, May 13, 2010

Cheat Sheets

This article will collect the cheat sheets I've found useful.

CSS - Cascading Style Sheet
CSS 2 Help Sheet
CSS 3 Help Sheet
CSS 3 Cheat Sheet
DevCheatSheet’s CSS3 Cheat Sheets
CSS3 Color Names (CodeNique)
CSS3 – Information and samples (Robert Nyman)





HTML 
HTML 5 Cheat Sheet
DevCheatSheet’s HTML5 Cheat Sheets  with 22 cheat sheets
Browser Compatibility Charts  (MediaLoot)
HTML5 – Information and samples for HTML5 and related APIs (Robert Nyman)
HTML5/CSS3 Cheatsheet (Stories In Flight)
HTML Cheat Sheet for Transition to HTML 5 (html-5.com)
W3C cheatsheet (W3C)





Editors
VI Cheat Sheet

Thursday, May 06, 2010

How to create an Ebook and Ebook cover

The article consists of links to resources available on the internet. There are a lot of links out there but many are just viral marketing and not useful at all. The aim of this article is to provide only the useful links and tips without costing you a cent.

To create an Ebook cover:
http://3d-pack.com/ - 3d package is a 3d-box graphic generator. 3d package lets you instantly create 3d-box images online, free! Just upload pictures for cover and sides and then get 3d-box in you favorite image format (JPG, GIF, PNG supported).

Ebook writing guides:
http://multiebook.com/write-and-create-ebook/how-to-write-and-create-ebook.html - a very comprehensive no nonsense article on how to create ebook.

Possible Viral Ebook marketing, but worth a look on their webpage just to get inspiration and ideas:
http://www.databasedesign-resource.com/free-ebook.html
http://www.guidetoebookmarketing.com/ebook-articles.php

My experience so far:
1. The 3d-pack.com site is quite amazing after ours of sifting through the internet and also trying my own design using OpenOffice Draw.
2. In terms of producing PDF files, the best free tool so far is OpenOffice Suite. There is an Export functionality to PDFs which has a multitude of options when exporting to PDFs. ..... hope to add more details here later ....


Ebook Real Life Examples:
http://investbuygoldbullion.inspiriting.com/AdditionalMaterials.html - this Ebook is about all you need to know about investing in gold. The author sells directly from his website as well as offering affiliate program for other sellers via e-junkie

Articles
http://www.dailymail.co.uk/home/moslive/article-2040044/Kindle-How-make-million-writing-e-book.html
https://kdp.amazon.com/self-publishing/KDPSelect

Sunday, May 02, 2010

PC PRO / PC WORLD / PC AUTHORITY Articles

This article will be a collection of interesting things found in the PC Authority magazine (may be related to the PC Pro magazine).

Features
May 2010  the-dark-side-of-the-web - web surfing anonymously using FreeNet, TOR, or Blog anonymously using TOR.


Software - mostly Free
May 2010 - Vue Pioneer - Free software to create 3D worlds
May 2010 - fontjazz - A javascript based system for creating fancy fonts on webpages, but renders it as text so that it can be picked up by search engines.
May 2010 - PortableApps - a suite of software that can fit and RUN in a USB stick. This is also highly configurable and allow other software to be added.
May 2010 - DosBox - An open source DOS emulator for BeOS, Linux, Mac OS X, OS/2, and Windows. Primarily focuses on running DOS Games.

Thursday, April 22, 2010

How to Connect to Telstra Remote Working Solution (TRWS) on a corporate laptop.


This short guide shows how to setup VPN connection using a laptop configured to use Telstra Remote Working Solution.

Before going through this setup, the following pre-requisites need to be satisfied:
  1. Your laptop has the TRWS installed and is running Windows.
  2.  The connection is intended to use your laptop to connect to your home wireless network. The TRWS software will then provide a VPN tunnel through your home WiFi network, into the public internet, and securely into your corporate network,
  3. Your home WiFi network is already setup and you have these information: WiFi SSID, WiFi Security Mode and WiFi password.
  4. RSA SecureID token Device. This device is on all the time and a number is displayed, which changes after a certain amount of time.


The following steps will help setup the connection for the first time. The login steps below need to be done each time you login again.
1.    1.      Switch on Laptop.
2.   2. Look for the physical switch for the WiFi on the actual laptop. Its location is different for different laptop  models. Ensure this is switched on.
3.    3. When the laptop booted and is ready for work, then open up the TRWS application  either by:
i)                    Start – All Programs – Telstra – TRWS; or
ii)                  Click on the TRWS icon on the desktop.



4.    4.   From the TRWS, click Settings – Login Information.
5.    5.   In the Login Information, fill in the Username, Password, click Save Password and select the relevant country. Click OK.


6.      6. Go back to the TRWS dialog, click Settings – Connection Strings.
s


7.   7.   In the Connection Strings, click on the WLAN.
8.   8.   Under the WLAN tab, select the Device for your WiFi hardware on your laptop. Then click the Add button. The Add Personal Network dialog appears.



9.  9.    Fill in the SSID box and the Security box with the WEP, WPA or WPA2 password. The type of Security would depend on how your home WiFi is configured.
10  10.  Under the SSID, there is a checkbox called “Non-Broadcast”. If your WiFi Network is usually hidden, then please tick this checkbox. Click OK to finish with the Add Personal Network dialog.
11  11.  Going back to the WLAN tab, your WiFi network should be listed (not necessarily connected) in the Personal Networks box.
12  12.  Put a tick in the “Display all WLAN networks” box.
13  13.  At this stage, if the home WiFi is hidden based on SSID, make sure it is set to Not Hidden or Unhide. It can be set to Hidden again at the end of this guide. You may need the help of your home WiFi administrator for this.
14  14.  Click OK to finish with the Connection Strings dialog.

15  15.  At the TRWS main dialog, your home WiFi network may appear in the list under Phonebook – Available Networks. Double click on your WiFi network in the list.
16  16.  If it does not appear in the list, then under the menu, select Bookmarks – select your WiFi list under there. If it does not appear here either, then check that the WiFi network is Not Hidden.
17  17.  Also, to check that the WiFi adapter hardware inside the laptop is working, under the Phonebook – Available Networks, there should be a list of WiFi networks possibly from your neighbours. This just shows the WiFi in your laptop is working.


18.  If the previous steps have been successful, that just means that the laptop is connected to your home network. To establish a VPN (Virtual Private Connection) to your company,  the following extra steps are needed. A dialog to establish a VPN appears. Click OK. Go to step 21.

     19.  If the above dialog does not appear automatically after 5 minutes of connection, then go to the Taskbar in Windows and look for a yellow padlock icon. Double click on this to open up the VPN client connection status.


      20.  In the VPN client status dialog above, double click on the connection entry, eg “cbamras”. This will open up the dialog in step 18. Click on the network option and click OK.
      21.  Another dialog appears to login to the VPN. The user name is “r” plus your normal username in the company. The password is your normal password in the company plus the numbers in the RSA Secure ID token. These instructions may differ for different corporations.
22.  At this stage you have connected to both the internet and your corporate VPN.

      23.  Some other notes:
       -  to browse the internet, you may need to give your corporate username and password, if it a corporate web proxy is used.

24. How to Reset Network password
On the occasion that your user password has been changed at the network, and your laptop password is out of sync, here are the steps to change the password on the laptop:
- Switch on the laptop and boot until the Windows login prompt.
- Login to Windows using the old password.
- Connect to the office network using Telstra RAS as described in this article.
- Once the laptop has established connection with the office network, the press Ctrl-Alt-Del and Lock the computer.
- Unlock the computer by   Ctrl-Alt-Del  and then enter the old password.
- Then press again Ctrl-Alt-Del and Lock the computer.
- This time, unlock the computer using the new password on the network.
- The laptop should now have the same password as the network.


Monday, April 12, 2010

On Cloud Computing

This post is a collection of interesting links on the subject of Cloud Computing (CC). Please feel free to add your links by submitting a comment.


U.S. Department of Energy Asks, Is Cloud Computing Fast Enough for Science?
With cloud computing gaining acceptance in the business world, the U.S. Department of Energy wants to know if cloud computing can also meet the needs of the scientific computing. The National Energy Research Scientific Computing Center (NERSC) has launched Magellan, a cloud computing testbed to explore this question, with facilities that will test the effectiveness of cloud computing for scientific projects..........



Virtualization and cloud security modeled on NAC - introduces the use of Network Access Control to address security issue in CC.
      Network Access Control - a method of controlling network security.

Australian Cost of Data Breach report released - "PGP CEO Phillip Dunkelberger told iTnews that organisations operating in the cloud incurred higher costs because of issues to do with territorial jurisdictions, and additional investigation and consulting fees."  


Cloud computing putting data at increased risk



"Hacking attempts double in two years, says latest PwC report. Nearly two thirds of companies have detected attempts to break into their networks in the past year, double that of two years ago, according to the latest biennial Information Security Breaches Survey from PricewaterhouseCoopers (PwC)."

A list of Cloud related technologies, providers,etc
http://www.cloudsigma.com 
http://gridspot.com 
http://www.profitbricks.com 
https://developers.google.com/appengine/kb/billing#time_granularity_instance_pricing 
https://cloud.google.com/pricing/compute-engine 
“50% of the time the site is down in seconds, even when we’ve contacted site owners 
and they’ve told us everything will be fine. It’s often an unprecedented amount of traf-fic, and they don’t have the required capacity.” Stephen Fry, actor and widely followed 
Twitter user, London, U.K.; http://tinyurl.com/StephenFrySeconds 
http://www.rackspace.com/cloud/public/servers/techdetails/ 
http://www.gogrid.com 
https://cloud.google.com/pricing/compute-engine 
http://aws.amazon.com/about-aws/newsletters/2012/08/14/august-2012/ 
http://aws.amazon.com/ebs/ 
https://developers.google.com/appengine/kb/billing 
Greg D’Alesandre, Google App Engine; http://tinyurl.com/D-Alesandre 
https://www.dotcloud.com/pricing.html 
https://cloud.google.com/pricing/ 
http://tinyurl.com/cloud-price-war 
http://openstack.org 
James Hamilton, Amazon Web Services, slide: “Amazon Cycle of Innovation”; 
http://tinyurl.com/james-hamilton 
http://spotcloud.com 
http://aws.amazon.com/ec2/reserved-instances/marketplace/ 
http://www.cloudsigma.com/cloud-computing/what-is-the-cloud/171 
http://www.cloudsigma.com/about-us/press-releases/242 
http://tinyurl.com/6fusion-CME 
http://docs.dotcloud.com/0.9/faq/ 

http://aws.amazon.com/ec2/reserved-instances/marketplace/