Friday, June 24, 2016

Execution failed for task ':app:transformClassesWithDexForDebug'.

Hello everyone. I just created a new android tabbed project and i ran grade build. I expected it to build successfully howeever i was confronted with the following error
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\Dev\Java\jdk1.8.0_65\bin\java.exe'' finished with non-zero exit value 1 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
The solution to this issue is rather ridiculous. I closed android studio and ran make project. After than out of curiosity i attempted to run it and to my surprise it ran!. Android studio did not continue to bother me with that error!.

Thursday, June 16, 2016

Philips Over-Ear Sound Isolating Bluetooth Headphones Review

Search for a bluetooth headphone


Hello folks. I was searching for a pair of headphones recently and i went online and read reviews for some. I get really excited when i go shopping for something and buying a new headphone was nothing different. After browsing through numerous headphones and reading a plethora of reviews i was still not sure what i was suppose to buy. One aspect that i wanted was the versatility and therefore i turned my attention towards blue-tooth headphones.
 

The Philips SHB7150FB


Among the Bluetooth headphones, the Philips SHB7150FB caught my eye. I was a over the ear headphone with Bluetooth capability. Also it had noise cancelling facility too. Furthermore it came with NFC pairing feature too that makes pairing less of a hassle in some cases. Without too much thinking i went ahead and purchased it. I still do not regret buying it as it suits my wants and needs really well. There is not much to complain about the sound too. In fact it sounded better to me than its rivals. I am able to stream music to it through my Samsung Galaxy note 2 mobile phone and my windows computer too. However listening to music over Bluetooth with my windows 8.1 computer is not aesthetically pleasing to the ear as it connects to it in the headset mode. And as we all know headsets don't sound good at all and the windows 8.1 sound over Bluetooth connection doesn't make a difference. I attempted to make it connect like a regular headphone but still couldn't.
So now lets discuss a few important specs. The manufacturer claims it to be able to reproduce sounds from a very low 10 Hz to a very high 22000 Hz. However i doubt anyone could actually claim to hear such low and such high frequencies. The diameter of the voice coil is 40mm and a Neodymium provides the magnetism. I supports A2DP, AVRCP, HFP, HSP bluetooth profiles and therefore should be compatible with a wide range of Bluetooth music devices. The built in LI-Polymer battery provides a long 9 hours of listening and it suits almost everyone's need.
Overall i am happy with regard to this headphone and i can certainly recommend it to anyone who requires a decent headphone for a reasonable price.

Tuesday, June 14, 2016

Linux tricks

Hello guys,. Welcome to my blog post on linux tricks. I am a long time windows fan and still use windows on my primary home computer. However i use a mac at work because i do IOS development. Nevertheless i use linux every now and then.

Here are a list of useful linux commands to learn

reload .bashrc file without having to reboot linux

source .bashrc

How to share a folder on linux using samba and connect to it through windows

open /etc/samba/smb.config

and add the following text

[share]
    comment = Your Comment
    path = /srv/samba/share
    browsable = yes
    guest ok = yes
    read only = no
    create mask = 0755

Save the file and restart samba server. (Command :- smbd stop and then smbd start ) Now enter ifconfig command to determine the ip address of linux. Now since you know the ip address you can map network drive under windows.


MySQL Short Notes


Connect to a MySQL server instance

mysql connect to remote sql servermysql -h 192.168.94.80 --port 3306 -u username -p

Granting a remote user access to a mysql dbms

log into mysql as root user and enter the following command
GRANT ALL ON *.* TO bar@'192.168.1.10' IDENTIFIED BY 'PASSWORD';

here grant all means granting SELECT, INSERT, UPDATE, and DELETE to a particular user.

Now by having *.* means that we have selected all the databases

bar is the username of the remote user

'192.168.1.10' = is the ip address of the remote user's computer

IDENTIFIED BY 'PASSWORD' = sets the password

Add sql db script to mysql mysql --user=username --password=password < sqlfile

Log all queries that mysql server executes

1.) Open my.ini file

2.) Locate [mysqld] and below that enter the following line

log=log.txt

3.) Restart mysql server

Now the log.txt will be created inside the mysql data folder.

Eg:- “C:\Program Files\MySQL\MySQL Server 5.0\data\log.txt"

Restart mysql server on windows

Open command prompt and enter the following commands
net stop mysql net start mysql

Find out what port MySQL is using / Change port mysql is using

Sometimes you forget the port mysql is running on.

Solution :-

1.) Open my.ini file

2.) locate [mysqld]
# The TCP/IP Port the MySQL Server will listen on port=3306

You can change the port mysql listens to my by assigning a new value to port. After that make sure to restart mysql server.