Wednesday, November 30, 2011

Bessel function and equation properties (links)

Some useful links on Bessel functions, the equation, and their properties.  Later on down the road, I will try to post the properties and discuss the Bessel equation and the Bessel functions for archiving purposes.

For now, here are the links:

http://en.wikipedia.org/wiki/Bessel_function

http://www.efunda.com/math/bessel/bessel.cfm

http://mathworld.wolfram.com/BesselFunction.html

http://mathworld.wolfram.com/BesselDifferentialEquation.html

Integration tables (links)

Some sites that have integration tables (I will manually post them later):

http://integral-table.com/

http://www.sosmath.com/tables/integral/integ1/integ1.html

http://www.mathwords.com/i/integral_table.htm

http://en.wikipedia.org/wiki/Lists_of_integrals

http://www.math.com/tables/integrals/tableof.htm

http://tutorial.math.lamar.edu/Classes/CalcII/IntegralTables.aspx

http://math2.org/math/integrals/tableof.htm

Some helpful links on differential equations (DE)

Here are some links to sites which I find helpful when I need a refresher in differential equations.  Hopefully, one day I can post about some of these things for archival purposes.

Second Order Differential Equations - http://www.sosmath.com/diffeq/second/second.html

DE page - http://www.sosmath.com/diffeq/diffeq.html

^ This http://www.sosmath.com/index.html site is pretty good in general and covers many mathematical topics such as trig, algebra, DE, Calculus, etc.

Second-Order Linear Ordinary Differential Equations - http://www.math.oregonstate.edu/home/programs/undergrad/CalculusQuestStudyGuides/ode/second/so_lin/so_lin.html

Web Study Guide for Ordinary Differential Equations - http://www.math.oregonstate.edu/home/programs/undergrad/CalculusQuestStudyGuides/ode/ode.html

^ Also a good general DE site from Oregon State University.

Differential Equations (Math 3301) - http://tutorial.math.lamar.edu/Classes/DE/DE.aspx

^ Paul's Online Math Notes - a very good math site too - http://tutorial.math.lamar.edu/

Of course MathWorld by Wolfram - http://mathworld.wolfram.com/Second-OrderOrdinaryDifferentialEquation.html


Saturday, November 26, 2011

Editing caption options in LaTeX using the caption package

So I am submitting some of my work to a journal, and the journal has certain stipulations for their format style.  On example is the caption labels had to have subfloat lables left justified instead of the default centered and the caption label needs to be FIGURE 1. instead of Figure 1:

First initialize the caption package in the preamble:

\usepackage{caption}

See the CTAN link for the pdf and more information on the caption package.

http://ctan.org/tex-archive/macros/latex/contrib/caption/

In order to left justify the subfloat label "a)" use the command:

singlelinecheck=false

(I forgot where I found this).

In order to use this per figure, place the following command in the float like:

\captionsetup[subfloat]{singlelinecheck=false}

In order to change the colon to a period use:

labelsep=period

and in order to change to the small caps format use:

labelfont=sc

and within the figure place:

\captionsetup{labelsep=period, labelfont=sc}

You can also place the options in the preamble so that all figures take the changes:

\usepackage[labelsep=period, labelfont=sc]{caption}

Although I don't know how to implement the subfloat changes like this in the preamble.

Here is the code and image examples:


\begin{figure}
\centering
\subfloat[]{\label{fig:fig_10a_axial_velocity_for_alpha_30_at_4_z_loc_w_1_over_1} \includegraphics[scale = 0.8]{fig_10a_axial_velocity_for_alpha_30_at_4_z_loc_w_1_over_1.png}}
\subfloat[]{\label{fig:fig_10b_axial_velocity_for_alpha_45_at_4_z_loc_w_1_over_1} \includegraphics[scale = 0.8]{fig_10b_axial_velocity_for_alpha_45_at_4_z_loc_w_1_over_1.png}}
\caption{Axial velocity distribution shown at several axial positions and divergence angles of (a) $ 30^{\circ} $ and (b) $ 45^{\circ} $.} \label{fig:fig_10_axial_vel}
\end{figure}




\begin{figure}

\centering

\captionsetup[subfloat]{singlelinecheck=false}

\subfloat[]{\label{fig:fig_10a_axial_velocity_for_alpha_30_at_4_z_loc_w_1_over_1} \includegraphics[scale = 0.8]{fig_10a_axial_velocity_for_alpha_30_at_4_z_loc_w_1_over_1.png}}

\subfloat[]{\label{fig:fig_10b_axial_velocity_for_alpha_45_at_4_z_loc_w_1_over_1} \includegraphics[scale = 0.8]{fig_10b_axial_velocity_for_alpha_45_at_4_z_loc_w_1_over_1.png}}

\captionsetup{labelsep=period, labelfont=sc}

\caption{Axial velocity distribution shown at several axial positions and divergence angles of (a) $ 30^{\circ} $ and (b) $ 45^{\circ} $.} \label{fig:fig_10_axial_vel}

\end{figure}


sin(x) + cos(x)


\( \sin x + \cos x \)

Code for Maxima:

f(x) := sin(x) + cos(x)
plot2d(f(x), [x, 0, 7], [y, -2, 2]);


sin(x) - cos(x)


\( \sin x - \cos x \)

Code for Maxima:

f(x) := sin(x) - cos(x)
plot2d(f(x), [x, 0, 7], [y, -2, 2]);


Friday, November 25, 2011

tan(x)


\( \tan x \)

Code for Maxima:

plot2d(tan(x), [x, 0, 7], [y, -2, 2]);


sin(x) + cos(x)


\( \sin x + \cos x \)

Code for Maxima:

plot2d(sin(x)+cos(x), [x, 0, 7]);


Bessel function of the second kind, orders 0, 1, 2



\( Y_0 \left( x \right) \)

Code to plot in wxMaxima:
plot2d(bessel_y (0, x), [x, 0, 20], [y, -2, 1]);


\( Y_1 \left( x \right) \)

Code to plot in wxMaxima:
plot2d(bessel_y (1, x), [x, 0, 20], [y, -2, 1]);


\( Y_2 \left( x \right) \)

Code to plot in wxMaxima:
plot2d(bessel_y (2, x), [x, 0, 20], [y, -2, 1]);


\( Y_0 \left( x \right), \quad Y_1 \left( x \right), \quad Y_2 \left( x \right) \)

Code to plot in wxMaxima:
plot2d([bessel_y (0, x), bessel_y (1, x), bessel_y (2, x)], [x, 0, 20]);



Bessel functions of the first kind, orders 0, 1, 2

Since Lybniz only recognizes the python standard math library, I used wxMaxima to plot the Bessel functions.

\( J_0 \left( x \right) \)

Code to plot in wxMaxima:
plot2d(bessel_j (0, x), [x, 0, 20]);



\( J_1 \left( x \right) \)

Code to plot in wxMaxima:
plot2d(bessel_j (1, x), [x, 0, 20]);


\( J_2 \left( x \right) \)

Code to plot in wxMaxima:
plot2d(bessel_j (1, x), [x, 0, 20]);


\( J_0 \left( x \right), \quad J_1 \left( x \right), \quad J_2 \left( x \right) \)

Code to plot in wxMaxima:
plot2d([bessel_j (0, x), bessel_j (1, x), bessel_j (2, x)], [x, 0, 20]);


Bessel function syntax in Maxima

The commands for Bessel functions in Maxima are:

Bessel function 1st kind: \( J_n \left( x \right) \)
bessel_j (index, expr)

Bessel function 2nd kind: \( Y_n \left( x \right) \)
bessel_y (index, expr)

Modified Bessel function 1st kind: \( I_n \left( x \right) \)
bessel_i (index, expr)

Modified Bessel function 2nd kind: \( K_n \left( x \right) \)
bessel_k (index, expr)

http://maxima.sourceforge.net/docs/manual/en/maxima_15.html

Thursday, November 24, 2011

sinh(x)


\( \sinh x \)


cosh(x)


\( \cosh x \)


x^2*ln(x)

\( x^2 \ln x \)


sin^2(x)*cos^2(x)

I'm going to make some post about some functions for reference.  This one is on the function combo

\( \sin^2 x \; \cos^2 x \)


Lybniz - functions sytax

Here is the website for the Lybniz plotting program.  Apparently it uses the Python programming syntax.

http://lybniz.garage.maemo.org/lybniz.html#functions

Here is the link to the Python math library for the explanation of what the function syntax does.

http://docs.python.org/library/math.html

Increasing the division bar length for a fraction in LaTeX math mode

I couldn't find any specific command to increase the length of the division bar when displaying fractions in LaTeX.  My problem was this

\dfrac{\dfrac{\partial^2 C_1}{\partial R^2}}{\dfrac{\partial C_1}{\partial R}}

\[ \dfrac{\dfrac{\partial^2 C_1}{\partial R^2}}{\dfrac{\partial C_1}{\partial R}} \]

So I just manually added some space around the function like this.  You don't have to do it for the bottom (it doesn't work vice versa with the top if you have the space on the bottom).  I just did because I am somewhat OCD, :P.

\dfrac{\hspace{0.25 cm}\dfrac{\partial^2 C_1}{\partial R^2} \hspace{0.25 cm}}{\hspace{0.25 cm} \dfrac{\partial C_1}{\partial R} \hspace{0.25 cm}}

\[ \dfrac{\hspace{0.25 cm}\dfrac{\partial^2 C_1}{\partial R^2} \hspace{0.25 cm}}{\hspace{0.25 cm} \dfrac{\partial C_1}{\partial R} \hspace{0.25 cm}} \]
\dfrac{\hspace{0.25 cm}\dfrac{\partial^2 C_1}{\partial R^2} \hspace{0.25 cm}}{\dfrac{\partial C_1}{\partial R}}

\[ \dfrac{\hspace{0.25 cm}\dfrac{\partial^2 C_1}{\partial R^2} \hspace{0.25 cm}}{\dfrac{\partial C_1}{\partial R}} \]
\dfrac{\dfrac{\partial^2 C_1}{\partial R^2}}{\hspace{0.25 cm} \dfrac{\partial C_1}{\partial R} \hspace{0.25 cm}}

\[ \dfrac{\dfrac{\partial^2 C_1}{\partial R^2}}{\hspace{0.25 cm} \dfrac{\partial C_1}{\partial R} \hspace{0.25 cm}} \]

Tuesday, November 22, 2011

Table of Trigonometric Identities

A website I frequent when looking for trigonometric identities and properties

Table of Trigonometric Identities

Some of the ones I often use:

\[ \sin^2 \phi + \cos^2 \phi = 1 \]

\[1 + \tan^2 \phi = \sec^2 \phi \]

\[ 1 + \cot^2 \phi = \csc^2 \phi \]

Lybniz vs KAlgebra for graph visualization/plotting

In my work I sometimes need to quickly visualize a simple function, and software like Mathematica and Maxima seem to be a bit of overkill so I decided to try some simple plotting programs in Ubuntu from the SC.

The first, which I have evaluated before, is KAlgebra.  It's not too bad and has an upside in that it can also do calculations.  However, I don't really like the plot style.   This is an example for \( \sin^2 x \cos^2 x \).


So I typed in "graph" or "plot" in the SC and cam across the Lybniz graph plotting software.  It only plots  so it doesn't calculate like KAlgebra can and then show you a graph.  I like how Lybniz looks better than KAlgebra.  It doesn't have many options.  I wish you could thicken the line a bit, but it does let you zoom in better than KAlgebra.  Same example.



Saturday, November 19, 2011

Complement vs Compliment - e Learn English Language

A little English language for this post. As a writer, albeit scientific, I have problems with some things and I try to try to stay on top of them. I will occasionally post about writing better. Of course, don't hold me to the fire because there is a time to be proper and other times when it is ok not to be (conversation such as chatting through a internet messenger, texting, blogs, etc).

This one is on the difference between complement and compliment.

Complement vs Compliment - e Learn English Language

Complement - to match well with something

Compliment - to flatter or praise

Tuesday, November 15, 2011

LaTeX - Formatting - Text size

Here is a quick list of possible font size commands in LaTeX:

https://engineering.purdue.edu/ECN/Support/KB/Docs/LaTeXChangingTheFont
http://en.wikibooks.org/wiki/LaTeX/Formatting#Sizing_text

For selective font sizing use for example: {\Large blah, blah, blah}

\( {\Large \text{Large}} \; \text{normal} \)

\tiny

\( \tiny \text{tiny} \)


\scriptsize

\( \scriptsize \text{scriptsize} \)


\footnotesize

\( \footnotesize \text{footnotesize} \)


\small

\( \small \text{small} \)


\normalsize

\( \normalsize \text{normalsize} \)


\large

\( \large \text{large} \)


\Large

\( \Large \text{Large} \)


\LARGE

\( \LARGE \text{LARGE} \)


\huge

\( \huge \text{huge} \)


\Huge

\( \Huge \text{Huge} \)








LaTeX - align environment and equation numbering including \nonumber

I also posted this in the original, yet older, post on where I introduced the align environment.
http://timothyandrewbarber.blogspot.com/2011/08/align-environment-in-latex.html


In order to have the equation number at the end of a long, multi-line equation use the command \nonumber right before you end the line with the double slashes

\begin{align}
\dfrac{\partial^2 T \left( x, t + \dfrac{\Delta t}{2} \right)}{\partial x^2} = &\dfrac{1}{2} \left[ \dfrac{T \left( x + \Delta x, t + \Delta t \right) - 2 T \left( x, t + \Delta t \right) + T \left( x - \Delta x, t + \Delta t \right)}{\Delta x^2} \right. \nonumber \\ &\left. + \dfrac{T \left( x + \Delta x, t \right) - 2 T \left( x, t \right) + T \left( x - \Delta x, t \right)}{\Delta x^2} \right]  + O \left( \Delta x^2 \right)
\end{align}


In order to center the equation number, surround the array environment with an equation environment

\begin{equation}
\begin{align}
\dfrac{\partial^2 T \left( x, t + \dfrac{\Delta t}{2} \right)}{\partial x^2} = &\dfrac{1}{2} \left[ \dfrac{T \left( x + \Delta x, t + \Delta t \right) - 2 T \left( x, t + \Delta t \right) + T \left( x - \Delta x, t + \Delta t \right)}{\Delta x^2} \right. \\ &\left. + \dfrac{T \left( x + \Delta x, t \right) - 2 T \left( x, t \right) + T \left( x - \Delta x, t \right)}{\Delta x^2} \right]  + O \left( \Delta x^2 \right)
\end{align}
\end{equation}

Monday, November 14, 2011

LaTeX - Math Mode - Delimiter sizes

In order to control bracket sizes by command type

\big(

\( \big( \)

\Big(

\( \Big( \)

\bigg(

\( \bigg( \)

\Bigg(

\( \Bigg( \)

\( \big( \Big( \bigg( \Bigg( \)

LaTeX - Math Mode - Underbrace

To get an underbrace in LaTeX while in the math envrionment the command is

\underbrace{t + \dfrac{\Delta t}{2}}_{t_0}

\( \underbrace{t + \dfrac{\Delta t}{2}}_{t_0} \)

In order to use accents in math mode I have a post here which should help if you want to use accents within the underbrace:  http://timothyandrewbarber.blogspot.com/2011/11/accents-on-letters-in-latex.html

I am not fully certain they (the accents) all show up in the LaTeX java script (MathJax) I am using for this blog to display LaTeX, but they should work in an actual LaTeX editor such as Texmaker and Kile.

For example,

\underbrace{t + \dfrac{\Delta t}{2}}_{\grave{t}_0}

\[ \underbrace{t + \dfrac{\Delta t}{2}}_{\grave{t}_0} \]

\underbrace{t + \dfrac{\Delta t}{2}}_{\acute{t}_0}

\[ \underbrace{t + \dfrac{\Delta t}{2}}_{\acute{t}_0} \]

 \underbrace{t + \dfrac{\Delta t}{2}}_{\text{\`{t}}_0}

\[ \underbrace{t + \dfrac{\Delta t}{2}}_{\text{\`{t}}_0} \]

\underbrace{t + \dfrac{\Delta t}{2}}_{\text{\'{t}}_0}

\[ \underbrace{t + \dfrac{\Delta t}{2}}_{\text{\'{t}}_0} \]

\underbrace{t + \dfrac{\Delta t}{2}}_{\textit{\`{t}}_0}

\[ \underbrace{t + \dfrac{\Delta t}{2}}_{\textit{\`{t}}_0} \]

\underbrace{t + \dfrac{\Delta t}{2}}_{\textit{\'{t}}_0}

\[ \underbrace{t + \dfrac{\Delta t}{2}}_{\textit{\'{t}}_0} \]

Yeah, the \text{} command isn't working in MathJax for some reason.  This is what it should do in an actual LaTeX editor:


Friday, November 11, 2011

Installing Windows 7 in Ubuntu 11.10 using VirtualBox

Alright, so no matter what you do, you will more than likely have to deal with Windows even if you have switched everything over to Ubuntu because, well, many people use Windows.  I needed an install since I have a few older filed I need to work with in Windows.  I mean Windows isn't terrible, I just prefer Ubuntu and all the options it gives me.

Anyways, I chose to go with a VirtualBox installation as I do not prefer multi-boot since I am on;y occasionally going to be using it.  I have messed around a bit with VirtualBox and have installed a Fedora 15 OS and Linux Mint 11 OS.

I began the installation like the others and kept everything default.  However, after I saw the Windows boot screen it never went to the installation screen but instead gave me a black screen with the "Windows failed to start" error message.


I googled "installing windows 7 on virtualbox get an error windows failed to start" and found this helpful site which solved the problem.  http://web.ics.purdue.edu/~zhug/error-0xc0000225-when-installing-windows-on-virtualbox/

The issue is with

The cause of this problem is the APIC (Advanced Programmable Interrupt Controller), on which Windows depends. You must enable this feature in the virtual machine settings. 
Right click on the virtual machine in VirtualBox console window.

Select "Settings..." Click "System" tab on the left and check "Enable IO APIC" item.

YouTube video for installing Windows 7 on VirtualBox.  Sorry haven't watched it, but I assume it is good.  http://www.youtube.com/watch?v=HoSebbqBQQo



A couple of sites on the installation of Windows 7 in VirtualBox.



LaTeX package xfrac and command \sfrac

In order to use the \sfrac command in math mode to produce a slanted fraction, the package xfrac must be used.

Wednesday, November 9, 2011

Accents on letters in LaTeX (including math mode)


I have listed some letter accents that I use in LaTeX.  The first is normal text representation and the second is in math mode.

Grave accent:
\`{o}
\grave{o}
\( \grave{o} \)

Acute accent:
\'{o}
\acute{o}
\( \acute{o} \)

Circumflex:
\^{o}
\hat{o}
\( \hat{o} \)


One dot over:
\.{o}
\dot{o}
\( \dot{o} \)


Umlaut or dieresis:
\"{o}
\ddot{o}
\( \ddot{o} \)

Tilde:
\~{o}
\tilde{o}
\( \tilde{o} \)

Cedilla:
\c{c}
\text{\c{c}}
\( \text{\c{c}} \)

Breve:
\u{o}
\breve{o}
\( \breve{o} \)


Ring on top:
\r{A}
\text{\r{A}}
\( \text{\r{A}} \)


There are a few others that I have not listed here.  This is the Wikibooks link again with the rest.
LaTeX/Accents - http://en.wikibooks.org/wiki/LaTeX/Accents


Tuesday, November 8, 2011

The GNU Project and the GNU Operating System

http://www.gnu.org/gnu/thegnuproject.html

Some information for the website.
by Richard Stallman 
the original version was published in the book “Open Sources” 
The first software-sharing community - When I started working at the MIT Artificial Intelligence Lab in 1971, I became part of a software-sharing community that had existed for many years. Sharing of software was not limited to our particular community; it is as old as computers, just as sharing of recipes is as old as cooking. But we did it more than most. 
The AI Lab used a timesharing operating system called ITS (the Incompatible Timesharing System) that the lab's staff hackers (1) had designed and written in assembler language for the Digital PDP-10, one of the large computers of the era. As a member of this community, an AI Lab staff system hacker, my job was to improve this system. 
We did not call our software “free software”, because that term did not yet exist; but that is what it was. Whenever people from another university or a company wanted to port and use a program, we gladly let them. If you saw someone using an unfamiliar and interesting program, you could always ask to see the source code, so that you could read it, change it, or cannibalize parts of it to make a new program. 
(1) The use of “hacker” to mean “security breaker” is a confusion on the part of the mass media. We hackers refuse to recognize that meaning, and continue using the word to mean someone who loves to program, someone who enjoys playful cleverness, or the combination of the two. See my article, On Hacking. 
GNU software and the GNU system - Developing a whole system is a very large project. To bring it into reach, I decided to adapt and use existing pieces of free software wherever that was possible. For example, I decided at the very beginning to use TeX as the principal text formatter; a few years later, I decided to use the X Window System rather than writing another window system for GNU. Because of this decision, the GNU system is not the same as the collection of all GNU software. The GNU system includes programs that are not GNU software, programs that were developed by other people and projects for their own purposes, but which we can use because they are free software. 
GNU Emacs - I began work on GNU Emacs in September 1984, and in early 1985 it was beginning to be usable. This enabled me to begin using Unix systems to do editing; having no interest in learning to use vi or ed, I had done my editing on other kinds of machines until then. At this point, people began wanting to use GNU Emacs, which raised the question of how to distribute it. Of course, I put it on the anonymous ftp server on the MIT computer that I used. (This computer, prep.ai.mit.edu, thus became the principal GNU ftp distribution site; when it was decommissioned a few years later, we transferred the name to our new ftp server.) But at that time, many of the interested people were not on the Internet and could not get a copy by ftp. So the question was, what would I say to them? I could have said, “Find a friend who is on the net and who will make a copy for you.” Or I could have done what I did with the original PDP-10 Emacs: tell them, “Mail me a tape and a SASE, and I will mail it back with Emacs on it.” But I had no job, and I was looking for ways to make money from free software. So I announced that I would mail a tape to whoever wanted one, for a fee of $150. In this way, I started a free software distribution business, the precursor of the companies that today distribute entire Linux-based GNU systems. 
The GNU Hurd - By 1990, the GNU system was almost complete; the only major missing component was the kernel. We had decided to implement our kernel as a collection of server processes running on top of Mach. Mach is a microkernel developed at Carnegie Mellon University and then at the University of Utah; the GNU Hurd is a collection of servers (i.e., a herd of GNUs) that run on top of Mach, and do the various jobs of the Unix kernel. The start of development was delayed as we waited for Mach to be released as free software, as had been promised. One reason for choosing this design was to avoid what seemed to be the hardest part of the job: debugging a kernel program without a source-level debugger to do it with. This part of the job had been done already, in Mach, and we expected to debug the Hurd servers as user programs, with GDB. But it took a long time to make that possible, and the multithreaded servers that send messages to each other have turned out to be very hard to debug. Making the Hurd work solidly has stretched on for many years. 
Linux and GNU/Linux - The GNU Hurd is not suitable for production use, and we don't know if it ever will be. The capability-based design has problems that result directly from the flexibility of the design, and it is not clear solutions exist. Fortunately, another kernel is available. In 1991, Linus Torvalds developed a Unix-compatible kernel and called it Linux. In 1992, he made Linux free software; combining Linux with the not-quite-complete GNU system resulted in a complete free operating system. (Combining them was a substantial job in itself, of course.) It is due to Linux that we can actually run a version of the GNU system today. We call this system version GNU/Linux, to express its composition as a combination of the GNU system with Linux as the kernel.

Some general information and links on C/C++, Fortran, and Java and an IDE or editor-compiler combination

While exploring new computer programming languages (as of right now I am fairly good with MATLAB/Octave m-file programming;  I did take a class on C programming back in college, but I have rarely used it so I pretty much know nothing about other languages;  I feel it is important to try to learn as many as possible because this will help with my general understanding of computer programming and it will be a great marketing tool for job searches), I have come across some interesting and helpful links which include forum discussions and other websites.  For this post I am going to put up some links I have found while searching topics such as: best IDE in Ubuntu 11.10, best IDE in linux or Ubuntu 11.11 for C/C++, Fortran, and/or Java, Eclipse IDE, etc.  This post is going to strictly deal with C/C++ and IDEs.

There seem to be many options for a computer language editor and compiler for Ubuntu.  The first is using a text editor such as gedit, jEdit, or the many others available in Ubuntu to write the program, then compile the program in the terminal using GCC.  The second route is to use an all in one package to write and compile usually called an IDE.  As of now I am trying out Geany.  Many others include Eclipse, Emacs, Vi, Code::Blocks, Code Lite, Anjuta, etc.  There is also the option to download and install the non-commercial Intel compilers.

Here is a link from the Ubuntu Community site on how to install and a little about GCC.  https://help.ubuntu.com/community/InstallingCompilers

Link and information on GCC, the GNU Compiler Collection.  http://gcc.gnu.org/

The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, Ada, and Go, as well as libraries for these languages (libstdc++, libgcj,...). GCC was originally written as the compiler for the GNU operating system. The GNU system was developed to be 100% free software, free in the sense that it respects the user's freedom. 
We strive to provide regular, high quality releases, which we want to work well on a variety of native and cross targets (including GNU/Linux), and encourage everyone to contribute changes or help testing GCC. Our sources are readily and freely available via SVN and weekly snapshots. 
Major decisions about GCC are made by the steering committee, guided by the mission statement.

GCC has support for

http://gcc.gnu.org/c99status.html

C++ http://gcc.gnu.org/projects/cxx0x.html

Fortran http://gcc.gnu.org/fortran/

Java http://gcc.gnu.org/java/

and a few others.

Here is an Ubuntu Forum thread over a C/C++ IDE for commercial use.  Even though they mention commercial, there is still some interesting discussions on Eclipse and a few other IDEs.  http://ubuntuforums.org/showthread.php?t=172849

Some links on how to run and compile a C/C++ code on Ubuntu

http://blog.sudobits.com/2011/05/08/how-to-compile-and-run-c-c-plus-plus-program-on-ubuntu-11-04/

http://www.wikihow.com/Compile-a-C/C%2B%2B-Program-in-Ubuntu

http://www.ubuntugeek.com/how-to-install-c-and-c-compilers-in-ubuntu-and-testing-your-first-c-and-c-program.html

Another Ubuntu Forum thread on C/C++ editor and compiler.  http://ubuntuforums.org/showthread.php?t=1724796

Another Ubuntu Forum discussion on editors and compilers.

http://ubuntuforums.org/showthread.php?t=1580148

Ubuntu Forum thread where I found out about Sun Studio, now Oracle Solaris Studio, and KDevelop.  http://ubuntuforums.org/showthread.php?t=463955

Oracle Solaris Studio http://www.oracle.com/technetwork/server-storage/solarisstudio/overview/index.html

Oracle Solaris Studio, formerly Sun Studio, is a free comprehensive C, C++, and Fortran tool suite for both Oracle Solaris and Linux operating systems that accelerates the development of scalable, secure, and reliable enterprise applications.
KDevelop http://kdevelop.org/

is a free, open source IDE (Integrated Development Environment) for MS Windows, Mac OS X, Linux, Solaris and FreeBSD. It is a feature-full, plugin extensible IDE for C/C++ and other programming languages. It is based on KDevPlatform, and the KDE and Qt libraries and is under development since 1998.

Discussion from Stackflow on Fortran and IDEs.  http://stackoverflow.com/questions/3473854/best-fortran-ide

An interesting discussion on KDev and g77 for a Fortran compiler and IDE.  http://ubuntuforums.org/showthread.php?t=1094563

Some comments from the above thread link.
KDevelop and Visual Studios are IDE's, they give you a nice coding environment they have backend compilers that actually do the compiling...not the IDE itself 
Kdevelop is just somekind of glueprogram, that has en texteditor, and this program calls/executes the compiler. This is called an ide "integrated dev. environment" Normally it contains funky features like, syntax highlighting, api lookup... You can write your sourcecode in whatever editor you want. And then compile it by hand, by typing Code: gcc yourfile.cpp In a terminal. Makefiles are just a program that simply executes a series of compilations, while checking for dependencies in your program. All compilers as I know them, are commandline tools. The gnu compiler for assembler sourcefiles is called g77.

Intersting discussion on Fortran IDEs and compilers.  http://mandrivausers.org/index.php?/topic/15152-what-ide-is-best-for-fortran/

http://www.linuxquestions.org/questions/linux-newbie-8/how-to-build-a-fortran-project-in-kdevelop-876096/

http://www.linuxquestions.org/questions/linux-software-2/intel-fortran-compiler-under-kdevelop-240242/

Ubuntu Forum FAQ's on programming and such.  http://ubuntuforums.org/showthread.php?t=1006666

Ubuntu Forum on programming guides, has the above FAQ's thread and many more useful tools and information.  http://ubuntuforums.org/showthread.php?t=1766253

I will try to update this post or add others on programming and such...to be continued...in progress...

Oracle Solaris Studio


Oracle Solaris Studio http://www.oracle.com/technetwork/server-storage/solarisstudio/overview/index.html

Oracle Solaris Studio, formerly Sun Studio, is a free comprehensive C, C++, and Fortran tool suite for both Oracle Solaris and Linux operating systems that accelerates the development of scalable, secure, and reliable enterprise applications.

GNU Compiler Collection (GCC)


Here is a link from the Ubuntu Community site on how to install and a little about GCC.  https://help.ubuntu.com/community/InstallingCompilers

Link and information on GCC, the GNU Compiler Collection.  http://gcc.gnu.org/

The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, Ada, and Go, as well as libraries for these languages (libstdc++, libgcj,...). GCC was originally written as the compiler for the GNU operating system. The GNU system was developed to be 100% free software, free in the sense that it respects the user's freedom. 
We strive to provide regular, high quality releases, which we want to work well on a variety of native and cross targets (including GNU/Linux), and encourage everyone to contribute changes or help testing GCC. Our sources are readily and freely available via SVN and weekly snapshots. 
Major decisions about GCC are made by the steering committee, guided by the mission statement.

GCC has support for

http://gcc.gnu.org/c99status.html

C++ http://gcc.gnu.org/projects/cxx0x.html

Fortran http://gcc.gnu.org/fortran/

Java http://gcc.gnu.org/java/

and a few others.

Monday, November 7, 2011

Some LaTeX Math Relation symbols

I have listed the most common mathematical relation signs that I use in LaTeX. Less than:
 <
\( < \)

Greater than:
 >
\( > \)

Less than equal to:
 \leq
\( \leq \)

Greater than equal to:
 \geq
\( \geq \)

Much less than:
 \ll
\( \ll \)

Much greater than:
 \gg
\( \gg \)

Similar equal to:
 \simeq
\( \simeq \)

Similar to:
 \sim
\( \sim \)

Approximate to:
 \approx
\( \approx \)

Equivalent to:
 \equiv
\( \equiv \)

Proportional to:
 \propto
\( \propto \)

Not equal to:
 \neq
\( \neq \)

Geany Computer Language Programming Editor and Compiler

Ok, so after doing some research and running NetBeans, I have decide to go with the Geany program which can be installed in Ubuntu through the Software Center.  NetBeans looks nice and it seems like it would run and compile many languages (Java, C, C++, Fortran, etc.), one of my requirements for a good IDE, but it added some extra stuff when I began my Java code.  It is probably nothing major and NetBeans seems to have very good online documentation, but I wanted something lighter, something that would allow me to start from a clean slate because at the moment all I need to do is copy the code and run it.  Plus, Geany seems to support many languages as well.  I'll let you know how it goes.

http://www.geany.org/

Geany is a text editor using the GTK2 toolkit with basic features of an integrated development environment. It was developed to provide a small and fast IDE, which has only a few dependencies from other packages. It supports many filetypes and has some nice features. For more details see About. Latest version is: 0.21 
Geany is a small and lightweight Integrated Development Environment. It was developed to provide a small and fast IDE, which has only a few dependencies from other packages. Another goal was to be as independent as possible from a special Desktop Environment like KDE or GNOME - Geany only requires the GTK2 runtime libraries. Some basic features of Geany: 
- Syntax highlighting 
- Code folding 
- Symbol name auto-completion 
- Construct completion/snippets 
- Auto-closing of XML and HTML tags 
- Call tips 
- Many supported filetypes including C, Java, PHP, HTML, Python, Perl, Pascal (full list) 
- Symbol lists 
- Code navigation 
- Build system to compile and execute your code 
- Simple project management 
- Plugin interface (see Plugins) 
Geany is known to run under Linux, FreeBSD, NetBSD, OpenBSD, MacOS X, AIX v5.3, Solaris Express and Windows. More generally, it should run on every platform, which is supported by the GTK libraries. Only the Windows port of Geany is missing some features. 
The code is licensed under the terms of the GNU General Public Licence.

Some reviews (older) on Geany.

http://www.softpedia.com/reviews/linux/Geany--Review-84142.shtml

http://www.makeuseof.com/tag/geany-great-lightweight-code-editor-linux/


Sunday, November 6, 2011

Installing NetBeans IDE 7.0.1 for Ubuntu 11.10

I needed a Java editor and compiler for an assignment, and I found that NetBeans seems to be good for beginners while the Eclipse IDE might be better for more advanced users.

NetBeans website: http://netbeans.org/index.html

The version I am installing is the full version which also allows for C/C++ compiling and several other features.

There are other compilers such as the Gnu C and C+ compiler collection which also can handle Fortran and Java.  However, I am not sure if it has a GUI like NetBeans or if you just have to use a text editor like Gedit or JEdit then use the terminal to compile (yes this is true; you have to use a text editor to write the program, then compile in the terminal).

The Gnu Compiler Collection, GCC - http://gcc.gnu.org/

In order to install NetBeans, I just went to there website and downloaded the latest stable version for Ubuntu Linux which is this file: netbeans-7.0.1-ml-linux.sh


Download here, where you can choose what type of package (full, java only, etc.) you want and for what type of OS: http://netbeans.org/downloads/index.html

Installing was a little tricky, but through Google searches I finally found how it worked for me.

This site instructs you to use the Ubuntu Software Center, but I could not find it in my installation: http://blog.sudobits.com/2011/04/30/how-to-install-netbeans-ide-on-ubuntu-11-04/

That site also offers the alternate installation from the terminal using the commands:

sudo apt-get update
sudo apt-get install netbeans


This did not work for me either.

The NetBeans installation instructions on their website to execute the command "chmod + x ."  However, there is no instruction on what to do next except "run the file" which I couldn't figure out what to do.

http://netbeans.org/community/releases/70/install.html#installation

The Ubuntu Community page instructs users to install from the website or the NetBeans binaries.  The link didn't work and the binary instructions are long and complicated.

https://help.ubuntu.com/community/Netbeans

I finally figured out from this site that I could double-click the .sh file and run it to start the installation process: http://nitesh68.blogspot.com/2011/05/insatlling-netbeans-70-in-ubuntu-1104.html

However, you need to install a JDK (Java Development Kit) first.  I installed open-JDK-6 from the Synaptic Package Manager.  I chose 6 because it seems to be stable(?) rather than 7.

http://blog.sudobits.com/2011/05/28/how-to-install-jdk-on-ubuntu-11-04/

http://netbeans.org/downloads/index.html

Some info on Java and some of its implementations from the Ubuntu Community site:

https://help.ubuntu.com/community/Java

Beginner's Guide to Using an IDE Versus a Text Editor

A great article explaining the differences between a text editor and an IDE (Integrated Development Environment).

Beginner's Guide to Using an IDE Versus a Text Editor

Also some good information on programming, compilers, languages, and IDEs for Ubuntu:

https://help.ubuntu.com/community/PowerUsersProgramming


Tuesday, November 1, 2011

MAC Addresses

Sorry everyone, but I've been extremely busy lately!  I've pick up more tasks at work and hardly have time fpr anything!!  So sorry about some incomplete blog posts, but the blog is always a work in progress.  Come back periodically and visit!!

Anyways, needed to find the MAC of a Windows machine (running Windows 7) at work so we could purchase some software and the licenses.  I though to myself, what the heck is a MAC addresses??  It turns out the MAC address is the physical number of your network card or cards (one wireless, one LAN or bluetooth, etc).  Here is some info I found on the web.

From UIC:  http://www.uic.edu/depts/accc/security/os/macaddr.html#2000
In computer networking, a Media Access Control address, better known as MAC address, is a unique identifier assigned to a network adapter or network interface card (NIC) by the manufacturer for identification. The MAC address can also be called the Ethernet Hardware Address (EHA), hardware address, adapter address or physical address. Your computer may have more than one MAC address. Do you have wireless and an ethernet port? Then you have at least two MAC addresses. Your smart phone probably also has a MAC address -- my iPhone has two; one for wireless and one for bluetooth. MAC addresses are typically 6 groups of two hexadecimal digits (0-9,A,B,C,D,E,F), separated either by colons (:) or hyphens (-). The Wi-Fi Mac address on my iPhone, for example is: 00:1C:B3:09:85:15. The first three numbers, 00:1C:B3, are an Apple manufacturing code; only Apple products will have MAC address starting with those digits. (Settings General About Wi-Fi Address. :) Why do you care about MAC addresses? Generally speaking, you don't. But if you are having trouble with connecting to a network or if your computer has been hacked, then the ACCC's security, networking, operations, or repair folks might need you to tell them what it is to help them troubleshoot your problem. So here is how to tell. Note that you must have TCP/IP installed to be able to query your MAC address.
How to find your MAC address?

For Windows:

Windows NT, 2000, XP, Vista, Windows 7 Start Run (in Windows 7, Start and type in the Search Programs and Files box.) Enter: cmd Enter: ipconfig /all If the output scrolls off your screen, and it will on Vista and Windows 7, use: ipconfig /all | more The Physical Address is your MAC address; it will look like 00-15-E9-2B-99-3C. You will have a physical address for each network connection that you have.
Figure 1. The is the ipconfig output on Windows XP. My XP computer has two network connections -- an ethernet connection, labeled Local Area Connection, and a wireless connection, labeled Wireless Network Connection (the wireless connection isn't currently set up). The actual network adaptors present in your computer are all that XP lists. Vista, on the other hand, lists many additional possible network connections, even if they aren't being used. But the Wireless and Local Area Connection sections are the same.  

For Linux:
Linux Become root, using su. 
Enter: ifconfig -a 
# ifconfig -a eth0 
Link encap:Ethernet HWaddr 00:09:3D:12:33:33 
inet addr:10.248.155.17 Bcast:10.248.255.255 Mask:255.255.0.0 
inet6 addr: fe50::234:3dff:fe12:7d73/64 Scope:Link 
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 
RX packets:3489041718 errors:0 dropped:0 overruns:0 frame:0 
TX packets:3259212142 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000           
RX bytes:2732221481 (2.5 GiB) TX bytes:4065716672 (3.7 GiB) Interrupt:185 
The ethernet devices are called eth0, eth1, and so on The MAC address is in the first line of the output, labeled HWaddr, it is 00:09:3D:12:33:33. (Actually, it's not 00:09:3D:12:33:33, I changed it to protect the innocent.)