Saturday, October 15, 2016

numbering - A vertically centered equation number on a multline environment - TeX - LaTeX Stack Exchange

numbering - A vertically centered equation number on a multline environment - TeX - LaTeX Stack Exchange:



'via Blog this'

vertical alignment - How to get only one vertically centered equation number in align environment with two equations - TeX - LaTeX Stack Exchange

vertical alignment - How to get only one vertically centered equation number in align environment with two equations - TeX - LaTeX Stack Exchange:



'via Blog this'

Referencing within an align environment - TeX - LaTeX Stack Exchange

Referencing within an align environment - TeX - LaTeX Stack Exchange:



'via Blog this'

math mode - Subequation labeling inside an "aligned" environment - TeX - LaTeX Stack Exchange

math mode - Subequation labeling inside an "aligned" environment - TeX - LaTeX Stack Exchange:



'via Blog this'

numbering - subequations and array in braces - TeX - LaTeX Stack Exchange

numbering - subequations and array in braces - TeX - LaTeX Stack Exchange:



'via Blog this'

Tuesday, June 17, 2014

How to comment and uncomment blocks of code in the Office VBA Editor

Good to know.

http://stackoverflow.com/questions/12933279/how-to-comment-and-uncomment-blocks-of-code-in-the-office-vba-editor

One way to quickly comment and uncomment blocks of code is to add the Comment Block and Uncomment Block buttons to your toolbar.

Go to: View -> Toolbars -> Customize




Next, go to the Commands tab and then the Edit category:


Select the Comment Block and drag to the toolbar:





Do the same for the Uncomment Block.


Friday, June 6, 2014

Change Default Font and Size for Text Boxes in Excel 2010

I had someone ask me if I knew how to change the default text font and size for inserting a text box.  Of course it wasn't too straightforward, but with a little Googling I was able to find this!

http://answers.microsoft.com/en-us/office/forum/office_2007-excel/textbox-bug-all-excel-versions-setting-new-default/8bfabf2d-eceb-4f8e-959d-b03e54d0e10a


Here is one way to change the default font. It does not allow to you to change the default size!
No it's by design rather than a bug. Unfortunately when you copy and paste within a text box, Excel by default formats the pasted text using 'body font' from the Fonts Theme set for the workbook, and the standard font size that is set in Excel options, rather than keeping the format of the source, which is annoying. Calibri is body font in the default built-in Fonts theme called 'Office'. The easist way to change this behaviour, assuming you only want all text boxes to use Arial, is to create a special theme with the font you want. Do this from the Page Layout ribbon, select Fonts under Themes, and 'Create New Theme Fonts'. Edit the Body font, then name and save the Theme. Now select any of text box and apply the customised Font theme. The font in all text boxes should adjust to the theme font. Copying and pasting within the text boxes will also use this font. In regard to the font size, this is based on the default font size set in Excel Options. If you want to use this customised theme for all new workbooks, then you can create a customised template with the your customised theme pre-selected: Open a blank workbook, apply your custom Fonts theme and then save is as a template called Book.xltx, in your XLStart folder: Save As, Select Save As Type - Excel Template (*.xltx) type, change the name to Book, and locate it in the XLStart folder. In my PC (Vista) this is:C:\Users\UserName\AppData\Roaming\Microsoft\Excel\XLSTART\ All new workbooks created will then be based on this template.


This is the trick you must use to change both! You simply create an initial text box the with the font and size you wish. Then right-click on the text box and choose the "Set as Default Text Box." This should allow future text boxes to be set to this new default. Found it here from this nice instructional video on YouTube!!

https://www.youtube.com/watch?v=Xx_Ql56XPFg

Monday, April 21, 2014

How to update date and time in header footer in PowerPoint 2010

Ok, so this may be stupid, but since Microsoft products are used heavily in my new work environment, I "have" to (well I don't have to, but I want to) learn shortcuts and things such as overlay modifiers, for example, what I am posting now, in how to update a date amongst slides.

So, I have been given a PowerPoint for internal weekly progress reports.  The PowerPoint had a master slide which I am familiar with since I did use PP for school presentations.  I tried to change the date on "the" master slide.  However, this did not update the date for all slides.  I tried to Google and look up a way to update a date/time insert.  All I found were how to simply insert the date or insert/change the date for headers/footers.  I was "unaware" that the date was inserted on the slides as a footer, and I was thinking I could insert a text box with some type of "code" for the date which would update automatically when changed.  At any rate, I was simply thinking about it too much and in a roundabout way.  I simply just needed to go to the Insert tab then Header and Footer.  There you can change the date and its format and then apply to all slides!  Stupid and small, but I have to become more efficient in other things other than just LaTeX.  I will be heavily involved with Microsoft products, such as Excel and PP.  Not that I was ever against using them, I'd just prefer other software.


Monday, April 14, 2014

Online LaTeX Equation Editor - create, integrate and download

Online LaTeX Equation Editor - create, integrate and download:



This is a pretty neat little app.  If you don't have MathType and or don't want to use equation editor for Microsoft products (or similar), such as PowerPoint, then this is a nice way to display equations through an image.

Friday, April 11, 2014

Free PDF cropper!

http://www.pdfscissors.com/

Pretty cool app!

Features:
No installation required. Just click the start button,
Take those extra margins aways with easy cropping tool!
Drop margins from all pages by drawing just one crop area!
Avoid accidentally cropping some texts
See all pages together in stacked view
Scanned book? Crop odd/even pages separately
Complex pdf? Crop individual pages separately with full freedom.
Create crop areas easily
Draw, resize, move crop areas
Copy / paste crop areas using usual Ctrl +C / Ctrl + V
Why:
I myself faced a lot of difficulties to read pdf in kindle (and mobile phones / internet tablets), specially the image based pdfs (scanned image pdfs). Got tired of zooming and scrolling while reading a nice book. So created this to help me 'dive into the reading'. I hope it helps you too.

Why free? Well, I like programming and I needed the tool, so I would have created it anyways :P
To run the app, just click those buttons on the left
Those will launch the app directly...
no hassle
It will use 'Java webstart' technology. You need to have latest Java in your computer.
The app does not modify the original pdf, it creates a new pdf with the new crop areas that you will draw.
If you run the offline version, it will create a shortcut on desktop (and also to programs menu on windows). You can use that to run the app without internet connection.
If you have internet connection, app will keep itself automatically updated, no need to worry about getting the latest version.
NOTE: The app does NOT upload any file / any data from user's computer, the pdfs are cropped on user's machine.
Another note: App may ask to connect to Google sites, don't worry, it does that only to check whether there is any updated version of the app. It's an open source app and I have no intent to collect any user data.

Monday, November 25, 2013

Fluids in Motion

Fluids in Motion

Fluids in Motion is a blog devoted to fluid dynamic principles, theorists, history, and application. You'll find posts about aerodynamics, hydrodynamics, sports, and the latest fluid dynamic news. You'll also find videos that illustrate key concepts.

Wednesday, September 4, 2013

Why doesn't Chromium have “Chrome PDF Viewer” plugin?

This is a nice way to get the PDF viewer to work in Chromium.  Essentially, you take the "command" from Chrome and link it, or copy it, to Chromium.

sudo ln -s /opt/google/chrome/libpdf.so /usr/lib/chromium-browser/

http://askubuntu.com/questions/12584/why-doesnt-chromium-have-chrome-pdf-viewer-plugin

http://askubuntu.com/questions/220913/pdf-viewer-in-chromium

Sunday, September 1, 2013

How to run Google Chromium browser from the terminal

In case you need to run the Google Chromium browser from the terminal (such as my case where my unity is messed up/broken), you can use the simple command

chromium-browser


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

Another site for Ubuntu

Whelp, it's been awhile since I've messed with Ubuntu (and this blog!).  I just upgraded from 11.01/12.04 to 13.04 so I think I missed most of 12.04, all of 12.10, and 13.04 (with another release right around the corner, 13.10 in October).  Was using a Windoze laptop and desktop for school.  My desktop has been down for the count with a power issue for a long time, and I haven't had the time to mess with it.  I turned in my school laptop so I had to revert back to this laptop.  This Ubuntu is partially broken, but works for the most part.  I've got a Surface Pro from school to use as well.  Not real impressed with is so far, but it's decent for lightweight Windows usage compared to a traditional laptop.

Anyways, I thought I'd post another Ubuntu website which I thought might be helpful.

It's called n00bs on Ubuntu

http://www.n00bsonubuntu.net/

Monday, January 28, 2013

LaTeX Tips: Displayed Math - adding sections, subsections, etc. to equation numbers

LaTeX Tips: Displayed Math

How to number equations. By default, LaTeX will number equations consecutively, as (1), (2), etc., assuming you use the automatic equation numbering mechanism. If the paper is very short, or if there are only a few numbered equations, this is fine, but once the numbers get into the twenties and higher, a scheme that numbers equations by section, as in (1.1), (1.2), ..., (2.1), etc., is preferable. In fact, for the vast majority of journal articles, the latter is probably the best numbering scheme. To get equations numbered by section, just put the following into the preamble: " \numberwithin{equation}{section} ". For books, theses, or very long papers, an equation numbering scheme that is three levels deep (with numbers like (4.1.1), etc.) may be appropriate. To get this, just replace "section" above by "subsection", or the corresponding innermost level. The same mechanism works for other counters, e.g., theorem counters, instead of "equation".

If you have a thesis or some other class/document type it may be different.  In my case (UTK thesis/diss class) it automatically numbered 3.1 for chapters.  So for "3.1.1" it was "section," and "3.1.1.1" I used "subsection."

Monday, January 14, 2013

Top 5 reasons the Ubuntu Linux phone might make it | ZDNet

Top 5 reasons the Ubuntu Linux phone might make it | ZDNet

Windows - Nvidia - Display driver NVIDIA Windows Kernel Mode Driver, Version ???.?? stopped responding and has successfully recovered

Ok, so I am using my advisor's Dell Precision M4500 laptop for Windows (7 specifically).  It has a Quadro FX 1800M card onboard with a driver version of 259.22 installed.  I kept getting occasional screen freezes in which I had to reboot.  Every now and then the system "recovered" and gave me this error:

Display driver NVIDIA Windows Kernel Mode Driver, Version 259.22 stopped responding and has successfully recovered

Finally sick of it, I googled and found this:

http://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/display-driver-nvidia-windows-kernel-mode-driver/46f1f9d0-313a-4182-a56f-1604edf04448

The complaint:


"Display driver NVIDIA Windows Kernel Mode Driver, Version 186.81 stopped responding and has successfully recovered." I keep getting this message since I installed Windows 7 Ultimate, it is only slightly different than the error message I got with Vista, please help!
Windows lovely response:
If you have a desktop machine, get the latest drivers from here.. http://www.nvidia.com/Download/index.aspx?lang=en-us If you have a laptop, contact the laptop manufacturer as they are responsible for the proprietory drivers that you will need.. Mike Hall MVP - Windows Desktop Experience http://msmvps.com/blogs/mikehall/
This is why I hate Windows!!!!! Thankfully the community pitched in. I first tried this:
After many weeks of Googling, going through 100 threads, trying many of the solutions (some of which being ridiculous like reformatting, replacing hardware, etc.), I found ONE POST that suggested what I can now confirm fixes this problem. Not "it hasn't happened yet, keeping my fingers crossed", but actually fixed. THE SOLUTION: Nvidia Control Panel -> 3D Settings -> Set PhysX configuration -> Select a Physx processor -> choose your graphics card instead of leaving it on auto-select.
Like this^^^ user said, there are many fixes out there. This one^^^ didn't work. However, I found this nice post at the top and seems very reasonable since (total guess) I feel like over heating was a problem. This computer had overheating issues before when someone else used it, but it wouldn't stay one in their case. So far so good:
Ok guys, i fixed the problem... patched it at least... I had the same problem (different model same story... as everyone else) Nvidia and Windows 7 64 (read some problems with 32 too) don't get along too well.... i tried all solutions i found over the web, nothing worked.. Here is how i fixed it, i desactivated all windows visual goodies & stuff... Right click on my computer, go to property, then in left margin select: advanced system settings, third tab, called "Advanced" First option : Performance click on "settings", select "adjust for performance" that will uncheck everything, then you can keep the 3th and 4th from the end checked (smooth edges on screen fonts & smooth-scroll list box, if you want the webpages text to look the way they should.. quite essential to keep the font thing..) my system became stable after that, no more video card crash, no more Display driver NVIDIA Windows Kernel Mode Driver, Version (whichever i tried) stopped responding and has successfully recovered VERY STABLE, and very simple... looks like win98 but functionnality are fully there... (without even mentionning how much faster this thing boots... ) When you see it's working well & stable, add options, one at a time... (i would recommand the useful options you miss, not the estetic that looked good) i added "show thumbnails instead of icons" and it's still stable... that way, if it become unstable or start over again, you know wich one to uncheck... it works for now, and let's hope Nvidia will release new drivers that actually works soon,... hope this post will help other poor customers of Nvidia to stop those frustrating msgs... i figured i seen so many posts with that problems it was worth to post actually worked... have a good day all...
I don't need or care for all the fancy stuff anyways. I do the same in Ubuntu/Mint with fallback or now Cinnamon because Unity seems to freeze with all the nonsense (nothing's perfect) and won't work (without much effort) with more than 2 monitors. Anyways, like I said it works for now and at least the performance is MUCH better. Looks like the old Windows 95 or 98 in places, but who cares?! Not me!!


NM!!  Was watching a Youtube video full screen and it froze!!!  Dammit!  I don't think I'll ever by a Dell!!!  Going to turn this POS in to get serviced!

Wednesday, January 9, 2013

Mark Shuttleworth Demos Ubuntu for Phones at CES 2013, Looks Really Slick, No More Lag! [Video] | Tech Drive-in

Mark Shuttleworth Demos Ubuntu for Phones at CES 2013, Looks Really Slick, No More Lag! [Video] | Tech Drive-in

Ok, so this is why Ubuntu has gone in its direction!  Finally, one device for TV, tablet, phone, and desktop!!  I can't wait to see this in action.  C'mon Ubuntu!  If they pull this off it will be bank!!!

This is what the Unity interface was exclusively designed for.  Ubuntu/Cano may have put the cart in fron tof the horse in this instance, but Unity is more optimized for touch screen.  I guess Ubuntu wanted to test it and run it as a desktop system (their strong link) before trying mobile devices such as phones, tablets, and touch screen computers.

Tuesday, January 8, 2013

Everything You Forget About LaTeX: Formatting Tables - Adding space to rows and columns

Everything You Forget About LaTeX: Formatting Tables

Column Width: \tabcolsep
Usage: \renewcommand\tabcolsep{6pt}
Explanation: tabcolsep is HALF the space between two columns. Default value is 6pt

Row Height: \arraystretch
Usage: \renewcommand\arraystretch{1}
Explanation: arraystretch is a FACTOR representing the distance between two rows. Default is 1

Landscape in LaTeX - Good for large figures and/or tables

http://texblog.org/2007/11/10/landscape-in-latex/

To change whole document to landscape use the command:

\usepackage[landscape]{geometry}

To change the page content but not the page layout use:

\documentclass[landscape, 12pt]{report}

To change a section (for printing):

\usepackage{lscape}

To change a section (for screen viewing):

\usepackage{pdflscape}

where sections are wrapped in the environment

\begin{landscape}
...
\end{landscape}

Wednesday, January 2, 2013

Wait is Over, Canonical Previews Amazing new Ubuntu OS for Smartphones! | Tech Drive-in

Wait is Over, Canonical Previews Amazing new Ubuntu OS for Smartphones! | Tech Drive-in

I haven't been overly excited nor impressed recently with Ubuntu nor Mint.  However, this is in part due to upgrading Ubuntu versions without properly backing up because for some reason (this is a knock on Ubuntu) every time I (you) upgrade versions something breaks.  For Mint, something has broken with the updates (on my laptop) :( ?!?!?

Anyways, an Ubuntu OS for smartphones (and tablets too, I hope) is freakin' awesome!  Can't wait to see the final product!!

Tuesday, December 11, 2012

setspace - Double line spacing - TeX - LaTeX

setspace - Double line spacing - TeX - LaTeX

For double spaced lines in LaTeX (one line space between each line, e. g. so someone could write in the white space for editing purposes) I used:

\usepackage[doublespacing]{setspace}

Wednesday, December 5, 2012

Linux Mint Forums • View topic - LM 13 maya cinnamon x64 network printer install problem (Setting up network printers in Linux Mint 13 Maya)

Linux Mint Forums • View topic - LM 13 maya cinnamon x64 network printer install problem

Had issues with the in house system settings printer config.  I would type in the IP address and it only found a few printers, none of them are correct.

Had to use the command in the terminal: system-config-printer

This brought up a config tool which worked fine.  I saved the program icon as a launcher in AWN.

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