Posts

Showing posts with the label Search

Better Way To Find Index Of Item From ArrayList

Answer : You can use list.indexOf() , but in order to make it work, you need to override equals and hasCode of your POJO . By default, two objects will be considered equal if they have the same reference. You can overwrite equals to work for your case: public boolean equals(Object o) { if (!(o instanceof POJO)) { return false; } POJO other = (POJO) o; return name.equalsIgnoreCase(other.getName()); } Overridding equals would suggest you override hashCode . For example: public int hashCode() { return name.hashCode(); } Finding element in this way where complexity would be give you BIG-O (n). I think if you Map that would gives you better result. HashMap would be better choice. - Where Complexity would be O(1). If you need to search on a string value you should use a HashMap instead of ArrayList .

Change Chrome Omnibox To Use Google's NCR Link

Answer : It's not working because you haven't edited [google:baseURL] . Use this string https://www.google.com/search?q=%s EDIT: See comments Edit Sept 2015: This doesn't seem to work any more. There's a better way. If you edit the search string in the Preferences, you won't get autofill results. If you do it this way, you will. Change Chrome's Search Engine to Google.com: http://googlesystem.blogspot.ca/2013/07/change-chromes-search-engine-to.html Type google.com/ncr in the address bar and search for something Close Chrome Launch Chrome again, open a new tab and search for something using Chrome's omnibox. You should see an infobar that asks you: "would you like to search with google.com instead of [your local Google domain]?"

Can I Search In The Terminal Backlog In Terminator

Answer : Terminator has a built-in search (ctrl-shift-f is the default keybinding), but it doesn't highlight the found text, which makes it fairly useless. There's a bug open against terminator to fix this, but right now it's still unresolved: https://bugs.launchpad.net/ubuntu/+source/terminator/+bug/271487 This actually has been resolved for terminator 2.1 , yes good things do happen in 2020. However it's not on the repo yet, but you can clone the github terminator repo And follow the steps form install guide Basically it will take you to git clone git@github.com:gnome-terminator/terminator.git sudo apt-get install python3-gi python3-gi-cairo python3-psutil python3-configobj \ gir1.2-keybinder-3.0 gir1.2-vte-2.91 gettext intltool dbus-x11 # In the folder where you've cloned the repo python3 setup.py build python3 setup.py install --single-version-externally-managed --record=install-files.txt you should be able to spawn a terminal from...