This post is about the various services available on the cloud for software development. In particular this type of cloud service is called Platform As A Service (PaaS). Typical example of his are:
1. VMware's Cloud Foundry http://docs.cloudfoundry.com/
2. Microsoft's Azure Cloud http://www.windowsazure.com/en-us/
Difference between Platform (PaaS) and Infrastructure (IaaS) cloud services
The PaaS are different to Infrastructure as a Service (IaaS) type of cloud, example being Amazon's Cloud Services like EC2 (Elastic Cloud). IaaS requires the user to setup all the infrastructure. As a developer or programmer, that means you need to install your own tools, compilers, IDE, development framework, etc. PaaS on the other hand has the development framework already installed and configured. As a developer, you just need to write code according to the framework and upload it to the cloud to run.
Cloud Foundry
Cost: Free - Open Source Platform
Infrastructure - http://docs.cloudfoundry.com/infrastructure/overview.html
Framework - http://docs.cloudfoundry.com/infrastructure/overview.html Click on the Framework menu item. Currently it supports Java, Node.js, Ruby environments.
Windows Azure
Cost: Paid - http://www.windowsazure.com/en-us/pricing/details/
Framework - Apparently it is NOT limited to the .Net development environment. The full features are at:
http://www.windowsazure.com/en-us/home/features/overview/
Tuesday, May 01, 2012
Development - Cloud Platform As A Service (PaaS)
Labels:
.Net,
Amazon EC2,
Azure,
Cloud,
Cloud Foundry,
Elastic Cloud,
IaaS,
java,
Microsoft,
Node.js,
PaaS,
Ruby,
VMware
Links - Big Data, Hadoop
This post is a collection on the topic of Big Data and its currently famous tool called Hadoop. Feel free to comments and recommend useful links.
What is Big Data?
Src: http://online.wsj.com/article/SB10001424052702304723304577365700368073674.html
"Big Data refers to the idea that an enterprise can mine all the data it collects right across its operations to unlock golden nuggets of business intelligence. And whereas companies in the past have had to rely on sampling, Big Data, or so the promise goes, means you can use your entire corpus of digitized corporate knowledge. It is, by all accounts, the next big thing."
Who do we need for Big Data?
http://gizmodo.com/5906204/the-problem-with-big-data-is-that-nobody-understands-it
The Problem With Big Data Is That Nobody Understands It
"They can take a data set and model it mathematically and understand the math required to build those models; they can actually do that, which means they have the engineering skills…and finally they are someone who can find insights and tell stories from their data. That means asking the right questions, and that is usually the hardest piece."
What is Big Data?
Src: http://online.wsj.com/article/SB10001424052702304723304577365700368073674.html
"Big Data refers to the idea that an enterprise can mine all the data it collects right across its operations to unlock golden nuggets of business intelligence. And whereas companies in the past have had to rely on sampling, Big Data, or so the promise goes, means you can use your entire corpus of digitized corporate knowledge. It is, by all accounts, the next big thing."
Who do we need for Big Data?
http://gizmodo.com/5906204/the-problem-with-big-data-is-that-nobody-understands-it
The Problem With Big Data Is That Nobody Understands It
"They can take a data set and model it mathematically and understand the math required to build those models; they can actually do that, which means they have the engineering skills…and finally they are someone who can find insights and tell stories from their data. That means asking the right questions, and that is usually the hardest piece."
Sunday, April 22, 2012
How Does a Router Protect
I posed the question to myself of "How does a router protect" based on my curiosity on what something I remembered that a router is already acting as a firewall. So I googled on the topic and found some very interesting results. The google results are listed below. But first, my summary is this:
1. Router uses NAT to protect computers connected behind the router.
2. The Router NAT technique protects outside attempts to talk to the computers behind the router - ie blocks inbound traffic.
3. But Router NAT does not by default block outbound traffic. A computer already infected may call outside to its base and get information or commands back.
4. Some say router is enough, other say software firewall is necessary.
5. Router NAT does not protect against computers or configuration which uses:
- VPN - to connect into a company's network from home securely.
- Port Forwarding - required when running a web server.
- DMZ - used by gamers sometimes to enable playing network games.
Any of these will by pass the NAT protection mechanism and expose the home computer and others on the network.
Setting up Cascading Router (LAN to LAN or WAN to LAN)
http://www.linksys.com/au/support-article?articleNum=132275
Using A Modem and Router combination
Internet -> ADSL Modem -> Router -> Device
(WAN stands for Wide Area Network and is the IP address given to you by the Internet service provider)
Double Nat
http://www.howtogeek.com/255206/how-use-your-router-and-isps-modemrouter-combo-in-tandem/
To overcome the Double NAT problem, one way is to use Bridging.
Switch the Modem into Bridge mode.
"Bridging is simply an old networking technique that transparently links two different networks."
Consequences:
- the modem will become a modem only, with have no effective routing functions.
- no devices can be connected directly to the modem unit
- no devices cab be wirelessly connected directly to the modem unit
https://www.cnet.com/how-to/home-networking-explained-part-8-cable-modem-shopping-tips/
On the other hand, it's a little bit more work to add a Wi-Fi router to your existing gateway.
1.you need to connect the new router's WAN (or Internet) port to the gateway.
2.make sure that the new router has a different IP address from that of the gateway. (Chances are they are already different, but if not, you will need to change that of the new router before plugging it to the gateway.)
3. And finally, apart from turning off the Wi-Fi network of the old gateway, if you want the new router to get the WAN IP address, you will need to configure the gateway to pass that to the router. The means of doing this varies depending on the gateway itself. The passing of the WAN IP address is only necessary if you want to set up customized Internet-related services, such as those mentioned in Part 9 of this series.
The Ultimate Modem/Router Setup Thread
http://www.tomshardware.com/forum/33700-42-ultimate-modem-router-setup-thread
When is an NAT router inadequate protection?
http://www.dslreports.com/faq/9787
temporary mirrored at:
http://xtechnotes.blogspot.com.au/2012/04/when-is-nat-router-inadequate.html
How Does A Router Protect My Computer?
http://www.askageek.com/2006/10/17/how-does-a-router-protect-my-computer/
A Router Can Protect your Computer
http://www.compukiss.com/articles/a-router-can-protect-your-computer.html
To what extent does the firewall on a router protect you?
http://askville.amazon.com/extent-firewall-router-protect/AnswerViewer.do?requestId=747083
How does a router protect you?
http://forums.cnet.com/7726-6035_102-5152551.html
Does my router have a firewall or not?
http://ask-leo.com/does_my_router_have_a_firewall_or_not.html
How do I protect users on my network from each other?
http://ask-leo.com/how_do_i_protect_users_on_my_network_from_each_other.html
info on dual router layer / double NATing architecture.
Labels:
DMZ,
firewall,
inbound,
NAT,
outbound,
Port Forwarding,
protection,
router,
software firewall,
traffic,
VPN
When is an NAT router inadequate protection
This article is mirroring the article at : http://www.dslreports.com/faq/9787 . The dslreports.com website seems to be down, and has no expected online time.
24 Apr 2012 - The original site seems to be working again. So go to http://www.dslreports.com/faq/9787
The main points of the article is extracted here:
----------------------------------------------------------------------
1. Depending on your network configuration, an NAT router can be a very cost-effective, inexpensive and reliable addition to your computer's security. At US$40 to $70, they can be worth getting even if you only have one computer.
1.1 You should definitely run a software firewall on any computer that connects to AOL using a different Internet Service Provider (AOL's Bring-Your-Own-Access plan or AOL MAX using an ISP) no matter what kind hardware firewall or NAT router you have.
1.2 If you have to turn on port forwarding or the DMZ to run servers or other applications you should consider either a software firewall or a more expensive SPI firewall.
1.3 Generally software firewalls provide valuable additional protection that supplements the protection provided by NAT routers and SPI firewalls.
Ideally a software firewall should be an additional layer of protection behind an NAT router or external firewall. For homes a free version of a software firewall is normally adequate for this additional layer of protection.
- ZoneAlarm Free
»www.zonelabs.com/store/content/home.jsp
Look for the free version / free download, and continue to ask for it rather than the Pro version.
- Sygate Personal Firewall
»download.com.com/3000-2092-10049···g=button
- Kerio Personal Firewall Limited Free Version (Sunbelt Kerio Personal Firewall)
»www.kerio.com/kpf_download.html
Look for the "limited free" version.
For businesses, computers running public servers, and computers on wireless networks, a paid-for version of a software firewall provides more protection by allowing more customization and more precise control.
2. In selecting an NAT router, software firewall, or hardware firewall, consider its logging and alerts capabilities.
3. If the router or firewall is wireless, secure the wireless interface.
4. Firewalls are not a replacement for adequate backups of data. (Firewalls don't protect against real fires, or burglars.) /faq/10194
5. Other security precautions still need to be taken. For example, operating systems and anti-virus software need to be properly installed, configured and updated.
6. There is no hardware or software you can install that will protect against massive amounts of traffic jamming your communications lines. "SPI firewalls" only protect against certain types of denial of service (DoS) attacks involving malformed packets, or protocol sequence violations and vulnerable software.
7. Historically, the original network firewalls did not do packet inspection. They were rule based, using tables of permitted IP addresses and ports. Packet inspection is not historically in the definition of firewalls.
8. The NAT firewall was a major advance. It limited inbound traffic based on the basic state of communications with the external IP address. Outbound traffic triggered permission for inbound traffic.
9. This is basically how a pure many:1 NAT router works. M:1 is the kind of router commonly used for home and SOHO users to provide a connection for many local computers using one public IP address.
10. Port forwarding bypasses the state table and that source of protection provided by the NAT router. Port forwarding (on a pure NAT router) causes almost all traffic that arrives at a particular port to go to a particular local IP address. (Basic packet filtering is the only protection for the port.)
11. The DMZ should be totally avoided on most NAT routers.
A DMZ is not normally required, provided you know your software. Check the software vendor's website, or email their support area, or search here in BBR, to find out what ports you need to set as trigger ports for which ports, or which ports to forward.
If you really do need a DMZ, use a device that treats the computer in the DMZ as though it was an untrusted computer outside your local network. Ordinary NAT routers do not normally provide this type of DMZ; they normally just forward all unsolicited traffic to the machine in the DMZ, leaving it with no NAT protection.
Here are some security testing sites: /faq/5503
Here is more on securing your home computer: /faq/8463
Here is more on securing a wireless router: /faq/8698
For discussion about your individual circumstances you can post a message in the BBR Security Forum here: /forum/security
24 Apr 2012 - The original site seems to be working again. So go to http://www.dslreports.com/faq/9787
The main points of the article is extracted here:
----------------------------------------------------------------------
1.1 You should definitely run a software firewall on any computer that connects to AOL using a different Internet Service Provider (AOL's Bring-Your-Own-Access plan or AOL MAX using an ISP) no matter what kind hardware firewall or NAT router you have.
1.2 If you have to turn on port forwarding or the DMZ to run servers or other applications you should consider either a software firewall or a more expensive SPI firewall.
1.3 Generally software firewalls provide valuable additional protection that supplements the protection provided by NAT routers and SPI firewalls.
Ideally a software firewall should be an additional layer of protection behind an NAT router or external firewall. For homes a free version of a software firewall is normally adequate for this additional layer of protection.
- ZoneAlarm Free
»www.zonelabs.com/store/content/home.jsp
Look for the free version / free download, and continue to ask for it rather than the Pro version.
- Sygate Personal Firewall
»download.com.com/3000-2092-10049···g=button
- Kerio Personal Firewall Limited Free Version (Sunbelt Kerio Personal Firewall)
»www.kerio.com/kpf_download.html
Look for the "limited free" version.
For businesses, computers running public servers, and computers on wireless networks, a paid-for version of a software firewall provides more protection by allowing more customization and more precise control.
2. In selecting an NAT router, software firewall, or hardware firewall, consider its logging and alerts capabilities.
3. If the router or firewall is wireless, secure the wireless interface.
4. Firewalls are not a replacement for adequate backups of data. (Firewalls don't protect against real fires, or burglars.) /faq/10194
5. Other security precautions still need to be taken. For example, operating systems and anti-virus software need to be properly installed, configured and updated.
6. There is no hardware or software you can install that will protect against massive amounts of traffic jamming your communications lines. "SPI firewalls" only protect against certain types of denial of service (DoS) attacks involving malformed packets, or protocol sequence violations and vulnerable software.
7. Historically, the original network firewalls did not do packet inspection. They were rule based, using tables of permitted IP addresses and ports. Packet inspection is not historically in the definition of firewalls.
8. The NAT firewall was a major advance. It limited inbound traffic based on the basic state of communications with the external IP address. Outbound traffic triggered permission for inbound traffic.
9. This is basically how a pure many:1 NAT router works. M:1 is the kind of router commonly used for home and SOHO users to provide a connection for many local computers using one public IP address.
10. Port forwarding bypasses the state table and that source of protection provided by the NAT router. Port forwarding (on a pure NAT router) causes almost all traffic that arrives at a particular port to go to a particular local IP address. (Basic packet filtering is the only protection for the port.)
11. The DMZ should be totally avoided on most NAT routers.
A DMZ is not normally required, provided you know your software. Check the software vendor's website, or email their support area, or search here in BBR, to find out what ports you need to set as trigger ports for which ports, or which ports to forward.
If you really do need a DMZ, use a device that treats the computer in the DMZ as though it was an untrusted computer outside your local network. Ordinary NAT routers do not normally provide this type of DMZ; they normally just forward all unsolicited traffic to the machine in the DMZ, leaving it with no NAT protection.
Here are some security testing sites: /faq/5503
Here is more on securing your home computer: /faq/8463
Here is more on securing a wireless router: /faq/8698
For discussion about your individual circumstances you can post a message in the BBR Security Forum here: /forum/security
Labels:
DMZ,
firewall,
NAT,
network,
Port Forwarding,
protection,
router,
software firewall,
SOHO,
VPN
Friday, April 20, 2012
Security - Phishing examples
This post is a collection of sample phishing emails. Of course there are plenty of variety, I'm just listing the ones here which caught my attention. Feel free to post in the comments any examples of phishing you have encountered.
Case1:
The payload itself is delivered as a zip file which this email tempts the user to open. Obviously the file is not attached here. The point is that the email below looks very very legitimate.
Case1:
The payload itself is delivered as a zip file which this email tempts the user to open. Obviously the file is not attached here. The point is that the email below looks very very legitimate.
From: HALL GILL [mailto:pilotstation@ computerpostage.com]
Sent: Thursday, 19 April 2012 9:26 PM
To: xxxxxxxxxx
Subject: An error at the delivery
Sent: Thursday, 19 April 2012 9:26 PM
To: xxxxxxxxxx
Subject: An error at the delivery
Delivery information,
Your parcel can’t be delivered by courier service.
Status deny: Address delivery doesn’t exist in database.
LOCATION OF YOUR PARCEL:Tempe
STATUS: sort order
SERVICE: Expedited Shipping
NUMBER OF YOUR PARCEL:U707019275 NU
INSURANCE: Yes
Postal label is enclosed to the letter.
Print your label and show it in the nearest post office of USPS
Important information! If the parcel isn’t received within 30 working days our company will have the right to claim compensation from you for it's keeping in the amount of $5.64 for each day of keeping.
You can find the information about the procedure and conditions of parcels keeping in the nearest office.
Thank you for attention.
USPS Global Services.
Your parcel can’t be delivered by courier service.
Status deny: Address delivery doesn’t exist in database.
LOCATION OF YOUR PARCEL:Tempe
STATUS: sort order
SERVICE: Expedited Shipping
NUMBER OF YOUR PARCEL:U707019275 NU
INSURANCE: Yes
Postal label is enclosed to the letter.
Print your label and show it in the nearest post office of USPS
Important information! If the parcel isn’t received within 30 working days our company will have the right to claim compensation from you for it's keeping in the amount of $5.64 for each day of keeping.
You can find the information about the procedure and conditions of parcels keeping in the nearest office.
Thank you for attention.
USPS Global Services.
Thursday, April 12, 2012
Saturday, March 31, 2012
Magic Squares - Explained
Magic Squares - explained
=========================
Here is a 3 x 3 magic square.
- the rows add up to T = 15.
- the columns add up to T
- the diagonals add up to T
Here's how to do it:
x 1 x ----- x 1 x ----- x 1 x
x x x ----- x x x ----- 3 x x
x x x ----- x x 2 ----- x x 2
x 1 x ----- x 1 x ----- x 1 6
3 x x ----- 3 5 x ----- 3 5 x
4 x 2 ----- 4 x 2 ----- 4 x 2
x 1 6 ----- 8 1 6 ----- 8 1 6
3 5 7 ----- 3 5 7 ----- 3 5 7
4 x 2 ----- 4 x 2 ----- 4 9 2
1. Start from top row middle column with S=1, S is the starting value.
2. Add 2,3,4,5,6,7,8,9 diagonally, that means try to go UP then RGIHT.
3. If UP is blocked, go to Right column, and fill the bottom row. eg. like filling "2".
4. If RIGHT is blocked, go to the LEFT most column of one row above, eg like filling "3".
5. Since this is a 3x3 square, after 3 numbers, then fill the next number just one row DOWN.
eg like filling in "4".
6. Repeat from step 3.
To generalize to N x N magic squares (MS), where N is ODD,
- in step 5 above, after filling every N numbers, move down exactly ONE row.
- the movement of UP -> RIGHT, that is diagonally, is same for all N x N magic squares.
- the relationship between the starting number S and the total number T is like this.
for 3x3 MS: T / 3 - 4 = S , 3 x 1 + 1 = 4
for 5x5 MS: T / 5 - 12 = S , 5 x 2 + 2 = 12
for 7x7 MS: T / 7 - 24 = S , 7 x 3 + 3 = 24
for 9x9 MS: T / 9 - 40 = S , 9 x 4 + 4 = 40
for NxN MS: T / N - K = S , N x (N-1)/2 + (N-1)/2 = N*N/2 - 1/2
- The sum of all rows or columns or diagonal T, must be divisible by N.
- For any N, the minumum S is 1.
- For any N, the constant K = N*N/2 - 1/2
- For any N, the minimum T is when S = 1,
so Tmin = (1 + N*N/2 - 1/2 ) * N
Sunday, March 04, 2012
How to Boost Your Broadband Speed
Here are 10 very simple tips to increase broadband speeds and links to several useful tools.
1. Test Your TV
Apart from TV there are other electrical equipment that can cause interference.
2. Avoid Extension Wiring - longer wire has poorer signals
3. Tweak your Wifi -
NetStumbler software (www.netstumbler.com/downloads) - use to which WiFi channels your neighbours are using.
4. Get Diagnosed - get help from your ISP.
5. Sort your system
Use unblocka (www.unblocka.com) to tune your settings to improve speed.
6. Keep your router up to date
7. Fine Tune MTU settings
MTU is one of the modem settings that can be changed. It controls the packet size of transmission. To identify issues with MTU - see www.pcauthority.com.au/links/129broad1. A guide on how to adjust MTU is found in www.dslreports.com/tweaks/MTU . Also the Speed Guide TCP Optimizer (www.speedguide.net/downloads.php) will identify the optimal MTU.
8. Ask for Interleaving
If you cannot solve your interference problems, you may be able to ask your ISP to switch on interleaving to improve performance. This essentially chops the packet into smaller pieces and has better error correction. This improve stability but may increase or decrease speed.
9. Replace your filters
A guide to test filters can be found at: www.pcauthority.com.au/links/129broad2
The technical details of what the inside of a filter looks like can be found in (www.adslnation.com/support/filters.php)
10. Watch out for AR7 routers
Routers with the AR7 chipset is known to have a fault so may cause connection to drop out. To find a list of router models containing this chipset, go to www.linux-mips.org/wiki/AR7
Firmware updates for some routers to correct this issue may be listed in www.pcauthority.com.au/links/129broad3
1. Test Your TV
Apart from TV there are other electrical equipment that can cause interference.
2. Avoid Extension Wiring - longer wire has poorer signals
3. Tweak your Wifi -
NetStumbler software (www.netstumbler.com/downloads) - use to which WiFi channels your neighbours are using.
4. Get Diagnosed - get help from your ISP.
5. Sort your system
Use unblocka (www.unblocka.com) to tune your settings to improve speed.
6. Keep your router up to date
7. Fine Tune MTU settings
MTU is one of the modem settings that can be changed. It controls the packet size of transmission. To identify issues with MTU - see www.pcauthority.com.au/links/129broad1. A guide on how to adjust MTU is found in www.dslreports.com/tweaks/MTU . Also the Speed Guide TCP Optimizer (www.speedguide.net/downloads.php) will identify the optimal MTU.
8. Ask for Interleaving
If you cannot solve your interference problems, you may be able to ask your ISP to switch on interleaving to improve performance. This essentially chops the packet into smaller pieces and has better error correction. This improve stability but may increase or decrease speed.
9. Replace your filters
A guide to test filters can be found at: www.pcauthority.com.au/links/129broad2
The technical details of what the inside of a filter looks like can be found in (www.adslnation.com/support/filters.php)
10. Watch out for AR7 routers
Routers with the AR7 chipset is known to have a fault so may cause connection to drop out. To find a list of router models containing this chipset, go to www.linux-mips.org/wiki/AR7
Firmware updates for some routers to correct this issue may be listed in www.pcauthority.com.au/links/129broad3
Labels:
ADSL filters,
AR7routers,
interference,
interleaving,
ISP,
MTU,
WiFi
Tuesday, February 28, 2012
Security - Manage Privacy with Google
Google is implementing significant changes to its privacy policy from 1 March 2012. Most users would have received notification of this.
Here's a news article discussing it:
If you use Google, you may want to read this
Stephen Hutcheon, February 29, 2012 - 7:33AM
How your web history page should look after you've clicked "remove".
Opinion: Australia absent in Google privacy feud
"Today is your last chance to adjust your Google privacy settings ahead of a major change to the way Google collects and collates data about you, its users.
From March 1, the company will begin to aggregate all the information it acquires about its users who are logged in to Google services into a single, unified pool of data."
Here is a list of tools on Google's page to help address privacy concerns:
http://www.google.com/intl/en/privacy/tools.html
Here are a few interesting items:
1. Use Google Search in Encrypted form: https://encrypted.google.com
2. Block Third party cookies and site Data.
For Chrome Browser:
a. Go to Options - Under the Botnet - click Content Settings - select "Block third-party cookies and site data".
b. On the same page, click on Manage Exceptions, to create a white list of trusted sites where cookies are allowed.
c. On the same page, click All Cookies and Site Data, and check which cookies are stored.
3. Instructions on how to transfer content in and out of Google products such as Google Docs and more:
http://www.dataliberation.org/
Here's a news article discussing it:
If you use Google, you may want to read this
Stephen Hutcheon, February 29, 2012 - 7:33AM
How your web history page should look after you've clicked "remove".
Opinion: Australia absent in Google privacy feud
"Today is your last chance to adjust your Google privacy settings ahead of a major change to the way Google collects and collates data about you, its users.
From March 1, the company will begin to aggregate all the information it acquires about its users who are logged in to Google services into a single, unified pool of data."
Here is a list of tools on Google's page to help address privacy concerns:
http://www.google.com/intl/en/privacy/tools.html
Here are a few interesting items:
1. Use Google Search in Encrypted form: https://encrypted.google.com
2. Block Third party cookies and site Data.
For Chrome Browser:
a. Go to Options - Under the Botnet - click Content Settings - select "Block third-party cookies and site data".
b. On the same page, click on Manage Exceptions, to create a white list of trusted sites where cookies are allowed.
c. On the same page, click All Cookies and Site Data, and check which cookies are stored.
3. Instructions on how to transfer content in and out of Google products such as Google Docs and more:
http://www.dataliberation.org/
Labels:
cookies,
encrypted search,
google,
google privacy,
white list
Sunday, February 19, 2012
Tips: Windows Shortcuts
Windows Shortcut Keys
F2 - rename a file
F3 - Find - opens up a dialog to search for word.
F6 - Go to Address Bar in most browsers
Shift + Right-Click - displays the context menu
Windows + B - select the first app in the task bar
Windows + E - opens Windows Explorer
Windows + F - opens the Windows file search window
Windows + L - locks your Windows immediately
Windows + M - clears the desktop, ie. minimizes all windows
Windows + R - opens the Run dialog
Windows + F1 - opens help for Windows
Windows + Tab - Switch between programs. Add the Shift key to go backwards
Windows + Pause/Break - Opens the System Properties dialog
Shift + Delete - to delete a file permanently
Ctrl + Drag - copy or moving files
Ctrl + Enter - In a browser, type the name of the website without www and com, then press these keys to go to the website
Alt + Esc - put this window to the back of the list
Alt + Ctrl + Fullstop - turn a fullstop into ellipsis.
Alt + F4 - Exits the current application, or exit Windows if there is no opened application
Alt + PrntScrn - Screen capture just the current window, not the whole desktop
Updated 27 Oct 2012
The following shortcuts are mainly for Windows 8 Metro
B Move focus to notification tray
C Show Charms menu
D Show Windows desktop
E Launch Windows Explorer
F Show Metro File Search screen
G Cycle through desktop Gadgets
H Show Metro Share panel
I Show Metro Settings panel
J Switches focus between snapped Metro applications
K Show the Devices panel
L Lock PC
M Minimise all Windows on the desktop
O Lock device orientation
P Choose between available displays (Projector)
Q Show Metro Search screen
R Show Run Dialogs
T Cycle through Taskbar icons
U Show Ease of Access Centre
V Cycle through toast notifications
W Show Metro Settings Search panel
X Show Power User Commands or Mobility Centre
Z Show the App Bar
1-9 Show/Launch Application from Taskbar
Page Up / Down Moves tiles to the left/right
Tab Switch between applications
, (comma) Aero Peek (desktop)
. (full stop) Snap Metro style app to right side of the screen
Shift . (full stop) Snap Metro style app to the left side of the screen
Space Switch input language and keyboard layout
Enter Launch Narrator
Arrow keys Aero Snap (desktop)
Updated 2 Nov 2012
http://pogue.blogs.nytimes.com/2012/10/25/a-windows-8-cheat-sheet/
Here are some instructions on shortcuts and other keys for the new Windows 8 interface.
Thursday, February 16, 2012
How to Program
The following section discusses the use of Linux/Unix as a programming environment. Below is a list of some tools. More details are covered in the linked article.
Unix as IDE: Introduction
http://blog.sanctum.geek.nz/series/unix-as-ide/
File and project management — ls, find, grep/ack, bash
Text editor and editing tools — vim, awk, sort, column
Compiler and/or interpreter — gcc, perl
Build tools — make
Debugger — gdb, valgrind, ltrace, lsof, pmap
Version control — diff, patch, svn, git
Some highly recognized books on programming:
The Little Schemer - Daniel P. Friedman
Mastering Algorithms with C - Kyle Loudon
C Programming Language (2nd Edition) - Brian W. Kernighan, Dennis M. Ritchie
Labels:
algorithms,
debugger,
debugging,
linux,
little schemer,
porgramming,
unix
Thursday, February 09, 2012
How To Recover Missing Systray Icons
This is still Work In Progress, but here are a few sites about how to solve the Missing Icon In Systray Bug.
Google: "missing icons" in taskbar
Labels:
explorer.exe,
missing icons,
systray,
systray.exe,
taskbar
Wednesday, February 08, 2012
Privacy - How To Cover Your Web Surfing Tracks and Internet Presence
When we go Web Surfing or Browsing the Internet with a web browser, we may think it looks like:
Me -> Website
but in fact it is more like
Me -> My Internet Service Provider (ISP) -> Website
When a web page appears on your computer, there is no magic - information is passed to and from Me, ISP and Website. Basically, anything about you that can be known, your IP (internet address), location, name you sign up with, etc, can be obtained by ISP and Website and by others.
There are many valid and legal reasons why people would like to keep their privacy from their ISP and the Websites they visit. So there are ways to Not Reveal to your ISP which websites you visit, and Not Reveal to the Websites where your real location is.
Using VPN
Hotspot Shield - This software connects your computer via a VPN to the servers of HotSpot Shield which then visits the Websites. It looks like this:
Me ---> My ISP HotSpot Shield Servers -> Website
----> VPN Tunnel ---->
So the Website thinks the visitor came from HotSpot Shield servers, instead of coming from you.
The ISP sees encrypted data and does not know which Website you are requesting to see.
Drawback: Theoretically your information is still known by HotSpot Shield servers. Well you have to trust someone in the end......
Here is a guide to set up VPN in Windows 7
http://www.pcworld.com/article/210562/how_set_up_vpn_in_windows_7.html
VPN Gate - An experimental VPN setup in Japan. Free to join.
http://www.vpngate.net/en/
Using Proxies
From a very high level, proxies work in a similar way to VPN. The key difference is that the traffics is not necessarily encrypted. However, the request to a website is send via another server in the middle, so that the destination website does not know it came from you. Since our information passes through a web proxies, we must trust those web-proxies that we use.
Here are some web-based proxies:
- Proxify - proxify.com
- Anonymouse - anonymouse.org
- Hide My Ass - www.hidemyass.com
There are manual proxy servers which require your browser to be configured to make use of the web proxy. The following sites maintain a list of proxy servers:
- Proxynova - www.proxynova.com
- Hide My Ass - www.hidemyass.com
Other Ways
There are many other ways to cover your tracks. This site http://www.how-to-hide-ip.info/hide-ip-tools/ has a collection of tools that cover a variety of ways, such as:
When you go to any these sites, your browser security may flag some of these sites to be suspicious. This could be due to their nature to hide identities or the fact that they are suspicious. In any case, make your own decision before visiting these sites.
Me -> Website
but in fact it is more like
Me -> My Internet Service Provider (ISP) -> Website
When a web page appears on your computer, there is no magic - information is passed to and from Me, ISP and Website. Basically, anything about you that can be known, your IP (internet address), location, name you sign up with, etc, can be obtained by ISP and Website and by others.
There are many valid and legal reasons why people would like to keep their privacy from their ISP and the Websites they visit. So there are ways to Not Reveal to your ISP which websites you visit, and Not Reveal to the Websites where your real location is.
Using VPN
Hotspot Shield - This software connects your computer via a VPN to the servers of HotSpot Shield which then visits the Websites. It looks like this:
Me ---> My ISP HotSpot Shield Servers -> Website
----> VPN Tunnel ---->
So the Website thinks the visitor came from HotSpot Shield servers, instead of coming from you.
The ISP sees encrypted data and does not know which Website you are requesting to see.
Drawback: Theoretically your information is still known by HotSpot Shield servers. Well you have to trust someone in the end......
Here is a guide to set up VPN in Windows 7
http://www.pcworld.com/article/210562/how_set_up_vpn_in_windows_7.html
VPN Gate - An experimental VPN setup in Japan. Free to join.
http://www.vpngate.net/en/
Using Proxies
From a very high level, proxies work in a similar way to VPN. The key difference is that the traffics is not necessarily encrypted. However, the request to a website is send via another server in the middle, so that the destination website does not know it came from you. Since our information passes through a web proxies, we must trust those web-proxies that we use.
Here are some web-based proxies:
- Proxify - proxify.com
- Anonymouse - anonymouse.org
- Hide My Ass - www.hidemyass.com
There are manual proxy servers which require your browser to be configured to make use of the web proxy. The following sites maintain a list of proxy servers:
- Proxynova - www.proxynova.com
- Hide My Ass - www.hidemyass.com
Other Ways
There are many other ways to cover your tracks. This site http://www.how-to-hide-ip.info/hide-ip-tools/ has a collection of tools that cover a variety of ways, such as:
- Tools on your PC for hiding IP
- Using Proxy in your Web Browser
- Proxy Sites
- Proxy Lists
- IP checking sites
- VPN services
Covering Web Browsing activities: using Tor www.torproject.org
In fact TOR (The Onion Router) is an ongoing and mature project with a lot of features that enable anonymity on the internet. TOR comes with a Bundled Browser with TOR preconfigured. TOR also has something for smart phones (see below).
For Smartphone, Mobile, Android systems:
- Orbot - this is based on the Tor technology but available to Android on smartphones.
Email Anonymity
Use the following to protect mask your identity when sending emails:
- Anonymouse - anonymouse.org
- Hide My Ass - www.hidemyass.com
Use the following to protect mask your identity when sending emails:
- Anonymouse - anonymouse.org
- Hide My Ass - www.hidemyass.com
When you go to any these sites, your browser security may flag some of these sites to be suspicious. This could be due to their nature to hide identities or the fact that they are suspicious. In any case, make your own decision before visiting these sites.
Labels:
anonymity,
browser,
Hide my ass,
hiding ip,
hot shield,
orbot,
privacy,
tor,
VPN,
web proxy
Thursday, January 19, 2012
How To Clean Up Windows
This article prevents some ideas of how to clean up your computer which has the Windows Operating System. The clean up here does to refer to any kind of virus or spyware removal. Instead, this article focuses on how to get rid of the junk that we or Windows itself accumulates on your computer throughout the years.
1. Scan using antivirus.
Although this article is not about removing virus but on the cleaning of junk files, one of the first step is to simply do a virus scan - just in case. Some useful articles are:
- using online virus scanners: http://xtechnotes.blogspot.com/2008/07/antivirus-online-scan.html
- discounted antivirus software http://xtechnotes.blogspot.com/2012/01/security-software-discounts-and-special.html
- news on security http://xtechnotes.blogspot.com/2011/08/news-security.html
- how to secure your computer: http://xtechnotes.blogspot.com/2010/03/how-to-secure-your-computer.html
2. Remove all unwanted programs.
Find a list of all your installed programs by going to Control Panel - Add or Remove Programs.
Decide which programs you do not need and uninstall them.
- some uninstaller software: http://xtechnotes.blogspot.com/2011/07/links-to-free-software.html
3. Find what is running in the background
Windows services are programs that run in the background after starting up themselves when the computer is switched on. Many will not tell you they are running. To find a list of these "services", go to Control Panel - Administrative Tools - Services.
Find those services which you know is definitely not needed, whether they are from Windows or not. There is no clear way to identify which service you don't want - they will come from experience. Basically just look at the name of the services - a weird name does not mean it is not needed. Sometimes look for a service with a simple name which you definitely know is not required. Example: If your computer has no wireless connection, then look for service with the name wireless and Disable it.
4. Clean the Registry
WARNING: If anything goes wrong at this step, very often this will make your whole computer unable to start and you may lose everything.
This step should be done by experienced users only.
Some tools to check are: CCleaner and TweakNow RegCleaner. (see http://xtechnotes.blogspot.com/2011/07/links-to-free-software.html )
5. Are all your files compressed?
Some computers may have come out of the box, configured to compress all your files by default. In Windows Explorer, if your files has filenames appearing in colour, then it may be compressed. To switch off this option, in Windows Explorer, right click on the folder and select Properties. Then uncheck any box for compression, for that file, folder or the entire drive.
6. Check updates
Ensure all updates including Windows Update and other antivirus updates are up to date.
7. Avoid re-installing Windows
Only reinstall Windows as a very last resort.
8. Cleaning Temporary Files
Ref: http://forum.wegotserved.com/index.php/tutorials/article/72-keeping-your-system-partition-cleaned-up-on-a-schedule/
C:\WINDOWS\system32\config\systemprofile\Local Settings\Temp\*.*
c:\temp\*.*
c:\windows\kb*.log
c:\windows\temp\*.*
- delete windows update uninstall files
dir c:\windows\$nt*
- delete Internet Explorer update uninstall files
dir c:\windows\ie8updates
..... any more ideas are appreciated ....
1. Scan using antivirus.
Although this article is not about removing virus but on the cleaning of junk files, one of the first step is to simply do a virus scan - just in case. Some useful articles are:
- using online virus scanners: http://xtechnotes.blogspot.com/2008/07/antivirus-online-scan.html
- discounted antivirus software http://xtechnotes.blogspot.com/2012/01/security-software-discounts-and-special.html
- news on security http://xtechnotes.blogspot.com/2011/08/news-security.html
- how to secure your computer: http://xtechnotes.blogspot.com/2010/03/how-to-secure-your-computer.html
2. Remove all unwanted programs.
Find a list of all your installed programs by going to Control Panel - Add or Remove Programs.
Decide which programs you do not need and uninstall them.
- some uninstaller software: http://xtechnotes.blogspot.com/2011/07/links-to-free-software.html
3. Find what is running in the background
Windows services are programs that run in the background after starting up themselves when the computer is switched on. Many will not tell you they are running. To find a list of these "services", go to Control Panel - Administrative Tools - Services.
Find those services which you know is definitely not needed, whether they are from Windows or not. There is no clear way to identify which service you don't want - they will come from experience. Basically just look at the name of the services - a weird name does not mean it is not needed. Sometimes look for a service with a simple name which you definitely know is not required. Example: If your computer has no wireless connection, then look for service with the name wireless and Disable it.
4. Clean the Registry
WARNING: If anything goes wrong at this step, very often this will make your whole computer unable to start and you may lose everything.
This step should be done by experienced users only.
Some tools to check are: CCleaner and TweakNow RegCleaner. (see http://xtechnotes.blogspot.com/2011/07/links-to-free-software.html )
5. Are all your files compressed?
Some computers may have come out of the box, configured to compress all your files by default. In Windows Explorer, if your files has filenames appearing in colour, then it may be compressed. To switch off this option, in Windows Explorer, right click on the folder and select Properties. Then uncheck any box for compression, for that file, folder or the entire drive.
6. Check updates
Ensure all updates including Windows Update and other antivirus updates are up to date.
7. Avoid re-installing Windows
Only reinstall Windows as a very last resort.
8. Cleaning Temporary Files
Ref: http://forum.wegotserved.com/index.php/tutorials/article/72-keeping-your-system-partition-cleaned-up-on-a-schedule/
C:\WINDOWS\system32\config\systemprofile\Local Settings\Temp\*.*
c:\temp\*.*
c:\windows\kb*.log
c:\windows\temp\*.*
- delete windows update uninstall files
dir c:\windows\$nt*
- delete Internet Explorer update uninstall files
dir c:\windows\ie8updates
..... any more ideas are appreciated ....
Sunday, January 01, 2012
Security Software Review, Discounts and Special Deals
This page lists some special offers on various security software including antivirus software and antispyware software. Since they are special deals from various sources, they are usually time limited. Please check the date when these links are posted.
There are also links to review of antivirus, antispyware, internet security software:
Android Security
A list of security software for Android devices is listed on this post:
http://xtechnotes.blogspot.com.au/2013/07/notes-android-apps.html
Reviews
The links in this section provide reviews of multiple antivirus, antispyware and security software. Sometimes the reviews contradict each other in their test results. However, looking at these reviews are better than not looking at all, when deciding which software to buy.
The Best Antivirus for 2012
Posted here: 2 Jan 2012
Review from pcmag
The main winners are: Norton Antivirus 2012 and Webroot SecurityAnywhere Antivirus
Reviews from CNET.com
Antivirus Software - review various software and can be filtered, sorted.
AV-Comparatives
Independent Tests of Anti-Virus Software
Virus Bulletion VB100
News on viruses and up-to-date review on antivirus software.
Lifetime Licences
The following antivirus, antispyware and security software have lifetime licences. They either let you pay once and use forever, or for multiple years. Unless otherwise stated, the list below are recommended software based on my positive experience.
WinPatrol Plus
"WinPatrol's easy tabbed interface allows you to explore deep inside your computer without having to be a computer expert. A one-time investment in WinPatrol PLUS provides a unique experience you won't find in any other software."
Spyshelter Premium
"SpyShelter uses special algorithms to protect you and your data against:
- Rootkits, zero-day malware, financial viruses that are used to steal or reveal your data to other parties and other harmful software for your system
- Extremely dangerous custom-made keyloggers and monitoring software that steal information you send via your computers- these are favorite tools of cybercriminals."
MalwareBytes Antimalware Pro
"Malwarebytes Anti-Malware PRO detects AND protects in an easy-to-use, straightforward, heavy-hitting but lightweight anti-malware application.
Consumers and personal users pay a one-time fee of just $24.95!"
Outpost Firewall Pro
http://www.agnitum.com/purchase/outpost/
"Outpost Firewall Pro provides a superior arsenal of defense against PC infiltration. Outpost ensures your online security with solid protection against all Internet-borne threats."
Discounts and Special Deals
Posted 14 May 2013
Bitdefender Internet Security 2013
https://partners.bitdefender.com/media/html/au/stgeorge/index.php
Appears to be intended for some Australian banks' customers. But the site allows anyone to download without checking any accounts. This may be a limited time.
Posted 24 Oct 2012
Malwarebytes deals at TrialPay is on again. This is a LIFETIME license product.
The catch is you do have to buy something from TrialPay, and the cheapest one I found is the Big Fish Games - about US$2.99.
The link below is the trialpay link specially for Malwarebytes - Enjoy!
http://www.trialpay.com/custom/cnet/downloadcom/?p=malwarebytes
Posted 12 Jan 2012
http://www.google.com.au/search?sourceid=chrome&ie=UTF-8&q=bit+defender+compatibility+malwarebytes
Bit Defender
FREE - This can be obtained for free by Westpac Bank or St George Bank customers in Australia, for 1 year I think. Very tempting because this seems like full software for free. But please look at the review for Bit Defender first (click on the link just above, or just google 'bit defender compatibility malwarebytes')
Several users have reported serious problems with this BitDefender.
Posted 7 Jan 2012
Spyware Terminator 2012
FREE - there is a round about way to get this "almost" free.
Download from the link above, and install it. This will be the basic version without F-Prot Antivirus.
After install - open the application and choose to Upgrade. Hopefully this will lead you to Trialpay.
In Trialpay - choose Snapfish and sign-up to print 20 photos for free. They will charge A$2.95 for handling fee.Then go back and receive installation code for full Spyware Terminator 2012 with F-Prot.
Summary: you get 20 free photo prints and Spyware Terminator 2012 with F-Prot. for Free but with handling fee of A$2.95
Posted 6 Jan 2012
Malwarebytes
coupon code – enter BM6-3S7-665 for 20% off or alternatively try code B3S-6Q1-H54 or Q65-TRJ-G7J to save 15% during checkout (you might want to check the comments for newer user-submitted coupons, some might not be working, depending on the actual website where you place the order)
Posted: 2 Jan 2012
http://www.webroot.com/En_US/sites/land-3product-25-40-50-percent-offer/
Webroot SecureAnywhere Complete
Up to 50% discount
Generally, this Webroot software has excellent and fantastic review but this particular review article below is quite the opposite.
http://www.expertreviews.co.uk/software/1288609/webroot-secureanywhere-complete
http://store.expertreviews.co.uk/p24688-avg_anti-virus_2012_1-pc
AVG Anti-Virus 2012 [1-PC]
includes 1-PC, 1-Year license
RRP: A$51.50
Save: A$45.55 (88%)
Our Price: A$5.95
Time Remaining: 30 days
http://download.cnet.com/Avira-Antivirus-Premium-2012/3000-2239_4-10625882.html?tag=mncol;2
Avira Antivirus Premium $19.99 1PC/1Yr
http://www.samssoftware.com.au/avira-products/home-products.html
Avira Antivirus Premium 2012 [Avira AntiVirus 2012] Discount (10% off)
CODE: Avira10
AUD$21.19.
Avira Internet Security 2012 Discount (10% off)
CODE: Avira20
AUD$43.28.
https://zemana.plimus.com/jsp/buynow.jsp?contractId=2207786
Click here to purchase Zemana AntiLogger for $10, using “Softpedia-NY-Promo” discount code
Zemana AntiLogger Full
RRP: A$36.00
Offer: $9.53
Codes valid on 22 Jan 2013:
specialoffer 50% off
smartpon-zal50 50% off
Discount Websites
The following sites often have coupons or discounts for software:
http://www.retailmenot.com
http://www.bitsdujour.com
Free Security Software
Best Free Intrusion Prevention and Detection Utility for Home Use (HIPS)
Outpost Security Suite (Firewall and Antivirus) FREE - does not work on Windows Server products
http://free.agnitum.com/
"Agnitum is the first security vendor to deliver a fully functional free version of an Internet security suite for Windows users. Outpost Security Suite FREE 7.1 builds on the acclaimed antivirus, firewall and proactive protection technologies. The free solution employs modern techniques to prevent infections, data corruption and PC intrusions."
ZoneAlarm Antivirus and Firewall Free
http://www.zonealarm.com/security/en-us/zonealarm-free-antivirus-firewall.htm
"The only all-in-one free security that seamlessly integrates award-winning Antivirus and ZoneAlarm Firewall together for maximum protection and performance."
There are also links to review of antivirus, antispyware, internet security software:
Android Security
A list of security software for Android devices is listed on this post:
http://xtechnotes.blogspot.com.au/2013/07/notes-android-apps.html
Reviews
The links in this section provide reviews of multiple antivirus, antispyware and security software. Sometimes the reviews contradict each other in their test results. However, looking at these reviews are better than not looking at all, when deciding which software to buy.
The Best Antivirus for 2012
Posted here: 2 Jan 2012
Review from pcmag
The main winners are: Norton Antivirus 2012 and Webroot SecurityAnywhere Antivirus
Reviews from CNET.com
Antivirus Software - review various software and can be filtered, sorted.
AV-Comparatives
Independent Tests of Anti-Virus Software
Virus Bulletion VB100
News on viruses and up-to-date review on antivirus software.
Lifetime Licences
The following antivirus, antispyware and security software have lifetime licences. They either let you pay once and use forever, or for multiple years. Unless otherwise stated, the list below are recommended software based on my positive experience.
WinPatrol Plus
"WinPatrol's easy tabbed interface allows you to explore deep inside your computer without having to be a computer expert. A one-time investment in WinPatrol PLUS provides a unique experience you won't find in any other software."
Spyshelter Premium
"SpyShelter uses special algorithms to protect you and your data against:
- Rootkits, zero-day malware, financial viruses that are used to steal or reveal your data to other parties and other harmful software for your system
- Extremely dangerous custom-made keyloggers and monitoring software that steal information you send via your computers- these are favorite tools of cybercriminals."
MalwareBytes Antimalware Pro
"Malwarebytes Anti-Malware PRO detects AND protects in an easy-to-use, straightforward, heavy-hitting but lightweight anti-malware application.
Consumers and personal users pay a one-time fee of just $24.95!"
Outpost Firewall Pro
http://www.agnitum.com/purchase/outpost/
"Outpost Firewall Pro provides a superior arsenal of defense against PC infiltration. Outpost ensures your online security with solid protection against all Internet-borne threats."
Discounts and Special Deals
Posted 14 May 2013
Bitdefender Internet Security 2013
https://partners.bitdefender.com/media/html/au/stgeorge/index.php
Appears to be intended for some Australian banks' customers. But the site allows anyone to download without checking any accounts. This may be a limited time.
Posted 24 Oct 2012
Malwarebytes deals at TrialPay is on again. This is a LIFETIME license product.
The catch is you do have to buy something from TrialPay, and the cheapest one I found is the Big Fish Games - about US$2.99.
The link below is the trialpay link specially for Malwarebytes - Enjoy!
http://www.trialpay.com/custom/cnet/downloadcom/?p=malwarebytes
Posted 12 Jan 2012
http://www.google.com.au/search?sourceid=chrome&ie=UTF-8&q=bit+defender+compatibility+malwarebytes
Bit Defender
FREE - This can be obtained for free by Westpac Bank or St George Bank customers in Australia, for 1 year I think. Very tempting because this seems like full software for free. But please look at the review for Bit Defender first (click on the link just above, or just google 'bit defender compatibility malwarebytes')
Several users have reported serious problems with this BitDefender.
Posted 7 Jan 2012
Spyware Terminator 2012
FREE - there is a round about way to get this "almost" free.
Download from the link above, and install it. This will be the basic version without F-Prot Antivirus.
After install - open the application and choose to Upgrade. Hopefully this will lead you to Trialpay.
In Trialpay - choose Snapfish and sign-up to print 20 photos for free. They will charge A$2.95 for handling fee.Then go back and receive installation code for full Spyware Terminator 2012 with F-Prot.
Summary: you get 20 free photo prints and Spyware Terminator 2012 with F-Prot. for Free but with handling fee of A$2.95
Posted 6 Jan 2012
Malwarebytes
coupon code – enter BM6-3S7-665 for 20% off or alternatively try code B3S-6Q1-H54 or Q65-TRJ-G7J to save 15% during checkout (you might want to check the comments for newer user-submitted coupons, some might not be working, depending on the actual website where you place the order)
Posted: 2 Jan 2012
http://www.webroot.com/En_US/sites/land-3product-25-40-50-percent-offer/
Webroot SecureAnywhere Complete
Up to 50% discount
Generally, this Webroot software has excellent and fantastic review but this particular review article below is quite the opposite.
http://www.expertreviews.co.uk/software/1288609/webroot-secureanywhere-complete
http://store.expertreviews.co.uk/p24688-avg_anti-virus_2012_1-pc
AVG Anti-Virus 2012 [1-PC]
includes 1-PC, 1-Year license
RRP: A$51.50
Save: A$45.55 (88%)
Our Price: A$5.95
Time Remaining: 30 days
http://download.cnet.com/Avira-Antivirus-Premium-2012/3000-2239_4-10625882.html?tag=mncol;2
Avira Antivirus Premium $19.99 1PC/1Yr
http://www.samssoftware.com.au/avira-products/home-products.html
Avira Antivirus Premium 2012 [Avira AntiVirus 2012] Discount (10% off)
CODE: Avira10
AUD$21.19.
Avira Internet Security 2012 Discount (10% off)
CODE: Avira20
AUD$43.28.
https://zemana.plimus.com/jsp/buynow.jsp?contractId=2207786
Click here to purchase Zemana AntiLogger for $10, using “Softpedia-NY-Promo” discount code
Zemana AntiLogger Full
RRP: A$36.00
Offer: $9.53
Codes valid on 22 Jan 2013:
specialoffer 50% off
smartpon-zal50 50% off
Discount Websites
The following sites often have coupons or discounts for software:
http://www.retailmenot.com
http://www.bitsdujour.com
Free Security Software
Best Free Intrusion Prevention and Detection Utility for Home Use (HIPS)
Outpost Security Suite (Firewall and Antivirus) FREE - does not work on Windows Server products
http://free.agnitum.com/
"Agnitum is the first security vendor to deliver a fully functional free version of an Internet security suite for Windows users. Outpost Security Suite FREE 7.1 builds on the acclaimed antivirus, firewall and proactive protection technologies. The free solution employs modern techniques to prevent infections, data corruption and PC intrusions."
ZoneAlarm Antivirus and Firewall Free
http://www.zonealarm.com/security/en-us/zonealarm-free-antivirus-firewall.htm
"The only all-in-one free security that seamlessly integrates award-winning Antivirus and ZoneAlarm Firewall together for maximum protection and performance."
Labels:
antispyware,
antivirus,
Discounts,
Internet Security,
Security Software Review,
Special Deals
Wednesday, December 07, 2011
Wednesday, November 30, 2011
NOTES GSL
Prerequisites
Building using Visual Studio C/C++
GSL Examples
GSL Considerations
Build GSL with MinGW
Running MSVC with minGW-built-GSL
GSL Makefile
General C define macros and typedef
GSL-C-Fortran Framework
Prerequisites
===============
For running on Windows system:
1. mingw (minimalist GNU for Windows)
- go to http://www.mingw.org/
- Download and install both mgw and msys: eg. mingw-get-inst-20110802.exe
- Install and select C++, Fortran and MSYS options
2. gsl (Gnu Scientific Library)
- go to http://www.gnu.org/s/gsl/
- Download from nearest GNU mirror, eg. http://ftpmirror.gnu.org/gsl/.
- Unpack it to a general place like c:\gsl....
Building using Visual Studio C/C++
===================================
http://gladman.plushost.co.uk/oldsite/computing/gnu_scientific_library.php
http://www.quantcode.com/modules/smartfaq/faq.php?faqid=33
The GSL subroutines are grouped according to functionality. For this document, we say that these functionalities are grouped into packages. Each package is a folder containing the source code for that functionality. In this section, we will compile the package called BLAS.
Note that this BLAS is actually gls_blas. It uses the underlying blas implementation called cblas.
cblas is the standard blas for C/C++ and is also available in MKL.
In this example build, we will build the gsl_blas and configure is to use cblas from MKL.
1. Create a Visual Studio C/C++ Project called GSLProj, under the Solution called GSLSoln.
Add New Project - Visual C++ - Win32 - Win32 Project - {DLL, Empty Project}
2. Go to Windows Explorer and copy the blas folder from c:\gsl....
and paste into the GSLProj folder.
Update: The following packages seemed to be a bare minimum and have enabled GSL to be compiled successfully with MSVC 2008 - blas, block, err, ieee-utils, matrix, sys, test, vector.
Update: Second batch of packages to be added:
- cdf, cheb, complex, eigen, integration, linalg, min, multimin, multiroots, permutation, poly, randist, rng, roots, sort, specfun,
3. In Windows Explorer, copy these files from c:\gsl
config.h , templates_on.h, templates_off.h, build.h
and paste into the GSLProj folder.
4. In Windows Explorer, under c:\gsl...., do a search for gsl_*.h. This will find all the gsl header files in the source code. Copy all of these and paste into a folder called gsl and put this folder under the GSLProj folder.
5. Go back to the Visual Studio GSLProj, go to the Solution Explorer and click on the little icon called "Show All Files" just on top of the Solution tree.
6. In the Solution Explorer, the tree becomes a folder tree view. Go to the branch GSLProj, right click on the blas folder (which appears now) and select "Include in Project". Inlcude any other project as necessary, only include their *.c is OK. All header files do not need to be INCLUDED via Visual Studio because the C compiler will pull the contents of *.h hearder files in.
7. For the ieee-utils package, exclude the files below which are for various different operating systems other than Windows. These files have names like: fp-[OS].c
Including fp.c seems to be OK.
For the matrix package, Include the matrix folder into the project.
Then exclude files: *.h, *.lo, *_source.c
Ensure that normal c files are included: *.c
Note that the *_source.c files are actually pulled into the base *.c file similar to how header files are included.
Specfun package also has these *.c files to be excluded from compile:
cheb_eval.c, cheb_eval_mode.c
In many matrix files, eg copy_source.c, file_source.c, getset_source.c, the copy.c, file.c, getset.c uses the templates_on/off.h which dynamically creates code using Preprocessor Macro definitions. This causes SEVERE problems at the line:
#define SHORT complex
because Microsoft Visual C redefines this in their math.h file as:
#define complex _complex
DO NOT Put this macro definition /D__cplusplus which may solve the _complex problem but creates new problems with other MS files like:
Error 1 error C2061: syntax error : identifier 'vc_attributes' c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h 42 VCPP_testDLL01
To solve the _complex problem definition, add this at the top of templates_on.h:
#ifdef complex
#define fixCOMPLEX_ 1
#undef complex
#endif
Also add this at the end of templates_off.h
// ASSUMES that the predefined complex is _complex in Microsoft's VC include\math.h and crt\src\math.h
#if fixCOMPLEX_ == 1
#define complex _complex
#undef fixCOMPLEX_
#endif
8. Right click on the GSLProj icon and select properties. In the Properties configuration, Configuration Properties:
- under C/C++ - Command Line
Add these compiler options: /DGSL_DLL /DDLL_EXPORT
- under C/C++ - General - Additional Include Directories:
enter the path to the current project folder.
enter the path to\mkl\include
- under Linker - General - Additional Library Directories:
enter\fortran\lib\ia32
enter\mkl\ia32\lib
- under Linker - Input - Additional Dependencies, enter these mkl, openmp libraries
for 32bit:
mkl_intel_c_dll.lib
mkl_intel_thread_dll.lib
mkl_core_dll.lib
libiomp5md.lib
for 64bit:
mkl_intel_lp64_dll.lib
mkl_intel_thread_dll.lib
mkl_core_dll.lib
libiomp5md.lib
The setup above enable the project to be linked to MKL's cblas routines.
9. Edit the config file so that the "!" is removed in the following lines:
#if HAVE_DECL_LDEXP
#if HAVE_DECL_FREXP
#if HAVE_DECL_HYPOT
For some reason the use of preprocessor macros does not seem to work well. Hence the config.h file need to be modified as above.
10. Removing cblas from GSL code.
- Exclude the cblas directory from the project
- Exclude the file gsl\gsl_cblas.h
- Remove the line
#include
and replace if necessary with
#include
for these files:
blas\blas.c
doc\examples\cblas.c // probably not needed
eigen\francis.c
eigen\nonsymmv.c
gsl_blas_types.h
11. Due to using mkl_cblas.h, these definitions need to be changed.
in gsl_blas_types.h, change to:
typedef CBLAS_ORDER CBLAS_ORDER_t;
typedef CBLAS_TRANSPOSE CBLAS_TRANSPOSE_t;
typedef CBLAS_UPLO CBLAS_UPLO_t;
typedef CBLAS_DIAG CBLAS_DIAG_t;
typedef CBLAS_SIDE CBLAS_SIDE_t;
... the enum keyword has been removed.
12. Add the following Preprocessor definitions
/P - only to check the preprocessed intermediate files
13. To add cdf package:
- add this to beta_inc.c
#include
- exclude from project, usually because these files are included in other files and are not really standalone files:
test_auto.c, beta_inc.c
cdf package needs the following packages:
specfun, cheb
14. Various packages of GSL, such as block and matrix, have some files with the same names such as file.c.
But the way MSVC compiles and builds by putting all *.obj files into the same DEBUG or RELEASE folder causes a problem. A simple way is to rename some of the clashing file names. This does not affect the ability to use the GSL-DLL functions, because functions have different names withing files with same names such as file.c
To quickly identify where duplicate filenames exist, go to Solution Explorer and click on the GSLProj project folder.
Near the top of the Solution Explorer panel, click on the icon to switch to Show All Files, such that all *.c files appear under the Source Files folder under your GSLProj project folder. Then rename any duplicate file names *.c.
Alternative - Right-click, Properties, C++, Output Files. Change the Object File Name from $(IntDir)\ to, say, $(IntDir)\block\. You can repeat for the vector file group, etc.
15. Inline functions.
The following packages are affected: cdf
MSVC++ accepts both inline and _inline BUT when the code is *.c and compiled with MSVC, then it only recognize _inline.
Error Messages are like:
Error 1 error C2054: expected '(' to follow 'inline' ...\specfunc\cheb_eval_mode.c
Error 2 error C2085: 'cheb_eval_mode_e' : not in formal parameter list ...\specfunc\cheb_eval_mode.c
Error 3 error C2143: syntax error : missing ';' before '{' ...\specfunc\cheb_eval_mode.c 6
Solution:
In specfun/cheb_eval_mode.c, airy.c , gamma.c, bessel.c, bessel_olver, bessel_zero, coupling.c, ellint.c
erfc.c, legendre_con, trig.c, zeta.c
change from inline to _inline
16. Notes on cdf and specfun packages.
- see 15. for "inline" issue
- Files to be renamed from *.c to *_cdf.c are:
cdf/beta.c to avoid clash with specfun/beta.c
- files to be excluded from compile:
cdf/beta_inc.c
17. Add randist package - needed by cdf
- inline keyword modified, see note 15; for files:
binomial_tpe.c, discrete.c, shuffle.c
- Files to be renamed from *.c to *_randist.c are:
beta.c, binomial.c, cauchy.c, chisq.c, exponential.c, exppow.c, fdist.c, flat.c, gamma.c,
gauss.c, geometric.c, hyperg.c, laplace.c, logistic.c, lognormal.c, nbinomial.c, pareto.c, pascal.c, poisson.c, rayleigh.c, rdist.c, weibull.c
18. Add rng package - needed by randist
- inline keyword modified, see note 15; for files:
... almost all files ...
- Files to be renamed from *.c to *_rng.c are:
file.c
19. Add complex package - needed by specfun
- Files to be renamed from *.c to *_complex.c are:
inline.c
20. Add eigen package - needed by specfun
- inline keyword modified, see note 15; for files:
gen.c, francis.c, qrstep.c, jacobi.c,
- Remove //#include
and replace by #include
in these files: francis.c, nonsymmv.c
- exclude from project:
qrstep.c
21. Add linalg package - needed by
- inline keyword modified, see note 15; for files:
apply_givens.c, cholesky.c, givens.c, exponential.c
- exclude from project:
apply_givens.c, givens.c, svdstep.c
22. Add permutation package - needed by linalg
- inline keyword modified, see note 15; for files:
- Files to be renamed from *.c to *_permutation.c are:
file.c, init.c, inline.c,
- exclude from project:
permute_source.c
Add integration package - needed by randist
- inline keyword modified, see note 15; for files:
append.c, initialise.c, positivity.c, set_initial.c, qpsrt.c, util.c, reset.c, qelg.c,
- Files to be renamed from *.c to *_integration .c are:
- exclude from project:
append.c, cquad_const.c, err.c, initialise.c, positivity.c, ptsort.c, qpsrt.c, util.c, reset.c
qelg.c, qc25c.c, qc25f.c, qc25s.c, qpsrt2.c, set_initial.c,
NOTE: if some *.c files which are included by other *.c files are NOT excluded from compile, then errors like these occur:
Error 1 error C2143: syntax error : missing ')' before '*'
Error 2 error C2143: syntax error : missing '{' before '*'
Error 3 error C2059: syntax error : 'type'
Error 4 error C2059: syntax error : ')'
Add sort package - needed by eigen
- inline keyword modified, see note 15; for files:
sort.c, sortind.c, sortvec_source.c, sortvecind_source.c,
- Files to be renamed from *.c to *_sort.c are:
- exclude from project:
sortvec_source.c, sortvecind_source.c, subset_source.c, subsetind_source.c,
test_heapsort.c, test_source.c,
Add min package - for minimization routines
- Add static to these functions:
min/test.c::my_error_handler()
Add roots package
- inline keyword modified, see note 15; for files:
- Files to be renamed from *.c to *_roots.c are:
test.c, test_funcs.c
- exclude from project:
Add multimin package
- inline keyword modified, see note 15; for files:
simplex2.c
- Files to be renamed from *.c to *_multimin.c are:
test.c, test_funcs.c
- exclude from project:
directional_minimize.c, linear_minimize.c, linear_wrapper.c,
Add poly package - needed by multimin
- inline keyword modified, see note 15; for files:
- Files to be renamed from *.c to *_multimin.c are:
test.c, eval.c, deriv.c,
- exclude from project:
companion.c, balance.c, qr.c,
Add multiroots package
- inline keyword modified, see note 15; for files:
- Files to be renamed from *.c to *_multiroots.c are:
convergence.c, fdfsolver.c, fsolver, newton.c, test_funcs.c, test.c
- exclude from project:
enorm.c, dogleg.c
23. To make use of GSL's own test, do the following to the selected GSL packages as needed:
cdf, specfunc, rng, randist, min, roots, multimin, poly,
- eg. in cdf/test.c (which has been renamed to test_cdf.c), rename the function
main to main_cdf.c
- ensure say, cdf/test.c is now included in the project and compile.
- for the test functions, say: void main_cdf(void)
put its prototype function in your own driver program using extern, like:
extern "C" { void main_cdf(void); }
- in the main functions, say main_cdf(), at the last line of the function, change this:
exit(gsl_test_summary());
to this, to return the EXIT_SUCCESS or EXIT_FAILURE code
return gsl_test_summary();
- in the main functions, say main_sf(), if there are arguments that are not used like this:
int main_sf(int argc, char * argv[])
to the following
int main_sf(void)
- in cdf package ONLY: in file test_cdf.c, change the line from:
void test_gamma (void)
to rename it to:
void test_gamma_cdf (void)
and in the same file, change the call to the test_gamma function from:
test_gamma();
to the new name :
test_gamma_cdf();
This is done to prevent clash with a function of the same name test_gamma() in specfunc.
- in randist package only, change the following functions by adding the keyword "static",
so that other files to not uses these functions. The functions made "static" are:
test_beta, test_binomial_pdf, test_chisq, test_exponential, test_fdist, test_gamma,
test_ugaussian, test_geometric_pdf, test_hypergeometric2_pdf, test_negative_binomial_pdf,
test_pascal_pdf, test_poisson_pdf
- in roots package only, change the following functions by adding the keyword "static",
so that other files to not uses these functions. The functions / variables made "static" are:
test_roots.c: EPSREL, EPSABS, MAX_ITERATIONS, test_f, test_f_e, my_error_handler,
test_funcs_roots.c: create_function, func1, func2, func3, func4
- in multimin package only, change the following functions by adding the keyword "static",
so that other files to not uses these functions. The functions / variables made "static" are:
test_fdf, test_f,
- in multiroots package only, change the following functions by adding the keyword "static",
so that other files to not uses these functions. The functions / variables made "static" are:
test_multiroots.c: test_fdf, test_f,
test_funcs_multiroots.c: rosenbrock, rosenbrock_initpt, rosenbrock_f, rosenbrock_df, rosenbrock_fdf,
wood, wood_initpt, wood_f, wood_df, wood_fdf,
roth, roth_initpt, roth_f, roth_df, roth_fdf,
- Strange reason, the two functions gsl_cdf_logistic_Q and gsl_cdf_logistic_P are not visible to the test program and cannot be compiled. Typical error messages are:
Error 1 error LNK2001: unresolved external symbol gsl_cdf_logistic_Q test_cdf.obj vcpp_gsl
Error 1 error LNK2019: unresolved external symbol gsl_cdf_logistic_Q test_cdf.obj vcpp_gsl
to solve this problem, go to the file cdf/logistic.c and copy the two functions of
gsl_cdf_logistic_Q and gsl_cdf_logistic_P
and paste it to cdf/test_auto.c and place it above the line:
void test_auto_logistic (void)
ALTERNATIVE: Better solution is to check no two source files has the same name. This is already described in point 15. When two files have same name, one of them is not compiled and so its functions cannot be found.
- other files where functions are already identified somewhere else in test*.c. The solution is to add the static keyword to these functions:
test_integration.c: my_error_handler
test_linalg.c: my_error_handler
Debugging:
Modified test_roots.c: void test_f, test\results.c: void gsl_test()
Completed [12017/12017]
GSL cdf test result is 0
end of gsl cdf test
Completed [14995/14995]
GSL specfunc test result is 0
end of gsl specfunc test
-10, 1072693247, 0, 0
FAIL: results.c::gsl_test:: [15003]incorrect precision (%g obs vs %g expected)
-16, 1072693247, -350469331, 1058682594
FAIL: results.c::gsl_test:: [15005]incorrect precision (%g obs vs %g expected)
2142418408, 1061077358, 0, 0
FAIL: results.c::gsl_test:: [15007]incorrect precision (%g obs vs %g expected)
-13, 1072693247, -350469331, 1058682594
FAIL: results.c::gsl_test:: [15020]incorrect precision (%g obs vs %g expected)
2142401953, 1061077358, 0, 0
FAIL: results.c::gsl_test:: [15022]incorrect precision (%g obs vs %g expected)
-10, 1072693247, 0, 0
FAIL: results.c::gsl_test:: [15034]incorrect precision (%g obs vs %g expected)
-13, 1072693247, -350469331, 1058682594
FAIL: results.c::gsl_test:: [15036]incorrect precision (%g obs vs %g expected)
2142401953, 1061077358, 0, 0
FAIL: results.c::gsl_test:: [15038]incorrect precision (%g obs vs %g expected)
FAIL: results.c::gsl_test:: [15064]%s, %s (%g obs vs %g expected)
FAIL: results.c::gsl_test:: [15065]exceeded maximum number of iterations
FAIL: results.c::gsl_test:: [15066]incorrect precision (%g obs vs %g expected)
FAIL: results.c::gsl_test:: [15068]incorrect precision (%g obs vs %g expected)
FAIL: results.c::gsl_test:: [15070]incorrect precision (%g obs vs %g expected)
FAIL: results.c::gsl_test:: [15072]%s, %s
GSL roots test result is 1
end of gsl roots test
GSL Examples
================
http://apwillis.staff.shef.ac.uk/aco/freesoftware.html - passing function as argument
http://www.helsinki.fi/~fyl_tlpk/luento/ohj-13-GSL-e.html - passing function as argument
Fortran GSL
http://www.lrz.de/services/software/mathematik/gsl/fortran/index.html
http://uncwddas.googlecode.com/svn/trunk/other/gsl-1.8/gsl.vc/gsl.vc8.readme.txt
GSL Considerations
===================
32-64 bit
cblas replace with blas - can used ATLAS (C) at least
Build GSL with MinGW
========================
MSVC and MinGW Dlls - shows how to build Dll using MinGW that can be used by MSVC
http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs
GSL can be build using MinGW with the following commands:
configure
OR to just make a dynamic library without static lib;
./configure --enable-static=no
then
make
In general, to specify on conditions and macro definitions:
env CPPFLAGS="-DGSL_DLL" ./configure --enable-static=no
./configure --enable-static=no CPPFLAGS="-DGSL_DLL"
Don't need to add GSL_DLL definition - this is just an exmaple.
The result is are the following files:
in [gsl]\cblas\.libs: libgslcblas.dll.a, libgslcblas.a, libgslcblas-0.dll, libgslcblas.la, libgslcblas.lai
in [gsl]\libs: libgsl.dll.a, libgsl.a, libgsl-0.dll, libgsl.la, libgsl.lai
If there are errors during MAKE, like these:
infnan.c:98:3: error: #error "cannot define gsl_finite without HAVE_DECL_FINITE or HAVE_IEEE_COMPARISONS"
infnan.c:115:3: error: #error "cannot define gsl_isnan without HAVE_DECL_ISNAN or HAVE_IEEE_COMPARISONS"
to solve this, go into [gsl]\config.h and remove the UNDEF lines and add DEFINE lines like:
//#undef HAVE_DECL_ISFINITE
#define HAVE_DECL_ISFINITE 1
//#undef HAVE_DECL_ISNAN
#define HAVE_DECL_ISNAN 1
To make GSL compatible with MSVC(Microsoft Visual C), then edit gsl_types.h file, to ensure that the following line is defined:
Run-Time Check Failure #0 - The value of ESP was not properly saved
across a function call. This is usually a result of calling a function
declared with one calling convention with a function pointer declared
with a different calling convention.
The message above about calling convention is misleading. The gsl dll may be in the right calling convention already. The caller to the functions in gsl need to specify explicitly
__cdel(dllimport)
on the prototype for the function they need to call.
Running MSVC with minGW-built-GSL
===================================
First, built the GSL using MinGW as described in "Build GSL with MinGW" section.
Then,
To LINK with MSVC, use the *.dll.a, but rename them to *.lib
To RUN with MSVS, put the *-0.dll files into the runtime path.
Error Message when running
"Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention."
..... need to check calling conventions.
Aside: To convert MSVC *.lib into *.a for GNU/GCC in MinGW, use the tool called "reimp".
GSL Makefile
=============
some key definitions of the Makefile is below.
$(SHELL) $(top_builddir)/libtool
libgsl.la: $(libgsl_la_OBJECTS) $(libgsl_la_DEPENDENCIES)
$(libgsl_la_LINK) -rpath $(libdir) $(libgsl_la_OBJECTS) $(libgsl_la_LIBADD) $(LIBS)
92:
libgsl_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libgsl_la_LDFLAGS) $(LDFLAGS) -o $@
294:
libdir = ${exec_prefix}/lib
343:
libgsl_la_LIBADD = $(SUBLIBS) $(am__append_1)
233:
LIBS = -lm
234:
LIBTOOL = $(SHELL) $(top_builddir)/libtool
112:
CCLD = $(CC)
184:
CFLAGS = -g -O2
344:
libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION) $(am__append_2)
90:
am_libgsl_la_OBJECTS = version.lo
libgsl_la_OBJECTS = $(am_libgsl_la_OBJECTS)
88:
libgsl_la_DEPENDENCIES = $(SUBLIBS) $(am__append_1)
43:
am__append_1 = cblas/libgslcblas.la
44:
am__append_2 = -no-undefined
315:
SUBLIBS = block/libgslblock.la blas/libgslblas.la \
bspline/libgslbspline.la complex/libgslcomplex.la \
cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la \
deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la \
fft/libgslfft.la fit/libgslfit.la histogram/libgslhistogram.la \
ieee-utils/libgslieeeutils.la integration/libgslintegration.la \
interpolation/libgslinterpolation.la linalg/libgsllinalg.la \
matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la \
multifit/libgslmultifit.la multimin/libgslmultimin.la \
multiroots/libgslmultiroots.la ntuple/libgslntuple.la \
ode-initval/libgslodeiv.la ode-initval2/libgslodeiv2.la \
permutation/libgslpermutation.la \
combination/libgslcombination.la multiset/libgslmultiset.la \
poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la \
rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la \
sort/libgslsort.la specfunc/libgslspecfunc.la \
statistics/libgslstatistics.la sum/libgslsum.la \
sys/libgslsys.la test/libgsltest.la utils/libutils.la \
vector/libgslvector.la cdf/libgslcdf.la \
wavelet/libgslwavelet.la
Sample of actual output in Make:
libtool: link: ln .libs/libgsl.lax/libgslcdf.a/fdist.o .libs/libgsl.lax/lt72-fdist.o || cp .libs/libgsl.lax/libgslcdf.a/fdist.o .libs/libgsl.lax/lt72-fdist.o
libtool: link: ln .libs/libgsl.lax/libgslcdf.a/flat.o .libs/libgsl.lax/lt73-flat.o || cp .libs/libgsl.lax/libgslcdf.a/flat.o .libs/libgsl.lax/lt73-flat.o
libtool: link: ln .libs/libgsl.lax/libgslcdf.a/gamma.o .libs/libgsl.lax/lt74-gamma.o || cp .libs/libgsl.lax/libgslcdf.a/gamma.o .libs/libgsl.lax/lt74-gamma.o
libtool: link: ln .libs/libgsl.lax/libgslcdf.a/gauss.o .libs/libgsl.lax/lt75-gauss.o || cp .libs/libgsl.lax/libgslcdf.a/gauss.o .libs/libgsl.lax/lt75-gauss.o
libtool: link: ln .libs/libgsl.lax/libgslcdf.a/geometric.o .libs/libgsl.lax/lt76-geometric.o || cp .libs/libgsl.lax/libgslcdf.a/geometric.o .libs/libgsl.lax/lt76-geometric.o
libtool: link: ln .libs/libgsl.lax/libgslcdf.a/laplace.o .libs/libgsl.lax/lt77-laplace.o || cp .libs/libgsl.lax/libgslcdf.a/laplace.o .libs/libgsl.lax/lt77-laplace.o
libtool: link: ln .libs/libgsl.lax/libgslcdf.a/logistic.o .libs/libgsl.lax/lt78-logistic.o || cp .libs/libgsl.lax/libgslcdf.a/logistic.o .libs/libgsl.lax/lt78-logistic.o
General C define macros and typedef
=====================================
#define [dummy] [real text]
eg.
# define __BEGIN_DECLS extern "C" {
this means whenever the "__BEGIN_DECLS" is used in the code, the pre-processor will replace it with:
extern "C" {
typedef [type] [alias]
eg.
Note the actual type, like the struct above, is declared first, followed by the last word which is the alias LINE.
BUT, this is reverse for #define where the actual alias or dummy is the first word, then the rest are the real text.
An alternative way to declare a struct using "tag" is:
Note that using the tag method for struct, the keyword struct still need to be included in the declaration.
GSL-C-Fortran Framework
=======================
1. Compile the GSL into a library with vcpp_gsl.lib|.bin, see "Building using Visual Studio C/C++"
2. Create a wrapper C++ project, say gslCwrap.
3. Create a header file gslCwrap.h and code file gslCwrap.c
4. In the header file gslCwrap.h
a) prepare to export the wrappers.
extern "C"{
__declspec(dllexport) void cdfGaussP (double x, double *p);
__declspec(dllexport) void fnGamma (double x, double *gamma);
}
b) include reference to GSL header like and call gsl function:
#include "gsl/gsl_cdf.h"
#include "gsl/gsl_sf_gamma.h"
void cdfGaussP (double x, double *p) { *p = gsl_cdf_ugaussian_P(x); }// 2 * x; }
void fnGamma (double x, double *gamma) { *gamma = gsl_sf_gamma(x); }
the actual gsl function names used here are: gsl_cdf_ugaussian_P, gsl_sf_gamma
5. To call from Fortran, prepare a Fortran interface:
interface
SUBROUTINE cdfGauss_P(x, P) BIND(C, NAME='cdfGaussP')
USE, INTRINSIC :: ISO_C_BINDING ! New Fortran 2003 standard
IMPLICIT NONE
REAL(C_DOUBLE), VALUE :: x
REAL(C_DOUBLE) :: P
END SUBROUTINE cdfGauss_P
SUBROUTINE fnGamma(x, dGamma) BIND(C, NAME='fnGamma')
USE, INTRINSIC :: ISO_C_BINDING ! New Fortran 2003 standard
IMPLICIT NONE
REAL(C_DOUBLE), VALUE :: x
REAL(C_DOUBLE) :: dGamma
END SUBROUTINE fnGamma
end interface
6. In the Fortran code, just call the function as specified by the interface.
Eg.
call fnGamma(vecX(ii), answ)
call cdfGauss_P(vecQ(ii), answ)
There are at least 3 projects involved here.
vcpp_gsl - this keeps the gsl code in its own project, so that it is independent of any change in interface or usage.
gslCwrap - this consist of the C wrappers so that it can be used by C code or Fortran code. It also transforms all gsl functions into VOID C functions so that it can be called as Fortran subroutines. Fortran Interface - this is freely linked to the gslCwrap wrapper code. There is no direct reference to the GSL code.
Building using Visual Studio C/C++
GSL Examples
GSL Considerations
Build GSL with MinGW
Running MSVC with minGW-built-GSL
GSL Makefile
General C define macros and typedef
GSL-C-Fortran Framework
Prerequisites
===============
For running on Windows system:
1. mingw (minimalist GNU for Windows)
- go to http://www.mingw.org/
- Download and install both mgw and msys: eg. mingw-get-inst-20110802.exe
- Install and select C++, Fortran and MSYS options
2. gsl (Gnu Scientific Library)
- go to http://www.gnu.org/s/gsl/
- Download from nearest GNU mirror, eg. http://ftpmirror.gnu.org/gsl/.
- Unpack it to a general place like c:\gsl....
Building using Visual Studio C/C++
===================================
http://gladman.plushost.co.uk/oldsite/computing/gnu_scientific_library.php
http://www.quantcode.com/modules/smartfaq/faq.php?faqid=33
The GSL subroutines are grouped according to functionality. For this document, we say that these functionalities are grouped into packages. Each package is a folder containing the source code for that functionality. In this section, we will compile the package called BLAS.
Note that this BLAS is actually gls_blas. It uses the underlying blas implementation called cblas.
cblas is the standard blas for C/C++ and is also available in MKL.
In this example build, we will build the gsl_blas and configure is to use cblas from MKL.
1. Create a Visual Studio C/C++ Project called GSLProj, under the Solution called GSLSoln.
Add New Project - Visual C++ - Win32 - Win32 Project - {DLL, Empty Project}
2. Go to Windows Explorer and copy the blas folder from c:\gsl....
and paste into the GSLProj folder.
Update: The following packages seemed to be a bare minimum and have enabled GSL to be compiled successfully with MSVC 2008 - blas, block, err, ieee-utils, matrix, sys, test, vector.
Update: Second batch of packages to be added:
- cdf, cheb, complex, eigen, integration, linalg, min, multimin, multiroots, permutation, poly, randist, rng, roots, sort, specfun,
3. In Windows Explorer, copy these files from c:\gsl
config.h , templates_on.h, templates_off.h, build.h
and paste into the GSLProj folder.
4. In Windows Explorer, under c:\gsl...., do a search for gsl_*.h. This will find all the gsl header files in the source code. Copy all of these and paste into a folder called gsl and put this folder under the GSLProj folder.
5. Go back to the Visual Studio GSLProj, go to the Solution Explorer and click on the little icon called "Show All Files" just on top of the Solution tree.
6. In the Solution Explorer, the tree becomes a folder tree view. Go to the branch GSLProj, right click on the blas folder (which appears now) and select "Include in Project". Inlcude any other project as necessary, only include their *.c is OK. All header files do not need to be INCLUDED via Visual Studio because the C compiler will pull the contents of *.h hearder files in.
7. For the ieee-utils package, exclude the files below which are for various different operating systems other than Windows. These files have names like: fp-[OS].c
Including fp.c seems to be OK.
For the matrix package, Include the matrix folder into the project.
Then exclude files: *.h, *.lo, *_source.c
Ensure that normal c files are included: *.c
Note that the *_source.c files are actually pulled into the base *.c file similar to how header files are included.
Specfun package also has these *.c files to be excluded from compile:
cheb_eval.c, cheb_eval_mode.c
In many matrix files, eg copy_source.c, file_source.c, getset_source.c, the copy.c, file.c, getset.c uses the templates_on/off.h which dynamically creates code using Preprocessor Macro definitions. This causes SEVERE problems at the line:
#define SHORT complex
because Microsoft Visual C redefines this in their math.h file as:
#define complex _complex
DO NOT Put this macro definition /D__cplusplus which may solve the _complex problem but creates new problems with other MS files like:
Error 1 error C2061: syntax error : identifier 'vc_attributes' c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h 42 VCPP_testDLL01
To solve the _complex problem definition, add this at the top of templates_on.h:
#ifdef complex
#define fixCOMPLEX_ 1
#undef complex
#endif
Also add this at the end of templates_off.h
// ASSUMES that the predefined complex is _complex in Microsoft's VC include\math.h and crt\src\math.h
#if fixCOMPLEX_ == 1
#define complex _complex
#undef fixCOMPLEX_
#endif
8. Right click on the GSLProj icon and select properties. In the Properties configuration, Configuration Properties:
- under C/C++ - Command Line
Add these compiler options: /DGSL_DLL /DDLL_EXPORT
- under C/C++ - General - Additional Include Directories:
enter the path to the current project folder.
enter the path to
- under Linker - General - Additional Library Directories:
enter
enter
- under Linker - Input - Additional Dependencies, enter these mkl, openmp libraries
for 32bit:
mkl_intel_c_dll.lib
mkl_intel_thread_dll.lib
mkl_core_dll.lib
libiomp5md.lib
for 64bit:
mkl_intel_lp64_dll.lib
mkl_intel_thread_dll.lib
mkl_core_dll.lib
libiomp5md.lib
The setup above enable the project to be linked to MKL's cblas routines.
9. Edit the config file so that the "!" is removed in the following lines:
#if HAVE_DECL_LDEXP
#if HAVE_DECL_FREXP
#if HAVE_DECL_HYPOT
For some reason the use of preprocessor macros does not seem to work well. Hence the config.h file need to be modified as above.
10. Removing cblas from GSL code.
- Exclude the cblas directory from the project
- Exclude the file gsl\gsl_cblas.h
- Remove the line
#include
and replace if necessary with
#include
for these files:
blas\blas.c
doc\examples\cblas.c // probably not needed
eigen\francis.c
eigen\nonsymmv.c
gsl_blas_types.h
11. Due to using mkl_cblas.h, these definitions need to be changed.
in gsl_blas_types.h, change to:
typedef CBLAS_ORDER CBLAS_ORDER_t;
typedef CBLAS_TRANSPOSE CBLAS_TRANSPOSE_t;
typedef CBLAS_UPLO CBLAS_UPLO_t;
typedef CBLAS_DIAG CBLAS_DIAG_t;
typedef CBLAS_SIDE CBLAS_SIDE_t;
... the enum keyword has been removed.
12. Add the following Preprocessor definitions
/P - only to check the preprocessed intermediate files
13. To add cdf package:
- add this to beta_inc.c
#include
- exclude from project, usually because these files are included in other files and are not really standalone files:
test_auto.c, beta_inc.c
cdf package needs the following packages:
specfun, cheb
14. Various packages of GSL, such as block and matrix, have some files with the same names such as file.c.
But the way MSVC compiles and builds by putting all *.obj files into the same DEBUG or RELEASE folder causes a problem. A simple way is to rename some of the clashing file names. This does not affect the ability to use the GSL-DLL functions, because functions have different names withing files with same names such as file.c
To quickly identify where duplicate filenames exist, go to Solution Explorer and click on the GSLProj project folder.
Near the top of the Solution Explorer panel, click on the icon to switch to Show All Files, such that all *.c files appear under the Source Files folder under your GSLProj project folder. Then rename any duplicate file names *.c.
Alternative - Right-click, Properties, C++, Output Files. Change the Object File Name from $(IntDir)\ to, say, $(IntDir)\block\. You can repeat for the vector file group, etc.
15. Inline functions.
The following packages are affected: cdf
MSVC++ accepts both inline and _inline BUT when the code is *.c and compiled with MSVC, then it only recognize _inline.
Error Messages are like:
Error 1 error C2054: expected '(' to follow 'inline' ...\specfunc\cheb_eval_mode.c
Error 2 error C2085: 'cheb_eval_mode_e' : not in formal parameter list ...\specfunc\cheb_eval_mode.c
Error 3 error C2143: syntax error : missing ';' before '{' ...\specfunc\cheb_eval_mode.c 6
Solution:
In specfun/cheb_eval_mode.c, airy.c , gamma.c, bessel.c, bessel_olver, bessel_zero, coupling.c, ellint.c
erfc.c, legendre_con, trig.c, zeta.c
change from inline to _inline
16. Notes on cdf and specfun packages.
- see 15. for "inline" issue
- Files to be renamed from *.c to *_cdf.c are:
cdf/beta.c to avoid clash with specfun/beta.c
- files to be excluded from compile:
cdf/beta_inc.c
17. Add randist package - needed by cdf
- inline keyword modified, see note 15; for files:
binomial_tpe.c, discrete.c, shuffle.c
- Files to be renamed from *.c to *_randist.c are:
beta.c, binomial.c, cauchy.c, chisq.c, exponential.c, exppow.c, fdist.c, flat.c, gamma.c,
gauss.c, geometric.c, hyperg.c, laplace.c, logistic.c, lognormal.c, nbinomial.c, pareto.c, pascal.c, poisson.c, rayleigh.c, rdist.c, weibull.c
18. Add rng package - needed by randist
- inline keyword modified, see note 15; for files:
... almost all files ...
- Files to be renamed from *.c to *_rng.c are:
file.c
19. Add complex package - needed by specfun
- Files to be renamed from *.c to *_complex.c are:
inline.c
20. Add eigen package - needed by specfun
- inline keyword modified, see note 15; for files:
gen.c, francis.c, qrstep.c, jacobi.c,
- Remove //#include
and replace by #include
in these files: francis.c, nonsymmv.c
- exclude from project:
qrstep.c
21. Add linalg package - needed by
- inline keyword modified, see note 15; for files:
apply_givens.c, cholesky.c, givens.c, exponential.c
- exclude from project:
apply_givens.c, givens.c, svdstep.c
22. Add permutation package - needed by linalg
- inline keyword modified, see note 15; for files:
- Files to be renamed from *.c to *_permutation.c are:
file.c, init.c, inline.c,
- exclude from project:
permute_source.c
Add integration package - needed by randist
- inline keyword modified, see note 15; for files:
append.c, initialise.c, positivity.c, set_initial.c, qpsrt.c, util.c, reset.c, qelg.c,
- Files to be renamed from *.c to *_integration .c are:
- exclude from project:
append.c, cquad_const.c, err.c, initialise.c, positivity.c, ptsort.c, qpsrt.c, util.c, reset.c
qelg.c, qc25c.c, qc25f.c, qc25s.c, qpsrt2.c, set_initial.c,
NOTE: if some *.c files which are included by other *.c files are NOT excluded from compile, then errors like these occur:
Error 1 error C2143: syntax error : missing ')' before '*'
Error 2 error C2143: syntax error : missing '{' before '*'
Error 3 error C2059: syntax error : 'type'
Error 4 error C2059: syntax error : ')'
Add sort package - needed by eigen
- inline keyword modified, see note 15; for files:
sort.c, sortind.c, sortvec_source.c, sortvecind_source.c,
- Files to be renamed from *.c to *_sort.c are:
- exclude from project:
sortvec_source.c, sortvecind_source.c, subset_source.c, subsetind_source.c,
test_heapsort.c, test_source.c,
Add min package - for minimization routines
- Add static to these functions:
min/test.c::my_error_handler()
Add roots package
- inline keyword modified, see note 15; for files:
- Files to be renamed from *.c to *_roots.c are:
test.c, test_funcs.c
- exclude from project:
Add multimin package
- inline keyword modified, see note 15; for files:
simplex2.c
- Files to be renamed from *.c to *_multimin.c are:
test.c, test_funcs.c
- exclude from project:
directional_minimize.c, linear_minimize.c, linear_wrapper.c,
Add poly package - needed by multimin
- inline keyword modified, see note 15; for files:
- Files to be renamed from *.c to *_multimin.c are:
test.c, eval.c, deriv.c,
- exclude from project:
companion.c, balance.c, qr.c,
Add multiroots package
- inline keyword modified, see note 15; for files:
- Files to be renamed from *.c to *_multiroots.c are:
convergence.c, fdfsolver.c, fsolver, newton.c, test_funcs.c, test.c
- exclude from project:
enorm.c, dogleg.c
23. To make use of GSL's own test, do the following to the selected GSL packages as needed:
cdf, specfunc, rng, randist, min, roots, multimin, poly,
- eg. in cdf/test.c (which has been renamed to test_cdf.c), rename the function
main to main_cdf.c
- ensure say, cdf/test.c is now included in the project and compile.
- for the test functions, say: void main_cdf(void)
put its prototype function in your own driver program using extern, like:
extern "C" { void main_cdf(void); }
- in the main functions, say main_cdf(), at the last line of the function, change this:
exit(gsl_test_summary());
to this, to return the EXIT_SUCCESS or EXIT_FAILURE code
return gsl_test_summary();
- in the main functions, say main_sf(), if there are arguments that are not used like this:
int main_sf(int argc, char * argv[])
to the following
int main_sf(void)
- in cdf package ONLY: in file test_cdf.c, change the line from:
void test_gamma (void)
to rename it to:
void test_gamma_cdf (void)
and in the same file, change the call to the test_gamma function from:
test_gamma();
to the new name :
test_gamma_cdf();
This is done to prevent clash with a function of the same name test_gamma() in specfunc.
- in randist package only, change the following functions by adding the keyword "static",
so that other files to not uses these functions. The functions made "static" are:
test_beta, test_binomial_pdf, test_chisq, test_exponential, test_fdist, test_gamma,
test_ugaussian, test_geometric_pdf, test_hypergeometric2_pdf, test_negative_binomial_pdf,
test_pascal_pdf, test_poisson_pdf
- in roots package only, change the following functions by adding the keyword "static",
so that other files to not uses these functions. The functions / variables made "static" are:
test_roots.c: EPSREL, EPSABS, MAX_ITERATIONS, test_f, test_f_e, my_error_handler,
test_funcs_roots.c: create_function, func1, func2, func3, func4
- in multimin package only, change the following functions by adding the keyword "static",
so that other files to not uses these functions. The functions / variables made "static" are:
test_fdf, test_f,
- in multiroots package only, change the following functions by adding the keyword "static",
so that other files to not uses these functions. The functions / variables made "static" are:
test_multiroots.c: test_fdf, test_f,
test_funcs_multiroots.c: rosenbrock, rosenbrock_initpt, rosenbrock_f, rosenbrock_df, rosenbrock_fdf,
wood, wood_initpt, wood_f, wood_df, wood_fdf,
roth, roth_initpt, roth_f, roth_df, roth_fdf,
- Strange reason, the two functions gsl_cdf_logistic_Q and gsl_cdf_logistic_P are not visible to the test program and cannot be compiled. Typical error messages are:
Error 1 error LNK2001: unresolved external symbol gsl_cdf_logistic_Q test_cdf.obj vcpp_gsl
Error 1 error LNK2019: unresolved external symbol gsl_cdf_logistic_Q test_cdf.obj vcpp_gsl
to solve this problem, go to the file cdf/logistic.c and copy the two functions of
gsl_cdf_logistic_Q and gsl_cdf_logistic_P
and paste it to cdf/test_auto.c and place it above the line:
void test_auto_logistic (void)
ALTERNATIVE: Better solution is to check no two source files has the same name. This is already described in point 15. When two files have same name, one of them is not compiled and so its functions cannot be found.
- other files where functions are already identified somewhere else in test*.c. The solution is to add the static keyword to these functions:
test_integration.c: my_error_handler
test_linalg.c: my_error_handler
Debugging:
Modified test_roots.c: void test_f, test\results.c: void gsl_test()
Completed [12017/12017]
GSL cdf test result is 0
end of gsl cdf test
Completed [14995/14995]
GSL specfunc test result is 0
end of gsl specfunc test
-10, 1072693247, 0, 0
FAIL: results.c::gsl_test:: [15003]incorrect precision (%g obs vs %g expected)
-16, 1072693247, -350469331, 1058682594
FAIL: results.c::gsl_test:: [15005]incorrect precision (%g obs vs %g expected)
2142418408, 1061077358, 0, 0
FAIL: results.c::gsl_test:: [15007]incorrect precision (%g obs vs %g expected)
-13, 1072693247, -350469331, 1058682594
FAIL: results.c::gsl_test:: [15020]incorrect precision (%g obs vs %g expected)
2142401953, 1061077358, 0, 0
FAIL: results.c::gsl_test:: [15022]incorrect precision (%g obs vs %g expected)
-10, 1072693247, 0, 0
FAIL: results.c::gsl_test:: [15034]incorrect precision (%g obs vs %g expected)
-13, 1072693247, -350469331, 1058682594
FAIL: results.c::gsl_test:: [15036]incorrect precision (%g obs vs %g expected)
2142401953, 1061077358, 0, 0
FAIL: results.c::gsl_test:: [15038]incorrect precision (%g obs vs %g expected)
FAIL: results.c::gsl_test:: [15064]%s, %s (%g obs vs %g expected)
FAIL: results.c::gsl_test:: [15065]exceeded maximum number of iterations
FAIL: results.c::gsl_test:: [15066]incorrect precision (%g obs vs %g expected)
FAIL: results.c::gsl_test:: [15068]incorrect precision (%g obs vs %g expected)
FAIL: results.c::gsl_test:: [15070]incorrect precision (%g obs vs %g expected)
FAIL: results.c::gsl_test:: [15072]%s, %s
GSL roots test result is 1
end of gsl roots test
GSL Examples
================
http://apwillis.staff.shef.ac.uk/aco/freesoftware.html - passing function as argument
http://www.helsinki.fi/~fyl_tlpk/luento/ohj-13-GSL-e.html - passing function as argument
Fortran GSL
http://www.lrz.de/services/software/mathematik/gsl/fortran/index.html
http://uncwddas.googlecode.com/svn/trunk/other/gsl-1.8/gsl.vc/gsl.vc8.readme.txt
GSL Considerations
===================
32-64 bit
cblas replace with blas - can used ATLAS (C) at least
Build GSL with MinGW
========================
MSVC and MinGW Dlls - shows how to build Dll using MinGW that can be used by MSVC
http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs
GSL can be build using MinGW with the following commands:
configure
OR to just make a dynamic library without static lib;
./configure --enable-static=no
then
make
In general, to specify on conditions and macro definitions:
env CPPFLAGS="-DGSL_DLL" ./configure --enable-static=no
./configure --enable-static=no CPPFLAGS="-DGSL_DLL"
Don't need to add GSL_DLL definition - this is just an exmaple.
The result is are the following files:
in [gsl]\cblas\.libs: libgslcblas.dll.a, libgslcblas.a, libgslcblas-0.dll, libgslcblas.la, libgslcblas.lai
in [gsl]\libs: libgsl.dll.a, libgsl.a, libgsl-0.dll, libgsl.la, libgsl.lai
If there are errors during MAKE, like these:
infnan.c:98:3: error: #error "cannot define gsl_finite without HAVE_DECL_FINITE or HAVE_IEEE_COMPARISONS"
infnan.c:115:3: error: #error "cannot define gsl_isnan without HAVE_DECL_ISNAN or HAVE_IEEE_COMPARISONS"
to solve this, go into [gsl]\config.h and remove the UNDEF lines and add DEFINE lines like:
//#undef HAVE_DECL_ISFINITE
#define HAVE_DECL_ISFINITE 1
//#undef HAVE_DECL_ISNAN
#define HAVE_DECL_ISNAN 1
To make GSL compatible with MSVC(Microsoft Visual C), then edit gsl_types.h file, to ensure that the following line is defined:
Run-Time Check Failure #0 - The value of ESP was not properly saved
across a function call. This is usually a result of calling a function
declared with one calling convention with a function pointer declared
with a different calling convention.
The message above about calling convention is misleading. The gsl dll may be in the right calling convention already. The caller to the functions in gsl need to specify explicitly
__cdel(dllimport)
on the prototype for the function they need to call.
Running MSVC with minGW-built-GSL
===================================
First, built the GSL using MinGW as described in "Build GSL with MinGW" section.
Then,
To LINK with MSVC, use the *.dll.a, but rename them to *.lib
To RUN with MSVS, put the *-0.dll files into the runtime path.
Error Message when running
"Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention."
..... need to check calling conventions.
Aside: To convert MSVC *.lib into *.a for GNU/GCC in MinGW, use the tool called "reimp".
GSL Makefile
=============
some key definitions of the Makefile is below.
$(SHELL) $(top_builddir)/libtool
libgsl.la: $(libgsl_la_OBJECTS) $(libgsl_la_DEPENDENCIES)
$(libgsl_la_LINK) -rpath $(libdir) $(libgsl_la_OBJECTS) $(libgsl_la_LIBADD) $(LIBS)
92:
libgsl_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libgsl_la_LDFLAGS) $(LDFLAGS) -o $@
294:
libdir = ${exec_prefix}/lib
343:
libgsl_la_LIBADD = $(SUBLIBS) $(am__append_1)
233:
LIBS = -lm
234:
LIBTOOL = $(SHELL) $(top_builddir)/libtool
112:
CCLD = $(CC)
184:
CFLAGS = -g -O2
344:
libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION) $(am__append_2)
90:
am_libgsl_la_OBJECTS = version.lo
libgsl_la_OBJECTS = $(am_libgsl_la_OBJECTS)
88:
libgsl_la_DEPENDENCIES = $(SUBLIBS) $(am__append_1)
43:
am__append_1 = cblas/libgslcblas.la
44:
am__append_2 = -no-undefined
315:
SUBLIBS = block/libgslblock.la blas/libgslblas.la \
bspline/libgslbspline.la complex/libgslcomplex.la \
cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la \
deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la \
fft/libgslfft.la fit/libgslfit.la histogram/libgslhistogram.la \
ieee-utils/libgslieeeutils.la integration/libgslintegration.la \
interpolation/libgslinterpolation.la linalg/libgsllinalg.la \
matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la \
multifit/libgslmultifit.la multimin/libgslmultimin.la \
multiroots/libgslmultiroots.la ntuple/libgslntuple.la \
ode-initval/libgslodeiv.la ode-initval2/libgslodeiv2.la \
permutation/libgslpermutation.la \
combination/libgslcombination.la multiset/libgslmultiset.la \
poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la \
rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la \
sort/libgslsort.la specfunc/libgslspecfunc.la \
statistics/libgslstatistics.la sum/libgslsum.la \
sys/libgslsys.la test/libgsltest.la utils/libutils.la \
vector/libgslvector.la cdf/libgslcdf.la \
wavelet/libgslwavelet.la
Sample of actual output in Make:
libtool: link: ln .libs/libgsl.lax/libgslcdf.a/fdist.o .libs/libgsl.lax/lt72-fdist.o || cp .libs/libgsl.lax/libgslcdf.a/fdist.o .libs/libgsl.lax/lt72-fdist.o
libtool: link: ln .libs/libgsl.lax/libgslcdf.a/flat.o .libs/libgsl.lax/lt73-flat.o || cp .libs/libgsl.lax/libgslcdf.a/flat.o .libs/libgsl.lax/lt73-flat.o
libtool: link: ln .libs/libgsl.lax/libgslcdf.a/gamma.o .libs/libgsl.lax/lt74-gamma.o || cp .libs/libgsl.lax/libgslcdf.a/gamma.o .libs/libgsl.lax/lt74-gamma.o
libtool: link: ln .libs/libgsl.lax/libgslcdf.a/gauss.o .libs/libgsl.lax/lt75-gauss.o || cp .libs/libgsl.lax/libgslcdf.a/gauss.o .libs/libgsl.lax/lt75-gauss.o
libtool: link: ln .libs/libgsl.lax/libgslcdf.a/geometric.o .libs/libgsl.lax/lt76-geometric.o || cp .libs/libgsl.lax/libgslcdf.a/geometric.o .libs/libgsl.lax/lt76-geometric.o
libtool: link: ln .libs/libgsl.lax/libgslcdf.a/laplace.o .libs/libgsl.lax/lt77-laplace.o || cp .libs/libgsl.lax/libgslcdf.a/laplace.o .libs/libgsl.lax/lt77-laplace.o
libtool: link: ln .libs/libgsl.lax/libgslcdf.a/logistic.o .libs/libgsl.lax/lt78-logistic.o || cp .libs/libgsl.lax/libgslcdf.a/logistic.o .libs/libgsl.lax/lt78-logistic.o
General C define macros and typedef
=====================================
#define [dummy] [real text]
eg.
# define __BEGIN_DECLS extern "C" {
this means whenever the "__BEGIN_DECLS" is used in the code, the pre-processor will replace it with:
extern "C" {
typedef [type] [alias]
eg.
/* type declaration */typedef struct { int number; char *text;} LINE;
/* Variable declaration */LINE buffer[MAXLINES];Note the actual type, like the struct above, is declared first, followed by the last word which is the alias LINE.
BUT, this is reverse for #define where the actual alias or dummy is the first word, then the rest are the real text.
An alternative way to declare a struct using "tag" is:
/* type declaration */struct templ { int number; char *text;} ;/* Variable declaration */struct templ buffer[MAXLINES];Note that using the tag method for struct, the keyword struct still need to be included in the declaration.
GSL-C-Fortran Framework
=======================
1. Compile the GSL into a library with vcpp_gsl.lib|.bin, see "Building using Visual Studio C/C++"
2. Create a wrapper C++ project, say gslCwrap.
3. Create a header file gslCwrap.h and code file gslCwrap.c
4. In the header file gslCwrap.h
a) prepare to export the wrappers.
extern "C"{
__declspec(dllexport) void cdfGaussP (double x, double *p);
__declspec(dllexport) void fnGamma (double x, double *gamma);
}
b) include reference to GSL header like and call gsl function:
#include "gsl/gsl_cdf.h"
#include "gsl/gsl_sf_gamma.h"
void cdfGaussP (double x, double *p) { *p = gsl_cdf_ugaussian_P(x); }// 2 * x; }
void fnGamma (double x, double *gamma) { *gamma = gsl_sf_gamma(x); }
the actual gsl function names used here are: gsl_cdf_ugaussian_P, gsl_sf_gamma
5. To call from Fortran, prepare a Fortran interface:
interface
SUBROUTINE cdfGauss_P(x, P) BIND(C, NAME='cdfGaussP')
USE, INTRINSIC :: ISO_C_BINDING ! New Fortran 2003 standard
IMPLICIT NONE
REAL(C_DOUBLE), VALUE :: x
REAL(C_DOUBLE) :: P
END SUBROUTINE cdfGauss_P
SUBROUTINE fnGamma(x, dGamma) BIND(C, NAME='fnGamma')
USE, INTRINSIC :: ISO_C_BINDING ! New Fortran 2003 standard
IMPLICIT NONE
REAL(C_DOUBLE), VALUE :: x
REAL(C_DOUBLE) :: dGamma
END SUBROUTINE fnGamma
end interface
6. In the Fortran code, just call the function as specified by the interface.
Eg.
call fnGamma(vecX(ii), answ)
call cdfGauss_P(vecQ(ii), answ)
There are at least 3 projects involved here.
vcpp_gsl - this keeps the gsl code in its own project, so that it is independent of any change in interface or usage.
gslCwrap - this consist of the C wrappers so that it can be used by C code or Fortran code. It also transforms all gsl functions into VOID C functions so that it can be called as Fortran subroutines. Fortran Interface - this is freely linked to the gslCwrap wrapper code. There is no direct reference to the GSL code.
Labels:
Fortran,
GSL,
GSL for windows,
MSVC,
scientific library,
statistical library
Friday, November 25, 2011
Notes Huawei IDEOS U8150
Notes Huawei IDEOS U8150
Upgrading from Android 2.2 to 2.3
http://forums.whirlpool.net.au/archive/1700188
http://forum.xda-developers.com/showthread.php?p=12244110
Upgrading from Android 2.2 to 2.3
http://forums.whirlpool.net.au/archive/1700188
http://forum.xda-developers.com/showthread.php?p=12244110
Monday, August 22, 2011
Notes Puppy Linux
How to Connect to Hidden Wireless Network in Puppy Linux
http://forums.opensuse.org/english/get-technical-help-here/how-faq-forums/unreviewed-how-faq/459097-howto-connect-hidden-ssid-opensuse-11-4-kde-4-6-a.html
Security on Puppy Linux
http://puppylinux.org/wikka/security
Puppy root is woofwoof
Linux sata drivers
http://linuxmafia.com/faq/Hardware/sata.html#via6421
http://forums.opensuse.org/english/get-technical-help-here/how-faq-forums/unreviewed-how-faq/459097-howto-connect-hidden-ssid-opensuse-11-4-kde-4-6-a.html
Security on Puppy Linux
http://puppylinux.org/wikka/security
Puppy root is woofwoof
Linux sata drivers
http://linuxmafia.com/faq/Hardware/sata.html#via6421
Thursday, August 18, 2011
Links to Smartphone Mobile Security Software
This is a collection of links to Smartphone Mobile Security Software
Kaspersky Mobile Security
https://www.kasperskyanz.com.au/kaspersky_mobile_security
Bullguard Mobile Security
http://www.bullguard.com/why/bullguard-mobile-security-10.aspx
F-Secure Mobile Security
http://www.f-secure.com/en/web/home_global/protection/mobile-security/features-benefits
NetQin Mobile Security
http://www.netqin.com/en/antivirus/
Kaspersky Mobile Security
https://www.kasperskyanz.com.au/kaspersky_mobile_security
Bullguard Mobile Security
http://www.bullguard.com/why/bullguard-mobile-security-10.aspx
F-Secure Mobile Security
http://www.f-secure.com/en/web/home_global/protection/mobile-security/features-benefits
NetQin Mobile Security
http://www.netqin.com/en/antivirus/
Subscribe to:
Posts (Atom)
