Wednesday, 21 October 2015

How to make chrome stop from suggesting a particular url



Have you ever tried to type starting of a url in google chrome and saw some weird suggestions? Or may be you visited a site once in your life for me it was "www.iss.k12.nc.us" and later if you just type iss for anything this suggestion would show up every single time. This is even true when you have bookmarked a different site with similar initial name like "https://lss.at.ufl.edu" which happens to be my universities site. I visit this site often but I find whenever I type "iss.." something, chrome just gives me “www.iss.k12.nc.us". Every single time. It was annoying. But after googling for solution I found that we can point to this url while search and press shift+ delete and that will delete it completely. But this doesn’t work if you are on mac. I tried many times but failed and this was so frustrating. I don’t want other to go through this so here it is. Solution is also at this link.

Problem: Stop chrome from suggesting same url again and again on mac.
Solution is use this key combination: fn+command+delete.
Note:
fn as in function key
command is command key
I understand that solution is simple( wont’ say trivial) but still it is worth sharing.
I hope this blog comes first in search so that other users can save some time. Please tweet and share it on Facebook if you found this solution helpful.


Friday, 7 November 2014

MOTO E Charging problem


So after my beloved Nexus 4 was stolen i have to get another stock android smart phone and i decided to go with Moto E. This decision have nothing to do with my parsimonousness, if anything reason were perhaps sdcard feature(not present in Moto G) and smaller screen with lesser resolution giving more than two and half day of battery life. Combined with me begin not techsavy Moto E was perfect.
Until one morning my phone stopped charging or connecting/mounting on my mac as a media device. I tried rebooting and various other normal futile debugging exercises. Solution was apparently very simple. All that I had to do was turn the USB Computer connection type from Media Device(MTP) to Camera(PTP).

Problem:

Moto E not charging with usb or power cable. And not showing on computer as media device.

Solution:

Change the USB Computer Connection type from Media Device (MTP) to Camera(PTP).

Reason:

Don't know for sure. But I think this problem might have started when I unknowingly disconnected mobile from my Linux/mac without proper unmounting. I am just guessing here.

This problem is still present i.e. i am not able to charge my mobile in MTP mode.  
Having received  more than 10K viewer on my previous post relating to Nexus 4 usb charging problem solution I thought this post might help another lost soul, so here is the reason i am posting it.
I am trying with many other kind of combination for debugging but if someone finds the solution for same please let me know.

Peace.

Sunday, 1 December 2013

Compiling/building Banshee from source and starting development

Banshee is an popular open source audio player. I tend to use it all the time on my ubuntu.
This post contains steps for a rookee/newbee to start with development of banshee and in some sense with any open source project. Most of the steps can be read on this official link.
But there are steps/issues that are not mentioned there and it would take some time for new person to google it out so listing/adding them here.

Environment: Ubuntu 13.10 - 64 bit
Note: Become root first,

sudo -i

1. Installing dependencies:
sudo apt-get install git-core autoconf automake libtool intltool gcc make libgconf2.0-cil-dev libgconf2-dev
sudo apt-get build-dep banshee
sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev

If you get error while running autogen.sh while it checks for dependencies like boo/gmcs not found. And you won't find the package name directly as they are not named as reported by the autogen.sh script.
Install below two packages

sudo apt-get install  libboo-cil-dev
sudo apt-get install mono-gmcs

Perhaps you will receive some other error and have to google it out anyway but above two dependency where not met for me on fresh installation and after installing all the other listed dependencies on official site. After these two it was all worked fine...

2. Get source code:
This step is easy

git clone git://git.gnome.org/banshee
cd banshee; git checkout stable-2.6; cd ..
3. Building, Installing and Running

cd banshee
./autogen.sh

If you have all the dependencies as mentioned above it should be all fine, but if it is not then which ever dependency is not met you need to find the package name which contains it and install it( ya basically google it out)
To build banshee just type
make
from command line in banshee directory

Now problem may come when you are trying to run it as it did for me while i was trying to run it using
banshee&
from command line.
I got following error.
Something like this

  1. Unhandled Exception: System.MissingMethodException: Method not found: 'System.Type.op_Inequality'.
  2.   at Hyena.Gui.Dialogs.ExceptionDialog..ctor (System.Exception e) [0x00000] in <filename unknown>:0
  3.   at Hyena.Gui.CleanRoomStartup.Startup (Hyena.Gui.StartupInvocationHandler startup) [0x00069] in /root/banshee/src/Hyena/Hyena.Gui/Hyena.Gui/CleanRoomStartup.cs:60

or something along the lines of

Missing method System.Reflection.PropertyInfo::op_Inequality(PropertyInfo,PropertyInfo) in assembly /usr/lib/mono/2.0/mscorlib.dll, referenced in assembly /usr/lib/mono/gac/glib-sharp/2.12.0.0__35e10195dab3c99f/glib-sharp.dll

Unhandled Exception: System.MissingMethodException: Method not found: 'System.Reflection.PropertyInfo.op_Inequality'.
  at Gtk.ListStore..ctor (System.Type[] types) [0x00000] in <filename unknown>:0 
  at Sysinfo.Sysinfo..ctor (System.String[] args) [0x00000] in <filename unknown>:0 
  at Sysinfo.Sysinfo.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Method not found: 'System.Reflection.PropertyInfo.op_Inequality'.
  at Gtk.ListStore..ctor (System.Type[] types) [0x00000] in <filename unknown>:0 
  at Sysinfo.Sysinfo..ctor (System.String[] args) [0x00000] in <filename unknown>:0 
  at Sysinfo.Sysinfo.Main (System.String[] args) [0x00000] in <filename unknown>:0 


Reason for it is
Mono tried to run an application using the 2.0 profile using libraries compiled for 4.0.

So you have two options for solving this...
1. Make complete rebuild with correct compiler-- gmcs , ( i did not opt for this option so not going in depths of it...)
2. Make a workaround in a single file which will force banshee at runtime to use version 4.0

Just type

vim `which banshee`

Basically it will open the file which will be used run banshee(as we used managed language)

Search for this pattern in file

exec_args="-a $BANSHEE_EXEC_NAME

Full line will be like
exec_args="-a $BANSHEE_EXEC_NAME  $MONO_OPTIONS $MONO_EXE $BANSHEE_DEBUG $BANSHEE_CLIENT"

and make it like

exec_args="-a $BANSHEE_EXEC_NAME mono --runtime=v4.0 $MONO_OPTIONS $MONO_EXE $BANSHEE_DEBUG $BANSHEE_CLIENT"

Basically adding mono --runtime=v4.0 
Well this made my day and i was able to run my first opensource project compiled from source.
I had help from knocte from xchat...gimpnet(#banshee) Thanks a lot...

If you want to use monodevelop you will need to do the same change in the preference of the mode you are running it.
Steps
go to Run-->Run with --> Custom Parameters... --> Mono options

In the list search for

Runtime Version

It should be at bottom half
Change the value from empty to v4.0

This should be it.

Tuesday, 3 September 2013

Nexus 4 battery saving Tips/Technique

This post contains tips to save the battery on nexus 4. If you are fine with one day of battery usage you can close the tab. It is especially for not tech savvy people who want their standby time to be good and also features when they need it.
Of course normal instruction/guideline to save battery are included. Even after following these normal instruction that are published every where if you are not getting good battery back up from nexus 4, this is for you. No app grap!
By no way is nexus 4's battery worse or bad. It is just that you as a person using it need to be sensible/rationale, for example if your phone is trying to receive a signal from a object that is a distance of 36000 km--every single second of its operation and that too without LOS( line-of-sight) you should know every bit of the battery will be used and signal that will be received will be, more often then not, too sporadic to be of any use. So it will be useless. Agree? So turn the GPS off when you don't need it.
This is when you use GPS inside your house perhaps on cloudy day.

This on stock android 4.3.* unroot

Normal instruction
1. Location update switch off. It will kill your battery in 20 hours
2. Turn off NFC, most of the time you won't need it.
3. Try to do main data  transfer on Wifi. Network data transfer turn off
4. Make google auto-backup turn off also. You don't need every photo backed up, do you? At least i don't.
5. Try never to use google now. This is for Indian users especially. If you are not that much into using google now features, it makes sense to not activate it.

Now after you have done above thing, just make sure of some/below points. As i have seen many  people asking that 'even after following all this instruction there nexus 4 last only a day'( One day is less for them as they are coming from nokia handsets which easily use to work 4 days)

1. If you have Turned off the location update but you see that google framework in battery stats taking lot of memory. Perhaps equal to your onscreen time. Or worse is keeping you cpu always live/active. This is because of (kind of) hidden setting. First time you start using google now, it will ask for your permission for location update which you gladly give and forget about it. Even after you are not using the google now or have turned it of, google will go on sending you location information.You ask how and why? why i don't know, how i will tell you. In setting of google now, go to "Privacy & accounts" --> "Google Location Settings" Check off and disable Location reporting, location history. This is the main reason google framework was taking so much of batter in background. Now you will see that standby time increases significantly.

2. If you have done above steps and still not getting good battery life then there is one more thing that you could do. Google have many insidious ways to get user-location from many pre-installed apps. Google please don't do that. This time go to google+ settings from settings menu. Then to Location sharing then you will see ( most probably ) location sharing as on. i think this options reports your location even if you have gps turned off perhaps through wifi. I am no privacy freak but i would like to save battery ( especially standby time) and privacy is added effect. You might have turned it on while you first logged in google but forget about it from then on. Remember this is different from above steps as previous step was for system wide settings but this one is for google+ app only. Though google+ will tell it won't change much ..blah..blah.. but really telling it matter. So go do it if you need it.

3. I think it may be little perspicuous to pro android users but some are still oblivion towards internal of android memory/process management so would like to share my experience. People tend to think if they press home(middle) button as they get to home screen, process they where running is either closed or stopped. Not necessarily and if you see the memory usages you find your answer. So the other day i was searching for good wallpapers, which i found many , i did not close the chrome, one of the heavy apps, and let it run for 5 hours. Then when i checked battery i found chrome have drained 20 percent of battery in 5 hours even in background. That is preposterous to me. I think google apps get some kind of preferential treatment. So i would suggest to close an app from task bar key, right key. That is more correct way IMHO.

4. Use Battery Doctor, i am not a developer of this app but a satisfied user. It contains many useful tips to improve battery life. Below tips are from that app only.
  1. Try to avoid USB charging because the the current is lower and it will take longer to charge.
  2. Device need to breath and some cases prevent this from happening. So if you find your phone is heating up then remove the case.
  3. Please do a full charging regularly. To maintain lithium batteries run a full charging once a month.
i would add more tips as i get time/experience.

If you have some suggestion along this lines, please please , share. It takes a lot of head hitting for single person to figure out all the mysterious things google do.

Edit1:
After using Nexus 4 for more then 8-9 months i can safely say using above point will not make drastic changes to your phone charging patterns.
I have found it does not matter how much i use my phone it gets discharged in a day, with full functionality on ... like google now, location update, gps etc.  And so i have to charge it at night.
If i don't use all the features then i would save, say 30-40 battery life at the end of the day. Either way i have to charge it as i can't go around other whole day with that much charge...so why go down on features...Use them.
I believe it is in some way google's policy to push people to use there product especially google now..










Wednesday, 21 August 2013

Essays on Meditation - A personal

Below are my personal  (non ctrl-c && ctrl-v ) non bookess views on meditation. A process which I have cherished for activating certain energy centers in body to feel or perceive well-being unconditionally.


I consider that meditation is an addiction to peace. Or silence or whatever you want to call that feeling of independent thinking and thoughtless awareness. As simple as that.Some may say it is higher concentration, some say it is special form of concentration on God, Some are of view that it is door of immense blissful state and so on. It may all be true, but in real sense , if you are a beginner it is just that peace that brings you back to sit quickly for few minutes during day, not so much for others as for your own good because you value your internal peace as well. Meditation is an addiction to silence, your true identity, your true love for your higher self(which you are not sure exists till now perhaps just read about it) , to find a place where you fit-in in this world without conditions.


You would love to be in that serene moment of liquid peace , when thoughts seems to vanish for good, when you begin to feel happy, joy, free all for no reason, It is like completely out of blue that you feel like for first time you observe your mind from a distance, giving you insight about what makes you happy and sad, and these emotional waves can be seen as you are standing on shores . You just become your own in-active observer. You know the difference of what is mine and what is me. It is like in pristine water you can see the fishes-thoughts in it, some fishes are nice, some look great and some just plain tempting. But you are observing them from a distance you do not intend to swim in between them. This birds eye view helps to sort out some of the issues in your life so easily. Because in this moment, when you see your thoughts sprouting from every corner of your mind you actually become aware how uncontrolled they are and want to take control of them as you view them your only reason of restlessness. These thoughts are like weeds which can only be seen or removed during this lovely time of meditation.You take inspiration for the thought that what is restless or in motion will some day ceases but which is still, persists. You begin to explore the truth behind the statements(whose existence you doubt) or truth in our scriptures i.e. Gita, kuran , Bible. And though they seem to trouble you otherwise in normal consciousness but while you in the stillness you don’t feel so much distance from them. It feels like they are obviously true. How could i have missed those?



When it is said to so many people that they are souls and should not worry too much about this world they just can’t feel that way deep inside them, And they are not wrong in not having those feeling either . Actually thing is this , You can only know that you are soul if you meditate.  Until then everything that others say you can just appreciate for their effort to make you happy. But you will not be able to feel a word what they say until you actually want to feel, what life is by giving yourself some silent time.


You feel life more intensely when you meditate. You become more aware of your small moments of joy, happiness whether with your loved ones, with your friends or with your own self.
It gives you chance to analysis your life in your own terms and not what others think of it or want to think of it as. If you move around you can see people who can’t even smile there  true smile, and when want to cry they don’t know what to do, neither can they laugh or cry,  It is like they have a hole in their hearts , it there life is so hollow they can’t seem to find the meaning of what is going in there life, everything is out of control . For such people , if only they sit to meditate they can figure out all the subconscious problems that are effecting them in-directly and making them feel life less  than what they are supposed to. I think life is wonderful and believe me it can be only if you make an effort to invest in your own too. You will love what meditation can give you.


Every learning is an mediation , you need not sit silently in a dark room always,  though it is preferable in most case. You can still be your self, your higher self at work if you just concentrate at the work with utter devotion. It is easier to reach to level of no thoughts if you have only one thought to leave, It is easier to renounce if you only have your need to look out for :)


Someone said we are what we are between our thoughts. Meditation is just a way to realize that.
Small gaps in between your thoughts gradually bloom into longer periods of quiet mindedness, and then those periods of quietness start to lengthen and deepen until one day, you find that you are able to sink into prolonged states of profound, blissful stillness.


Meditation is probably the best form of prayer. A silent one but never-the-less most effective. Both scientifically and personally. As i always believe”PRAY. it always works”. It is silent prayer of soul to universe to break the web of bounds and make it free. Like a drop ardently seeking to join ocean.If only i could emphasise this metaphor more than enough.


More you meditate you realize a subtle truth about your body. Your consciousness will present you with a realization that this bundle of energy is more like a attire. Which you ought to leave sooner than later.

To be continue....

Sunday, 11 August 2013

USB Charging problem solution on nexus 4 android 4.3 update


Hi Amigos,
Nexus  4 have been my apple of eye from the day i held it in my hand with back ground thought every new update will make it more better/efficient. I fell in love with that idea. But Android 4.3 update uprooted it.
Just to give you a hint of kind of distress i was in.I was musing (hard to think of sharing something which you love )about selling it at cheap price because of this problem. Thank god i did not.

Problem: My nexus 4 would not charge(power) when connect to USB or Power AC when turned on. Neither was it detecting as MTP device on both windows/Ubuntu. Tried different PCs/OSs/Cables etc.
Current state: Problem is not completely solved i.e. Phone is still not detected by my PC but it is charging  both from USB and AC(wall in American way :) ) And i am on cloud nine. For gods sake i don't have to sell or waste any more time on it.
Things that i Tried that did not work.
1. Enable USB debugging in developer option. In every forum i visited i found this one given. Did not work.
2. Make USB connection to MTP or PTP from USB computer connection in storage of settings. Did not work.
3. Tried to remove SIM card --> Turned off --> Turned on --> USB charge connected. Still not charge.
4. Tried removing cache, temporary files , uninstalling most recent app thinking it might be because of some incompatible app. Did not work.
5. Tried Factory reset. Three times. Lost all the data. Still did not work. Felt Hopeless.
6. Tried with Nexus toolkit (new version) as phone was not getting detected at all it also did not work.
7. Tried downloading ever USB app found on the app store thinking may be it would show up some information. One app out of these helped in solving this problem though.

So what did work? To be truthful i don't know either but i will state the steps. Please don't try to judge me with kind of irrational things that i try or try to find rationale of doing what i did. I was desperate.

Steps

1. Turned the phone off --> connect USB -----> charging.
2. Turned it on ---> connect USB ---->> not charging.
3. Turned MTP off, usb debugging off -->> still not charging
4. Tried USB host Diagnostics app --> click "start diagnostics" then follow instruction.If you are lucky phone will start recharging now. I was not that lucky.
5. Took the sim card out.
5. Switched the phone off.
6. Turned it back on and Tested the same test i.e. "start diagnostics". This time i got a different screen
something i never got.


And as you can see battery started recharging...Volllaa...  i was so happy that moment.

I am not the developer of this app.
I am not hundred percent sure it would work for all or not but just thought i might help some one in distress like me.
As of now nexus is charging but not detected by PC/linux. If someone finds a way to do same i would give my love to her/him(no :) ).
Edit:1 After step 3 i also uninstalled the updates of goggle play services. To be safe you can uninstall all the updates that you can uninstall that came with 4.3 android as you can install it any time later until we know the RCA ( root cause) of this issue.

Edit:2 (date:21st August 2013)
Timothy Yuen Commented below and for some mysterious reason deleted the same.With the thought it might help someone else i am putting it down. This is my request , please don't be shy/anything to share.. It is in general good of fellow human beings..

"
I had the same problem and couldn't get it to recharge, and had tried all the steps (MTP on/off etc).

And then it worked.

Current settings before getting it to work
- MTP is checked
- Phone is turned on
- Galaxy nexus phone
- never took off SIM

My steps
- turned on wifi (so i could download the app. i just didn't want to use my data on the mobile plan).
- downloaded and installed the USB Host Diagnostics App
- opened the app (and wondered what I had to do)
- with usb cable connected to computer, i connected the other end to the phone.
- and then the message 'Connected as a mobile device'. Woohoo, it's charging as well now!
 "

Tuesday, 9 October 2012

How to be an Excellent Programmer


Below is something i found other day while surfing. Thinking it will help fellow programmers, i thought i better make a post out of it.

1. Choose a small subset of available technology, learn it intimately, and embrace it. Then evolve that subset.
2. Understand the pros and cons of various data structures, both in memory and on disk.
3. Understand the pros and cons of various algorithms.
4. Understand your domain. Get away from your computer and do what your users do.
5. Be ready, willing, & able to deep dive multiple levels at any time. You must know what's going on under the hood. There is a strong correlation between "number of levels of deepness understood" and "programming prowess".
6. Use your imagination. Always be asking, "Is there a better way?" Think outside the quadralateral. The best solution may be one that's never been taken.
7. Good programmer: I optimize code. Better programmer: I structure data. Best programmer: What's the difference?
8. Structure your data properly. Any shortcomings there will cause endless techincal debt in your code.
9. Name things properly. Use "Verb-Adjective-Noun" for routines and functions. Variables should be long enough, short enough, and meaningful. If another programmer cannot understand your code, you haven't made it clear enough. In most cases, coding for the next programmer is more important than coding for the environment.
10. Decouple analysis from programming. They are not the same thing, require different personal resources, and should be done at different times and places. If you do both at the same time, you do neither well. (I like to conduct analysis without technology at the end of the day and start the next morning programming.)
11. Never use early exits. Never deploy the same code twice. Never name a variable a subset of another variable. You may not understand these rules and you may even want to debate them. But once you start doing them, it will force you to properly structure your code. These things are all crutches whose use causes junior programmers to remain junior.
12. Learn how to benchmark. Amazing what else you'll learn.
13. Learn the difference between a detail (doesn't really make that much difference) and an issue (can end the world). Focus only on issues.
14. Engage your user/customer/managers. Help them identify their "what". Their "how" is not nearly as important.
15. Write a framework, whether you ever plan to use it or not. You'll learn things you'll never learn any other way.
16. Teach others what you know, either in person or in writing. You'll accidently end up teaching yourself, too.
17. Always tell your customer/user "yes", even if you're not sure. 90% of the time, you'll find a way to do it. 10% of the time, you'll go back and apologize. Small price to pay for major personal growth.
18. Find someone else's code that does amazing things but is unintelligible. Refactor it. Then throw it away and promise yourself to never make the same mistakes they made. (You'll find plenty.)
19. Data always > theory or opinions. Learn the data by building stuff.
20. At some point, run your own business (service or product). You will learn things about programming that you'll never learn as an employee.

21. If you don't love your job, find another one.


one from me too :)
"Always ignore advice that begins with the word "always". The use of "never" is never a good sign either"

Ram ram
Varun

 
 
Copyright © Ramanjali
Blogger Theme by BloggerThemes Design by Diovo.com