Monday, November 17, 2008

Toad - Tips N Tricks - Find duplicate data

I am sure you have come across a situation where you needed to find duplicate records in a table and you whipped out your DISTINCT SQL queries.

Toad makes it a lot more easier using it's Data Duplicates tool.

image

Found under the Database->Compare->Data Duplicates menu, it allows you to specify the columns used in the search for duplicates and then shows you a summary as well as a separate grid where you can delete or modify the records.

The 3 tabs that allow you to check and fix duplicate records

The above image shows the interface for the Data Duplicates tool (The 3 tabs that allow you to specify duplicate criteria and then check and fix the duplicate records)

Saturday, November 15, 2008

MS Access - Error 3326 - Recordset is not updateable

On a recent project where I was porting an Access application so that it would use an Oracle database as its backend data store I came across a frustrating error where when I opened a form that was directly linked to a table (via the form's datasource property) I would get the following error:

3326 This recordset is not updateable.

After almost 3 days of following various leads that did not lead anywhere I finally found out what was causing the error.

If you are having the same issue that I had, then if you open the linked table in Access, you will see that the table cannot be edited (The insert menu will be disabled).

image

So you can immediately stop fiddling with the code, form properties, field properties, etc. as that is not what is causing the problems. The problem is entirely database driven. In my opinion either this is a bug in Access or Access is unable to determine the complete properties for the table and hence decides to put the table in a read-only mode.

In my case what I did was I removed all the constraints and indexes on the table and added them one at a time. Magically this fixed my problem. (Each time I changed a property on the table I would refresh the affected linked table in access and make sure that the table was still editable).

Unfortunately at this stage I do not have an exact cause for the problem. In the beginning I thought it was because the table did not have a primary key and then I thought it was default values that were strings and finally I thought it had something to do with indexes on the table. But once I blew away all of those and re-added them to the table, Access suddenly decided that the table was kosher for editing!. Oh! how I hate Access!.

Tuesday, November 11, 2008

A DIY cake for techies

When I saw this article on Wired.com, it made me do a double take. Its DIY instructions for making a cake in 5 minutes in a microwave. Perfect for those times that you get hit with a craving for a dessert at work (though you will need access to some flour and non-stick cooking spray)

Make Cake in a Mug - Wired How-To Wiki

Is that a nuclear power plant in your backyard?

A company called Hyperion is taking technology developed at the Los Alamos labs and creating a small, self contained, nuclear power plant. These power plants are about as wide as a “bath-tub” (according to the website) and a little taller than a person.

feature_image

These self contained power-plants fueled with a small amount of non-weapons grade radioactive material can provide electricity to 20,000 homes (25 Mwe). As these reactors have no moving parts, they are made to be placed in places that do not need constant access (think buried under ground), making them safe from unwanted human access (think bad people). Even if somebody were to try to get access to the radioactive material inside the reactor because it is non-weapons grade they could not be used to do bad things (like creating a bomb). These reactors are sealed at the factory and once sealed they are designed to never be opened again, making it easy to install and operate.

Worried about a melt-down are you? No worries here, the technology used by these reactors makes it so that if the reactor were to go into an uncontrolled reaction then upon exposure the core will cool down immediately. Also because the reactors are made to be buried in the ground, any leaked radiation would be absorbed before becoming dangerous to humans.

water-blue

The cost…. a cool $25 million for the first generation reactors. These reactors are not made for individual homes but for cities. If pure electricity driven cars become a reality and popular then such reactors would be able to provide the electricity needed to power these cars. As they will be close to a city, they would cut down on the energy loss typically seen with power transmission from far away located power generation stations.

Finally, these units can be deployed to far away places (Artic science stations, remote communities and poor villages in places like Africa).

Read more about the technology from Dr. Pete’s LANL page - http://pearl1.lanl.gov/external/Research/peterson_FLC.html

02-037-reactor

Lots more information about the technology and company is available from their FAQ page:

http://www.hyperionpowergeneration.com/about_FAQ.html

What is Hyperion?
The Hyperion power reactor is a compact, self-regulating power module (also referred to as a battery or power drive) that complements existing nuclear reactors by filling a niche for moderately sized, distributed, or dedicated power applications

What role does Los Alamos National Laboratory (LANL) have in the development of Hyperion?
Hyperion was invented by award-winning LANL scientist Dr. Otis Peterson while he was employed full-time by the lab. Under the Technology Transfer program for U.S. national laboratories, LANL will continue to own intellectual property relating to the Hyperion technology, but the rights to commercialization (introduction, manufacturing, licensing, production, marketing, and sales) of the product resulting from Dr. Peterson’s invention are held by Hyperion Power Generation, Inc., (HPG) a Santa Fe, New Mexico-based corporation. HPG is paying for the license to the rights to the intellectual property known as Hyperion (aka Comstar). HPG is also funding further research and engineering of the technology for Hyperion at LANL.

Who invented Hyperion?
Otis G. (Pete) Peterson, Ph.D. invented the self-regulating, inherently safe nuclear battery (reactor) during his tenure at Los Alamos National Laboratory (LANL). In addition to designing the Hyperion reactor and co-inventing a biomass to fuel conversion process, his technical expertise has focused on wavelength tunable lasers, solid-state physics, and international science issues.

Among his many career accomplishments, Dr. Peterson holds six patents including those for his inventions of the cw Dye Laser and Alexandrite Laser, which earned R&D 100 awards. In the 1990’s he served as science attaché at the American Embassy in London for environmental preservation and non-proliferation issues. He has served as a group leader at LANL and in management positions at Eastman Kodak and Allied Chemical, where he co-founded the laser-induced chemistry program. He is also the co-founder of the laser isotope separation program (AVLIS) at Lawrence Livermore Laboratory in 1973, which continued for 26 years.

Honored with numerous awards and published widely, Dr. Peterson is a fellow of the Optical Society of America and his career publications have been cited over 1,200 times in technical literature. He was awarded his doctorate in Solid State Physics from the University of Illinois. Dr. Peterson is now the Chief Scientist for HPG. He has retired from full-time work at the lab.

Will Hyperion be secure?
The power-producing core of this module will be contained within multiple gas-tight chambers to insure absolute containment of all gases, along wth other contaminants in the unlikely event that a single chamber fails. Further, the module will be buried in the ground during its operational life. This will protect the module from almost all conceivable threats, natural or man-made, and make tampering extremely difficult. Additionally, active area security will be provided by the operator.

How does Hyperion work?
Unlike conventional designs, the proposed reactor is self-regulating through the inherent properties of uranium hydride, which serves as a combination fuel and moderator. The temperature-driven mobility of the hydrogen contained in the hydride controls the nuclear activity. If the core temperature increases over the set point, the hydrogen is driven out of the core, the moderation drops, and the power production decreases. If the temperature drops, the hydrogen returns and the process is reversed. Thus the design is inherently fail-safe and will require minimal human oversight. The compact nature and inherent safety open the possibility for low-cost mass production and operation of the reactors.

Who is currently funding the development of Hyperion?
The Hyperion project has been funded thus far by Denver-based Altira Group, one of the nation’s premier venture capital funds focused on alternative energy technologies, and by private individual investors.

Who is building the HPG company?
Santa Fe-based Purple Mountain Ventures, Inc. is supplying management services and personnel for Hyperion Power Generation.

Saturday, November 08, 2008

Obama Headlines – Silverlight example

A very cool example of using Silverlight and DeepZoom. Created by Scott Hanselman and Vertigo  Software, Obama headlines shows 720 front-page images captured on the day after the U.S elections. Scott Hanselman also provides implementation details about how the website was created (link).

image

Vertigo BigPicture™ - Obama Headlines

What’s a Tomogram?

933091 

Last week the world was amazed by CNN’s holograms used in it’s coverage of the U.S. elections.

Turns out the real name for what CNN did is “Tologram”.

Whats a tologram? The National Post has a good article on the technology used by CNN and what the difference is between a hologram and a tologram.

935656

Here is some more information from the article:

The CNN anchors were not really speaking to three-dimensional projected images, but rather empty space, Kreuzer said. The images were simply added to what viewers saw on their screens at home, in much the same way computer-generated special effects are added to movies.
Kreuzer said the images were tomograms, which are images that are captured from all sides, reconstructed by computers, then displayed on screen.
Holograms, on the other hand, are projected into space.

Graphic: The CNN hologram that wasn't - Posted

Houdini – Obama’s campaign computer

image 

The Tech is a MIT student newspaper. The following is an interesting article on what the reporter saw occur on the ground as a volunteer on election day. What caught my eye is how Google Earth and technology was used to track voter statistics and provide a feedback mechanism to the volunteers to keep them motivated.

the Obama campaign is incredibly technologically advanced. The Obama campaign’s computer is named “Houdini.” It has a list of every single registered Democrat, Barack-leaning independent, and Obamacan. Each voter shows up as a black dot on a Google Map. The campaign records statistics on each of these voters, tracking the number of times each house has been canvassed, called, persuaded, and mainly badgered into voting for Obama.

When they do finally vote, the dot disappears from the screen, hence the name “Houdini.” Our job, as we learned when we arrived, is to make every single dot disappear.

Election Day: Yes We Can Have Free Yogurt - The Tech

9V tragedy


9V tradgedy, originally uploaded by Lenny&Meriel.

A 9v tragedy!!! Very funny!

Download YouTube Videos as MP4 Files

Do you want to download a YouTube video that you like very much? You can use a service like VILoader. But I like the following method better – as it allows you to download a video without having to jump to another site.
This method uses a bookmarklet (a bookmark – that uses JavaScript to accomplish some processing on a web-page that you are viewing).

To begin, just right click on the following link %20Download%20as%20MP4%20'+%20%20((navigator.userAgent.indexOf('Safari')!=-1)?'(control-click%20and%20select%20Download%20linked%20file%20as)':('(right-click%20and%20select%20Save%20'+%20(navigator.appName=='Microsoft%20Internet%20Explorer'?'target':'link')%20+'%20as)'))+'';}void(0);">Get YouTube video and select "Add to favorites...".

Save LinksSave

And if you choose Links as the create in folder - the short-cut will appear on the links toolbar.

Links

Once you have added the above bookmark-let, if you click on the bookmark while viewing a YouTube video - you will get a link in the Video's author box, which will allow you to download the video as an MP4 (highlighted in pink in the following image). And this occurs without refreshing the page - so you can decide to download the video in the middle of watching a video without having to worry about restarting the video.

Download

The file gets saved to your computer as an MP4, which means that you can import it into iTunes and also transfer it on to your iPod/iPhone device.

 

Finding high quality videos on YouTube:

(via Digital Inspiration)

Use the following link to search for high quality videos on YouTube.

http://www.google.co.in/advanced_search?q=video+title+%22watch+in+normal+quality+watch+in+high+quality%22+site:youtube.com&hl=en

The link takes you to the advanced search page of Google. All you need to do is replace the “video title” with the name of the video you are looking for. Because the phrases “Watch in normal quality” and “watch in high quality” occur right next to each other on YouTube’s pages, Google will return links to the high quality videos on YouTube.

Sunday, November 02, 2008

Another open letter to the undecided voter – We need to fix health-care

This was an email that a friend of mine from work sent me. It underscores how badly our health-care system needs to be over-hauled. Unfortunately, health-care reform seems to be a low priority on John McCain’s agenda for the next 4 years. Bringing down the cost of health-care and universal coverage are definitely hard fruits to reap (the country has been deeply divided by partisan politics and the state of the economy is really hurting all of us). But fixing the small issues such as not allowing insurance companies get away from their obligations by hiding behind their “pre-existing clauses” hedges is definitely something that can be fixed and should be fixed. Many people might not realize it – but the pre-existing clause definitely hurts our economy – as many people just dont want to try and take on the risk of trying to get health-care on their own and hence stay away from starting small business – the bed-rock of our economy. It is unfortunate that this topic is important only to Barack Obama. On the other hand, John McCain’s advisors think that just giving $2500 to each person as tax credit to purchase their own health insurance will make our lives and worries better. News flash - $2500 wont pay for most American’s health insurance and it certainly wont give health insurance to the un-insured. Finally John McCain’s policies do noting to fix the problem of insurance companies flashing the “pre-existing illness” card. Obama is our best bet at fixing the problems that every-day Americans face with the current health care situation.

 

Here is the email from my friend:

Issue: Health Insurance and pre-existing conditions

On January 20, 2000 I was diagnosed with colon cancer stage 4 type 2.  The cancer had spread into 12 out of 18 lymph nodes. I had a 60% chance of recurrence without going through treatment.  After going through nine months of chemo and radiation my odds improve to 40%. I am happy to say that everything has gone well since my treatment.
I was laid off from employer in February of this year. I applied for private health insurance with Anthem-Blue Cross  (a large insurance carrier) and was declined coverage due to their policy that I had to be free of cancer for at least 10 years before they would consider providing health insurance coverage.

I have yet to find a permanent position and my cobra coverage will end in August 2009. If I am not able to get into a group insurance plan before then, I will be uninsured for at least six months. I was even thinking about starting my own business but the risk is too great without health insurance.

My middle daughter who is twenty years old has the Human Papillomavirus (HPV) virus.  She just found out today that she will lose her job with her employer in the next two months.  Since she has had several abnormal results from her exams she also is not able to get private insurance.  One study found that, during 2003–2004, at any given time, 26.8% of women aged 14 to 59 were infected with at least one type of HPV.

The reason that I am telling you this: I believe that we have a serious problem with health insurance in this country. Many people with pre-existing conditions are not able to get affordable insurance unless they can get it through a group plan provided by the company they work for.  Barack Obama realizes that this is something that we need to fix in this county.  He has stated my many times that his plan includes making sure that individuals with pre-existing conditions will be able to get good affordable health insurance. So as you make up you mind I hope you will take this into consideration.

Thanks for taking the time to read my email! 

Steve S.