Pages

Tuesday, December 17, 2013

Google Drive's Delete Confirmation Dialog

So the real annoyance I am facing is the Google Drive's delete confirmation dialog that keeps on popping up.


So to make it disappear, try the following if you are on Mac:

Remove the item from the login items:



Then go to terminal and type the following to start the application:


/Applications/Google\ Drive.app/Contents/MacOS/Google\ Drive --noshow_confirmation_dialog_on_delete

Viola!

On Windoes go to terminal (cmd.exe) and type the following and press Enter:

C:\Program Files (x86)\Google\Drive\googledrivesync.exe" --noshow_confirmation_dialog_on_delete

Sunday, December 15, 2013

Generate an Android project using the amazing Maven Archetypes

So I can't seem to get over the convenience of using Maven Archetype for generating Android project. Does all the work for ya!

mvn archetype:generate \
  -DarchetypeArtifactId=android-quickstart \
  -DarchetypeGroupId=de.akquinet.android.archetypes \
  -DarchetypeVersion=1.0.10 \
  -DgroupId=your.company \
  -DartifactId=my-android-application

For more details and a thorough introduction to the concept of Archetypes:
http://maven.apache.org/guides/introduction/introduction-to-archetypes.html


P.S. Remember, android-maven-plugin version 3.6.0 is your friend! So edit the pom.xml generated and change the version to 3.6.0 (or higher).

Use homebrew to install maven 3.0.5 on OS X

Quite frankly, I have found working with maven 3.1.1 a pain in the a**. This is because of various compatibility issues with preexisting projects. So here is a simple way to install maven 3.0.5:

brew install maven30

For those of you who will still go with 3.1.1:

brew install maven

Enjoy!

Sunday, December 8, 2013

Trace Metals in Atmosphere

Trace metals enter the atmosphere through different anthropogenic and natural sources. Some of the emission sources are gasoline, combustion, non-ferrous metal production. Once in the atmosphere, the trace metals do not remain confined to the local region but are carried to other regions and impact on a global level. The enrichment of trace metals has been noted as far as Arctic. This has impacted ecology, economy and quality of life. E.g. the increase in levels of Cd (Cadmium) and Pb (Lead) are known to cause spontaneous abortion in women in the first 3 months of pregnancy.

A global emission inventory can help in modelling the role of trace metals in riverine and atmospheric ecosystem. The changing emission factors, e.g. the use of low leaded gasoline, are indicative of the need for revision of such inventories on a regular bases. Lack of data makes it hard to come up with accurate emission inventories and hence a lot of assumptions are made which introduce uncertainty. Although every industry discharges at least one trace metal to the environment, yet this data is not recorded and hence, a lot of averages need to be estimated in order to create an inventory for use with simulations.

For industrial input, the first study which quantifies the emission of 16 different trace metals in air, soil and water on a global scale was conducted in 1980s and published in 1988. There have been just a few updates to this data and those were done in 1995 and 1996 for the data collected at the beginning of 1990s. There have been several studies done on a local scale on a limited set of trace metals.

Ref: "An assessment of global and regional emissions of trace metals to the atmosphere from anthropogenic sources worldwide" by Pacyna & Pacyna.

Sunday, August 25, 2013

Questions to Ask Before Accepting New Job Offer

1. What is the designation?
2. What is the salary?
3. What are the benefits?
4. When will the benefits start?
5. What is the probation period?
6. What is the nature of work?
7. Do you accommodate work from home?
8. How many yearly paid vacation days are there?
9. What are the regular working hours?

Any suggestions are welcome.

Friday, July 26, 2013

Supporting Different Android Devices

1. Supporting Different Screens:

Screens come in four sizes: small, normal, large, xlarge. The current devices support four densities: low (ldpi), medium (mdpi), high (hdpi), extra high (xhdpi).

Corresponding folders in the project for different screen sizes are depicted via the following hierarchy.

MyProject/
    res/
        layout/              # default (portrait)
            main.xml
        layout-land/         # landscape
            main.xml
        layout-large/        # large (portrait)
            main.xml
        layout-large-land/   # large landscape

            main.xml

The generalized density buckets are: low, medium, high and extra-high density. Generate image for each density and use the following Google recommended scaling:
  • xhdpi: 2.0
  • hdpi: 1.5
  • mdpi: 1.0 (baseline)
  • ldpi: 0.75

2. Supporting Different Platform Versions:

Target the application for latest version and support almost 90% of the devices.

Specify Minimum and Target API Levels

In the AndroidManifest.xml file, the following attributes for the uses-sdk element are important.
minSdkVersion: lowest API level to keep the app compatible with.
targetSdkVersion: use the latest android version here.

Check System Version at Runtime

Use the Build constant class to check for the API level being executed. 

Use Platform Styles and Themes

The built in styles and themes are important to give the application look and feel of the underlying operating system.

Saturday, June 8, 2013

Disabling the Macbook Webcam

Disabling the webcam:

Open Terminal via Spotlight.

Now Type the following commands and press <Enter> after each:
$ cd /System/Library/QuickTime/
$ sudo mkdir backup
$ sudo cp -rfv QuickTimeUSBVDCDigitizer.component/ backup/
$ sudo rm -rfv QuickTimeUSBVDCDigitizer.component/
$ sudo reboot

The sudo command will ask for your root password when executed first time in the session.

Enabling the webcam:

Execute the following commands:
$ cd /System/Library/QuickTime/
$ sudo cp -rfv backup/QuickTimeUSBVDCDigitizer.component/ .
$ sudo rm –rf backup/
$ sudo reboot


Disclaimer: Use at your own risk.