John Mercier

java programming and scjp

  • Blog
  • Projects

How to edit Places in the ubuntu menu

Posted on October 04, 2010 by John J Mercier

Filed under General | 0 Comments

Editing Places is easy. They come from nautilus bookmarks. Open nautilus, select Bookmarks then edit bookmarks. This is very helpful to me because I use DropBox and all of my places are actually in the dropbox folder.

Share |

How to fix minimize, maximize, and close in ubuntu

Posted on October 04, 2010 by John J Mercier

Filed under General | 0 Comments

Hello, I know it's been a while so I'm going to share this. In ubuntu the window buttons to minimize, maximize and close the window are in the upper left corner. I guess they are trying to steer away from the Microsoft way of doing things. To fix this you have to edit the gnome configuration.

  1. Go to a terminal and type gconf-editor.
  2. select /apps/metacity/general in the folder pane
  3. double click button_layout
  4. change the value to "menu:minimize,maximize,close"

The change should be instant. This should work in any linux distribution that uses gnome.

Share |

Favorite Posts for the Week #3

Posted on May 17, 2010 by John J Mercier

Filed under General | 0 Comments

Well, I haven't been reading my google reader as much as I should so I only have a few links to share.

MDA posted a fitness challenge.

Modern Paleo posted a recipe for greek chicken and another for pork in yellow curry.

NoodleFood made a good comment on the genocidal muslim student.

Sorry, for the short list and lack of comments. The next one should be better.

Share |

Favorite Posts for the Week #2

Posted on May 11, 2010 by John J Mercier

Filed under General | 1 Comments

Sorry this is late but nobody is really reading it anyway.

Health

Mark's Daily Apple has a good post, The Difinitive Guide to Sugar, that describes in detail the different kinds of sugar and their effects on health. The best part is where he explains why you should avoid sugar.

  • Sugar stimulates a physiological stressor-reaction cascade that provokes adrenaline and cortisol release and thickens the blood.
  • Sugar effectively disables your immune system by impairing white blood cells’ functioning.
  • Sugar decreases your body’s production of leptin, a hormone critical for appetite regulation.
  • Sugar induces significant oxidative stress in the body.
  • Sugar appears to fuel cancer cells. (Check out Free the Animal for much more on the cancer connection.)
  • Sugar promotes fat storage and weight gain.
  • Sugar disrupts the effective transfer of amino acids to muscle tissue.
  • Sugar intake over time spurs insulin resistance, subsequent Type II diabetes and the entire host of related health issues like nerve damage and cardiovascular disease.
  • I also found a post on artificial sweeteners that you may want to look at. Also, isn't lactose a sugar? I would like to see more info on that.

    Meatza is pizza that uses groud beef for the crust.

    On The Paleo Diet there is a Q&A that talks about lectins, saponins, and gliadin. I broke them down in this table.

     Antinutrient  Found In  Why it is not healthy
     lectins cereal grains and legumes  increasing intestinal permeability, resistant to digestive enzymes, deposited in the internal organs
     saponins  legume sprouts  affect the gut barrier and by extension immune system function, may also increase the risk of autoimmune diseases in genetically susceptible individuals
     gliadins  wheat  resistant to digestive enzyme degradation, arrives intact when it comes into contact with intestinal epithelial cells, increases intestinal permeability
     phytate  bran and seeds inhibits the intestinal absorption of iron, magnesium, calcium and zinc

     Diana Hsieh wrote a nice post with links to making paleo friendly foods.

    and here is A Story on Circumcision.

    Philosphy

     Mistaking fact with opinion. I like to read threads like this because they point out something that can really cause problems with reasoning. The idea is that arguing with opinions rather than facts is a huge mistake. In a society it will lead to mass uncertainty.

    Politics

    Arguments for government spending. People take this seriously.

    1) The political push to reduce government deficits is economically misguided, based on an irrational "phobia" of deficits.

    2) If we want economic growth, we need more spending. Only banks and governments can stimulate spending because, "Governments and banks are the two entities with the power to create something from nothing."

    3) Increasing spending by having the government do it is preferable to having the private greedy selfish bankers do it. And the real reason bankers oppose government spending is because it competes with their private lending.

    4) We shouldn't worry about the so-called impending bankruptcy of Social Security or Medicare or of the US government itself. The government is the source of money and therefore can't run out.

    5) Nor is government debt a "burden on future generations", because it never has to be repaid. Each generation can just pass it onto the next generation, so there's no problem.

    A real example of lobbying doing terrible things.

    I do think at a certain point you become a socialist!

    Share |

    Favorite Posts for the Week #1

    Posted on May 01, 2010 by John J Mercier

    Filed under General | 0 Comments

    The goal of these posts are to share my favorite posts for the week. This is the one post a week where I will be off topic from programming and try to share some of my views. After all, this is my blog and I can put what I want on it. I decided to make it only one post a week because I don't want to get off the topic of programming and java. So for now, this will have to work.

    I'm still developing a process for finding decent posts but google reader is the best way to keep track of everything I like so far. The first thing I do is save an entry and edit it throughout the week with links to things I want to share. Almost everything I read is in google reader so all I have to do is star the items I like.

    Health

    In the case against cardio Mark explains why cardio is bad.

    "Well, we know that this current popular high intensity aerobic pursuit is a dead-end. It requires huge amounts carbohydrate (sugar) to sustain, it promotes hyperinsulinemia (overproduction of insulin), increases oxidative damage (the production of free radicals) by a factor of 10 or 20 times normal, and generates high levels of the stress hormone cortisol in many people, leaving them susceptible to infection, injury, loss of bone density and depletion of lean muscle tissue – while encouraging their bodies to deposit fat."

    Shea makes a great case against circumcision.

    "Given these effects (both the certain and the possible), is circumcision for preventative purposes justified? My answer is a resounding NO! All of the diseases which are supposedly more likely for uncircumcised men have either much less drastic prevention methods, much less drastic treatment methods, or both. Worried about UTIs? Rather than slicing off the flesh of your newborn, why not wait and see if UTIs develop (a fairly small risk in any case) and use the normal, non-surgical treatment: antibiotics."

    Government may soon control all water!

    Open Immigration

    "The only approach that respects individual rights is a policy of open immigration (which is not the same as unrestricted immigration) -- and the abolition of the welfare state."

    Java

    SCJP exam notes posted by Nikunj point out some important concepts you need to understand for SCJP.

    Google explains its approach to Flash support in mobile devices.

     

    Share |

    HTC Eris command line access

    Posted on March 25, 2010 by John J Mercier

    Filed under General | 0 Comments

    Recently, the screen to my LG Voyager started to go out and I had to buy a new phone. I decided to go with the Eris because it's cheap and It has android on it. I've never had a phone with the internet and I always thought it was a scam, but since I started this new job I've realize how much a good phone can keep my organized.

    So, I got the Eris and messed with a few apps and found ConnectBot. It is used to connect to computers using ssh and telnet but there is also a local option. This option opens a command line for the phone itself. I'm not sure what this can do but it looks like the phone is not logged in as root so it probably doesn't do much. I just think it's cool to see what is under the hood of my phone.

    Share |

    Moving Text in SQL Server

    Posted on March 19, 2010 by John J Mercier

    Filed under General | 0 Comments

    Hello everyone, I just wanted to post something cool I figured out at work.

    Problem: You need to copy one field in a table to another field in the same table for all rows but that field has single quotes.

     field1  field2
     John's  
     it's  
     wasn't  

    Solution: Well it looks like you will need to select everything in field one and create an update command to copy it to field two. To select everything in field one you can use

    select field1 from tablename;

    but this does not create the update statements needed. Try adding a string

    select 'update tablename set field2=''' + field1 + '''' from tablename;

    Now you will have to copy the output of this query into a new query and run it.

    update tablename set field2='John's' from tablename;

    You should get an error because of the single quote. It will tell the server that the string has ended and the rest is part of the query command. So, 'John' is the string and s' is just a syntax error. Single quotes can be "escaped" by using two single quotes instead of one. So, John's will become John''s. To do this within a query you can use the replace function in the first query.

    select 'update tablename set field2=''' + replace(field1, '''', '''''') from tablename;

    The result will be

    update tablename set field2='John''s' from tablename;

    The real benifit of using this method is when there are large text fields that need to be copied. It can also be useful when there are hundreds of records to be moved. The only problem I see with this method is the large amount of text it can generate for each update command. It may be possible to use the in statement to select the text from the database rather than putting it all into the query.

    Share |

    Setting up nvidia drivers on ubuntu 9.10

    Posted on January 23, 2010 by John J Mercier

    Filed under General | 0 Comments

    I recently wiped my dell xps m1210 and reinstalled ubuntu. It has been over a year since I have had to worry about the nvidia support on linux I wanted to make a post about it so I can remember everything I have to do to get this thing working right.

    For those of you new to this, linux does not like proprietary software. I'm not sure how this makes linux better than windows but it really makes it hard for new users to get the best out of their system. Some of the major issues that come with linux are easily fixed in windows. Those issues are dvd support, multimedia files (such as mp3, mp4, and avi), sound drivers, video drivers. Today I'm going to work on video drivers.

    Ubuntu makes installing video drivers pretty easy. All I had to do to install it was click system->administration->Hardware Drivers. The program will look for a nvidia driver to activate and make it work. Now, this is much better than when I first started using linux. I used to have to download the source for the drivers, compile them, and install them.

    There are many problems I have with the nvidia driver. For one thing I use a laptop. I need to be able to quickly hook up a second monitor and use it with my laptop closed. On ubuntu this is not a fast process at all. I need to switch to that monitor using Fn+F8 twice. Then, when I close the laptop it goes into sleep mode. So, I have to make sure that is turned off in power management. Now that I am on my other monitor I have to adjust the screen resolution. My laptop has a 1280X800 resolution and my monitor is a 1920X1200. I'm not going into any more details on how difficult it is to get everything properly setup. It takes way to long and it is one of those things that keeps users away from linux.

    Share |

    Google Chrome

    Posted on January 23, 2010 by John J Mercier

    Filed under General | 0 Comments

    I remember the first time I heard of google chrome I had just completed changing my OS from Windows XP to fedora linux. The change was complete and I had not yet tried running windows on a VM. I didn't try to install chrome until I switched from fedora to Ubuntu, when I found out that chrome does not hava a linux installer. It sucked that I could not use if at all but I decoded to try it on a windows vm. Well, now my browser experience is about to completely change because google has finally came out with a linux installer.

    Google chrome beta is not in the ubuntu repository, and although I hate manually installing software I had to try this out. The browser is easy enough to install. Just go the the site, download the package, and use any package manager to install it. It's so nice that linux can easily install software. This is one of the reasons I decided to switch. I remember having to always compile software to get it working, and linux books always start out with compiling software from source to install it. For a new user this can be annoying. I don't think linux better at installing software than windows, its just that linux has improved so much that I love the way it works now.

    There are a few issues that I have with chrome so far. First, it doesn't use the ubuntu theme at all. If there is a way to make it look like all the other windows I haven't found it yet. Second, the dialog boxes do not fit into my netbook's  small screen. This is a big deal to me since I use my netbook more than any other computer I have. Google should incorporate scroll bars into all dialog boxes so users can view content that may go off screen. Netbeans does this and it works great on my netbook.

    One thing that I like about Chrome, besides its speed and awesome layout, is the extensions. The only extention I use is xmarks so this makes chrome more usable for me. So, the only thing that chrome needs to do is fix the dialog boxes and I will be sold on it. Google, thanks for this wonderful product. The wait was worth it.

    Share |

    wired networking fixed on 1005HA

    Posted on December 17, 2009 by John J Mercier

    Filed under General | 0 Comments

    Today, I figure out how to install my wired lan driver on linux. It is pretty simple, but I had a hard time getting the AR81Family-linux-v1.0.0.10.tar.gz file. I emailed the atheros website to see if they could fix their broken links. Updates on that later. Here are the simple steps to get it working.

    1. download the AR81 driver (I could only find the 1.0.0.9 version because the atheros website is broken).
    2. switch to the src directory and run make
    3. run make install

    After this I had to restart and it worked.

    Share |

    Main | Next page »
    • General (12)
    • Projects (3)
    • Programming (14)

    Search

    Tag Cloud

    activism addthis.com data_structure downloading facebook google google-buzz introduction java javablackbelt jdbc johnmercier.com jsp linux model-1 netbeans nvidia objectivism official-english programming projects pti roller scjp server sql theme uncertainty velocity welfare-state

    Friends

    • Ed
    • Shane

    Links

    • Glazed Lists
    • JGoodies
    • Java Specialists
    • Swing 2.0
    • Swing Generics
    • ideone
    • pircbot

    Feeds

    • All
    • /General
    • /Projects
    • /Programming
    • Comments

    Referrers

    • direct (145)
    • baccaratforums.com/g (37)
    • www.playdota.com/for (37)
    • www.mycraft.com/ueba (36)
    • www.cooksillustrated (35)
    • znakomstvaca.info/si (10)
    • znakomonly.info/site (10)
    • znakomstvaca.info/si (5)
    • microscopiclove.info (5)
    • microscopiclove.info (5)
    • microscopiclove.info (5)
    • microscopiclove.info (5)
    • znakomstvaca.info/si (5)
    • microscopiclove.info (5)
    • microscopiclove.info (5)
    • microscopiclove.info (5)
    • microscopiclove.info (5)
    • microscopiclove.info (5)
    • microscopiclove.info (5)
    • znakomstvaca.info/si (5)
    • microscopiclove.info (5)
    • microscopiclove.info (5)
    • microscopiclove.info (5)
    • microscopiclove.info (5)
    • znakomstvaca.info/si (5)
    • microscopiclove.info (5)
    • microscopiclove.info (5)
    • microscopiclove.info (5)
    • znakomstvaca.info/si (5)
    • microscopiclove.info (5)

    Navigation

    • John Mercier
    • Weblog
    • Login

    ©2010 John J Mercier.

    Designed by Free CSS Templates. Template by E. Strokin. Powered by Roller Weblogger 4.0.1.