Monday, November 26, 2012

Linux Mint 14 with Cinnamon Desktop [Review] | OMG! Ubuntu!

Linux Mint 14 with Cinnamon Desktop [Review] | OMG! Ubuntu!

One opinion of Mint, specifically 14.  So far, I love it.  A great alternative to Ubuntu.  Although, I haven't tried its multi-monitor support

Friday, November 23, 2012

Sage - Download for Linux - Version 5.4.1

Sage - Download for Linux

For those keeping up, ver 5.4.1 has been released.  I have kind of let Maxima and Sage fall to the wayside for now, like I've said before.  For now python and Asymptote are working pretty well for me.  If only I could get the contour plot to work in Asymptote...:(

Tuesday, November 20, 2012

Asymptote Graphics Package - A preliminary 2D plot

Alright, so awhile back, I think this past summer, I was experimenting with Asymptote in order to replace Origin.  Origin is great and probably the best, but I only have access to it through Windows, and I am not a fan at all of Windows and even more Microsoft products especially Office such as Word and PP.  So I am trying to find an alternative to Origin to create high quality publication ready graphs.  I've briefly looked at SciDavis (a free Origin type software), but it is missing a lot of options and just doesn't look as good.  There is also matplotlib for Python, but the images just don't look "right" as well (same can be said for Matlab, Mathematica, Maxima, and Sage plots).  I dunno what it is, but for me they just don't cut it, so far.  Now, Asymptote looks GREAT!  However, it is command line based which may scare some people and there isn't much in the way of help and/or examples like say compared to matplotlib or Matlab which can be quite frustrating, especially if something doesn't work right off the bat and you have to debug and figure it out on your own.  I had a bit of this, but once I got done I was ecstatic!

So for a 2D plot here is my example.  I hope this helps at least one person.  I would like to one day generate many examples if possible.  I will post links later as I forgot where I found some help.

This is preliminary and I will be cleaning it up later.  For the code:


import graph;

size(300, 200, IgnoreAspect);

real L = 2;

real a = 1;

real l = L/a;

real z = 0.5;

real z_ovr_l = z/l;

real sigma = 25;

real kappa = 1/(2*pi*l*sigma);

real u_z(real r) {return 2*pi*z*(cos(pi*(r^2)));}

draw(graph(u_z, 0, 1), "$u_z$");

xaxis("$r$", Bottom, LeftTicks);
yaxis("$u_z$", LeftRight, RightTicks(6,2));


Generates
In order to "run" or compile the Asymptote code, I used the built in terminal, Konsole, in Kile.  I usually have the .asy file saved in a folder called something like Asymptote files.  I then open the .asy file in Kile and click the Konsole button at the bottom.  To run the file type in the terminal (make sure you're in the folder where the file is; it should be already there if you opened the file in Kile):

For an .eps file type: asy -V test or just asy test where test is the name of the file and -V brings the image up in a viewer.

For a .pdf file type: asy -V -f pdf test or asy -f pdf test

More later.

The Linux Mint Blog » Blog Archive » Linux Mint 14 “Nadia” released!

The Linux Mint Blog » Blog Archive » Linux Mint 14 “Nadia” released!

Asymptote, a graphics software « Bubbles Bad; Ripples Good

Asymptote, a graphics software « Bubbles Bad; Ripples Good

A nice, short blog post on Asymptote and also a bit on MetaPost, MetaFont, and PGF/TiKZ.

Monday, November 19, 2012

Sunday, November 18, 2012

Placing LaTeX .sty files in Ubuntu/Mint/Linux

Ok, so since switching to Mint I had to reinstall all software programs including TeX Live.  I forgot that I had installed the latest version TeX Live 2012 in Ubuntu from this post so I just installed from the repositories which is version 2009 (uses the same or similar repositories as Ubuntu) for Mint 13.

I was trying to compile a .tex file in Kile when I received an error stating that the bigints.sty could not be found.  Now there are a few ways to solve this.  One is to install TeX Live 2012 which is what I did before.  Two is to download and install the bigints.sty file from

http://www.tex.ac.uk/CTAN/macros/latex/contrib/bigints/

or

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

and then place it into the directory of the file you are compiling.  This is a per file thing.  if you want to install universally you can either install into the directory (for me at least) /usr/local/share/texmf/ where I found to go onto /usr/local/share/texmf/tex/latex.  It is then suggested to create a folder named after whatever the file name is.  So in this case something like /usr/local/share/texmf/tex/latex/bigints.  However, I could not create a folder in Nautilus probably because I am not logged in as admin.  I tried to open a terminal and did su and typed in my password and went back to Nautilus with no luck.  I didn't feel like looking up the commands to do this in the terminal which would have probably worked fine especially since I saw an alternative I could try.  This alternative is to create the same file structure in your home directory.  This is useful especially if you DON'T have access as an admin.  So I created ~texmf/tex/latex/bigints and placed the .sty file there.  Oh, I also saw where you might have to run texhash which I did through Kile's built in Konsole.  Viola!  It worked!

I also noticed that there is a texmf-texlive file under the share folder so this might be a possibility as well if the other route through just texmf doesn't work.






Found help from the following links:

http://www.volkerschatz.com/tex/tpacks.html
http://tex.stackexchange.com/questions/39771/finding-a-ubuntu-package-for-a-sty-file
http://stackoverflow.com/questions/1911713/add-find-style-files-in-to-latex
http://ubuntuforums.org/showthread.php?t=334047

Wednesday, November 14, 2012

Fallback Mode (Classic Session) To Be Dropped From GNOME 3.8 ~ Web Upd8: Ubuntu / Linux blog

Fallback Mode (Classic Session) To Be Dropped From GNOME 3.8 ~ Web Upd8: Ubuntu / Linux blog

Hmm, not sure what to think here.  I guess this means Ubuntu as well?  Dang, as I am not liking Unity anymore.  It seems to be heavy resource wise.  Plus, I can only get Gnome classic/fallback to get my quad monitors to work without much fuss.  I've installed Mint with Cinnamon DE on my laptop, and I like it pretty well so far.  I think I will use this if Gnome classic goes out the way.  I tried to install the Cinnamon DE in Ubuntu, but I am not sure if it worked as it looks exactly like Gnome classic, which could be good, but I thought it would look more like Mint, I dunno.

Saturday, November 10, 2012

Header/Footer in Latex with Fancyhdr « LaTeX Matters

Again, I apologize for not updating as much and not being able to get to comments :(.  Really busy with school and behind, but I am trying to make an effort to update a bit now!

Header/Footer in Latex with Fancyhdr « LaTeX Matters

Good blog post on a bit about the LaTeX package fancyhdr which controls and gives options for headers and footers.

Some other links:

http://en.wikibooks.org/wiki/LaTeX/Page_Layout

http://latexforhumans.wordpress.com/2009/01/09/fancyhdr/

http://timmurphy.org/2010/08/07/headers-and-footers-in-latex-using-fancyhdr/

As an example, I wanted to place a line at the bottom of the page (or footer) right above the page number for every page, except the title page of course.

Here is some of the "code."


\usepackage{fancyhdr}  % controls headers and footers
\pagestyle{fancy}
% \fancypagestyle{plain}
\fancyhf{} % clear all header and footer fields
% \fancyhead{} % clear all header fields
% \fancyfoot{} % clear all footer fields
\fancyfoot[C]{--\thepage--}
\renewcommand{\headrulewidth}{0pt} % remove lines as well
\renewcommand{\footrulewidth}{0.4pt}



Here is the result.



Thursday, November 8, 2012

Linux Mint Forums • View topic - Fast Playing Youtube Videos.

Linux Mint Forums • View topic - Fast Playing Youtube Videos.

http://forums.linuxmint.com/viewtopic.php?f=48&t=106040&start=0&hilit=youtube

I was having this problem.  Fixed!

System Tools -> Systems Settings -> Sound -> change output from HDMI and video card(???? weird I know) to, in my case, analog sound card and speakers.

Or just click on the sound icon in the lower right and select the appropriate output device.

Monday, October 8, 2012

23 Brand New Features in Ubuntu 12.10 Quantal Quetzal [Screenshots Tour] | Tech Drive-in

23 Brand New Features in Ubuntu 12.10 Quantal Quetzal [Screenshots Tour] | Tech Drive-in

The official release will be out soon.  Having mixed feelings about Ubuntu.  On my desktop I use 4 monitors which doesn't bode well in Ubuntu Unity so I am using Gnome fallback for my setup to work without much setup work (:P).  I am testing Mint 13 on a laptop.  May try it on the desktop if it works ok.  Trying Mint because they have more of a Gnome 2 desktop feel (multi-monitor setup with some ease in mind) with Cinnamon (haven't tried MATE yet which is a Gnome 2 fork).  Mint's also based off Ubuntu releases which helps with transition for me.  I just don't use the Unity features that much, not even on my laptop where I can actually use Untiy without fuss!

Tuesday, October 2, 2012

Linux Mint (or other Linux versions which require a code to set time and date)

I'm trying out Linux Mint 13 Maya with Cinnamon.  I dunno, I guess I am getting kind of tired of Ubuntu?  So we'll see how Mint stacks up.  So far it looks very nice.  I guess I am getting tired of the Unity theme and poor multi-monitor support.  Although, I've first installed Mint on one of my laptops side-by-side with Ubuntu.  Pretty easy installation using a USB stick.

Anyways, I was trying to adjust the time and in the Cinnamon Settings under Calender it requires a "code" of types.  Go here to get the look you want.

http://www.foragoodstrftime.com/




I found that if you go to the Date and Time under System Tools and System Settings you can change the date and time normally.



Tuesday, September 18, 2012

Avoid integer division when programming

I didn't realize I was doing this but noticed I did have a problem for one of my Python scripts.  I was doing 1/2 which is apparently a no-no in programming.  I fixed it by doing 0.5*...  Other ways include 1.0/2 etc.

Commenting in Python

To comment in Python simply use the pound sign, #, in front of what ever it is you would like to comment.  For Spyder users, the shortcut to this in the editor is Crtl+1.


Reserved words in Python


If you've been experimenting with Python, as I have, then you might notice that some words are saved for some certain processes.  For example lambda is one of these words.  I tried to use it as a variable name.  it will usually highlight in blue if it is important.  So an alternative is to use lamb_da or lamb_duh etc.

Other words include:

and, as, assert, break, class, continue, def, del, elif, else, except, False, finally, for, from, global, if, import, in, is, lambda, None, nonlocal, not, or, pass, raise, return, True, try, with, while,and yield.


Langtangen, H. P. (2012). A Primer on Scientific Programming with Python (3rd ed.). Heidelberg: Springer. doi:10.1007/978-3-642-30293-0

Differences between Python (scripting programming) and traditional programming C/C++/Fortran etc. (system programming)

This post is a summary from Langtangen's (2009) book Python Scripting for Computational Science (Chapter 1 Introduction).  Langtangen breaks down the programming languages into scritpting and traditional types.  Langtangen comments that these are quite different in programming style and are usually geared towards different goals.  The traditional programming languages are also known as system programming and are used for building (usually large, monolithic) applications (systems).  These languages include Fortran (77/90/95/2003), C, C++, C#, and Java.  Langtangen refers to scripting as programming at a high and abstraction level.  These languages include Perl, pythin, Ruby, Scheme, and Tcl.




Langtangen, H. P. (2009). Python Scripting for Computational Science (3rd ed.). Berlin: Springer. doi:10.1007/978-3-540-73916-6

Python 2 vs. Python 3

This is a summary from Langtangen's (2012) latest edition of A Primer on Scientific Programming with Python (found in the preface).  Currently, there are two versions of Python generally called Python 2 and Python 3.  You may have a version such as Python 2.7 or 3.2, etc.  Python 3 is an updated Python language which has some different syntax notation from Python 2.  However, some mathematical software for Python has not been ported to use with Python 3.  Langtangen provides one suggestion which is to use the latest 2, 2.7, and then use the translation tool 2to3 to obtain the code for version 3.

Langtangen also suggests to use the latest syntax and modules which will make the differences between 2 and 3 small.  This is the format Langtangen uses for his book.  He lists two distinct differences in the book's programs:

1. a/b implies float division in version 3 if a and b are integers
2. print 'Hello' in version 2 must be converted to a function for 3 such as print('Hello')

Langtangen states that users using version 3 should have any major issues studying the books version 2.7 program codes.



Langtangen, H. P. (2012). A Primer on Scientific Programming with Python (3rd ed.). Heidelberg: Springer. doi:10.1007/978-3-642-30293-0

Friday, July 20, 2012

Highlighting in LaTeX with the soul package - highlighting citations

Ok, after a quick search, I found that if you put an extra set of brackets around the \cite{}, then the highlighting should work!!

 So for example, \hl{{\cite{citation}}}

 It should work for other citation types too, \citeyear, etc.  I haven't tried it, but it probably works for other environments.

http://tex.stackexchange.com/questions/20021/how-to-highlight-paragraph-linebreak-preserving-as-well-as-itemize-tabular-et

Here is a screen shot from me:



Thursday, July 19, 2012

Some common functions in Maxima - trig, logarithms, the exponential, and square root

http://maxima.sourceforge.net/docs/manual/en/maxima_10.html#SEC47

exp(x)
log(x)
sqrt(x)
acos(x)
acosh(x)
acot(x)
acoth(x)
asin(x)
asinh(x)
asec(x)
asech(x)
acsc(x)
acsch(x)
atan(x)
atanh(x)
cos(x)
cosh(x)
cot(x)
coth(x)
sin(x)
sinh(x)
sec(x)
sech(x)
csc(x)
csch(x)
tan(x)
tanh(x)
Maxima does not have a built-in function for the base 10 logarithm or other bases. log10(x) := log(x) / log(10) is a useful definition.

Saturday, July 14, 2012

Maxima/wxMaxima - solving for the roots of a transcendental equation

Ok, so something is wrong with my Python.  I think Spyder is giving me some fits in Ubunt for somereason.  Anyways, luckily I have Maxima and Sage to fall back on.  In order to solve for the roots of a transcendental equation, I provide a following example.

The equation I want to solve is:

\[ \tan \left( \tfrac{1}{2} C d^2 \right) - \tan \left( \tfrac{1}{2} C a^2 \right) = 0 \]

where \( \deta \) is given.  I first plotted it to make sure it did in fact show trends of a root or roots for \( \delta = 0.5\).

delta:0.5;
eqn(x):= tan(0.5*x*(delta^2)) - tan(0.5*x);
plot2d(eqn, [x, 0, 20],[y, -1, 1]);

So, yup, it definitely has roots.  The first root is actually at zero, but this is trivial in my case.  So I am interesting in the second root.  It seems to be around 8.  I choose the interval for the root finder to look on as 7.8 to 8.5.

find_root(tan(0.5*x*(delta^2)) - tan(0.5*x), x, 7.8, 8.5);
8.377580409572781

So the root found is the bold number above!

Kile Issue - Keyboard suddenly does not work

I have run into the keyboard suddenly not working in Kile on occasion.  This is because there is some character length error which automatically enables Read Only Mode.  To fix this simply go to the Tools menu and disable the Read Only Mode (should have a check mark) by selecting it with a click of the mouse.  I went through some headaches with this before figuring out this simple fix from some help at KDE.  I filed a bug report and received responses which pointed to this simple fix.  It's always something stupid or simple, isn't it?

http://askubuntu.com/questions/82727/kile-does-not-get-keyboard-input-respond-to-altf

https://bugs.kde.org/show_bug.cgi?id=292766

gnome classic panel + unity launcher in ubuntu 12.04 precise - YouTube

gnome classic panel + unity launcher in ubuntu 12.04 precise - YouTube

edit: Well so much for that.  Compiz is apparently crashing I can't run the command anymore :(  SO I just moved the Avant bar back to the bottom, not bad, but not Unity either.  Ubuntu really needs to fix these issues including supporting multiple monitors (more than two) with ease if they want to stop the bleeding.  Fortunately, there really isn't a competitor out there (for me at least) that I have found.

Heck yeah!  I'm using GNOME classic (fallback session) because it's the only one that can run my Quad monitors fairly well (Wasn't a huge fan of Kubuntu nor Xubuntu.  I liked them but they seemed to be slow at times and things would crash on me for some reason. I've just always come back to Ubuntu-GNOME classic.)

Anyways, I really liked the Unity launch bar and tried to replace it with Avant, Cairo, and Docky.  Cairo looked nice, but I had issues with windows blocking it and didn't feel like trying to fix it.  Avant worked pretty well but once I filled up the side bar it's scrolling feature sucked.

Finally, found this, duh.  You can launch the Unity 2D shell in GNOME classic!!  The Unity 2D login didn't work for quads either which is why I am not using it if you are wondering.

Run:

sudo apt-get install gnome-session-fallback unity-2d-launcher


if not already installed, then log into GNOME classic, open a terminal, and run:

unity-2d-shell


The thing is I've probably read how you could do this, but I just didn't realize it.  The whole Unity, Unity 2D, GNOME, GNOME classic thing can be quite confusing.

Here is a nice post which goes into quite some detail (scroll down to the comment section as well; the author puts several informative responses there).

http://complete-concrete-concise.com/ubuntu-2/ubuntu-12-04/ubuntu-12-04-how-to-install-the-gnome-desktop

See the thing is this link^^^ says install GNOME desktop which now seems to include the GNOME 3 shell/desktop, the GNOME classic, and the GNOME classic (no effects).  Quite confusing because you can install the GNOME classic with a different command I thought.  It also seems, now that I understand, that GNOME classic simply runs on top of GNOME 3 with the GNOME 2 look alike desktop...?  Whatever, it works so far with me and my quads and I'm happy with the desktop (not Xubuntu, Kubuntu, etc).  I think I'll try to figure this out and break it down in another post some other time.

edit: plus each one runs on different window management systems such as compiz, metacity. etc...sheesh

Zotero Standalone and Zotero Connectors and more on citation/reference software

http://www.zotero.org/

Uh, hello, wow, finally, this is cool!! So, Zotero, my second favorite bibliography manager now has a standalone and a connector version of their software. I really liked Zotero when I first started using it, but found my way over to Menedeley Desktop once it came out. Both are very good alternatives to EndNote or even JabRef, and both have their pros and cons. Anyways, Zotero has released (since when, I don't know) alpha versions of a standalone and connector Zotero citation software. The standalone is what is says, a standalone version of Zotero (like Menedeley is a standalone) which used to require running in the Firefox web browser. The standalone is also cross-platform with downloads for Windows 2000 or later, Mac Intel, OS X 10.5 or later, and Linux 32- and 64-bit versions. I really like this because for some reason I was turned off by having to use Zotero in Firefox. I like Firefox and Zotero and all, but I use Chromium/Chrome more and just like Mendeley better. Actually, it has been awhile since I have used Zotero so I can really say what I liked or did not like. I'll have to review my older post which I will also add an update to.

Anyways, so you might be wondering or ask why am I so excited about having Zotero standalone if I use Mendeley all the time? Well, to tell you the truth, I am kind of an I like to have everything just in case I need it even though I probably don't need it or won't ever use it. I have gotten better with this obsession, but in reality it is probably for the better to have Zotero and to be able to convert between Mendeley if needed, since, as I plan to stay in academia or least research intensive, I will be collaborating with many people from around the world and who use different software. So I figure having Mendeley and Zotero on board I can cover most people's citation choices with both (not totally sure about this, I will update as I find out).

Pulled this one out of the archives.  Had it as a draft forever.  Finally installed Zotero standalone.  I founf this:

http://www.stephanieplumeri.net/blog/category/install-wizard/

which linked to this:

http://anterotesis.com/wordpress/2011/11/installing-zotero-standalone-on-ubuntu-11-10/

I couldn't get this^^ to work so after I downloaded and unpacked the file I just moved the folder to my home.  You can then double click the Zotero executable and then pin it to a launch bar.  It has this weird obsession to try to install itself in Libre every time I run it.  I don't want to atm so I clicked Cancel, it says are you sure you can install it later, I say yes OK.  It repeats!!  SO finally I clicked on the X to close the window box and it went away.  I might just let it install so it goes away.  I just figured that I am not ever going to use it in Libre so I didn't want/need to install.

I haven't tried the connectors either.  Normally Zotero works natively in FireFox, but it now has the ability to do the same in Chrome and Safari (haha, screw IE).  I didn't do this because I mainly use MD and won't be using Zotero too often.  I think I'll keep it on board for backup and just to keep up with the software.

Kile Issue: Toolbars and menus gone

[kubuntu] Kile problem: Toolbars and menus gone after upgrade to hardy - Ubuntu Forums

^^Linked from this thread: [ubuntu] kile: menu bar disappeared - Ubuntu Forums:

This is weird.  The menu bar where File, Edit, View, etc. had disappeared from Kile.  I still had the toolbar with the New, Open, etc. buttons.  Must have happened when I reinstalled Kubuntu and Xubuntu cause my GNOME classic had messed up (It was my fault, I had tried messing with it to get the windows to snap but never did and ended up messing some things up where it wouldn't work correctly at all.  Finally got back GNOME classic working again.  Leaving it alone for now.  I think it stems from my quad monitor setup.  *sigh* Maybe one day Ubuntu-Unity will work flawlessly with quads.  I probably could figure it out messing with the xconfig, but I don't have the time or patience at the moment.  Anyhoo...).  The fix which worked for me was:

I stumbled across this problem lately and this thread was the only hint to a solution that I could find. A very simple fix is to restore Kile to its default settings by removing your own settings (this does not affect your user defined shortcuts). Close Kile, open a terminal and type
Code:
rm $HOME/.kde/share/config/kilerc
Restart Kile. Done.

Friday, July 13, 2012

How to Install Latest Version of Chromium Browser in Ubuntu ~ Ubuntu Vibes | Daily Ubuntu Linux Updates

How to Install Latest Version of Chromium Browser in Ubuntu ~ Ubuntu Vibes | Daily Ubuntu Linux Updates

sudo add-apt-repository ppa:towolf/crack
sudo apt-get update
sudo apt-get install chromium-browser I noticed that it defaults to Yahoo for searching using the webpage name bar. You can change this under settings.