Skip to main content

Posts

What is ProGaurd?

ProGuard is a class file shrinker and its full implementation details can be found here - https://stuff.mit.edu/afs/sipb/project/android/sdk/android-sdk-linux/tools/proguard/docs/index.html#manual/introduction.html

Its used highly in the android world - https://developer.android.com/studio/build/shrink-code
Recent posts

Can't scroll using arrows on excel

Usually, I use my arrow keys to navigate through my excel but lately, they (arrow keys) haven't been really helpful. Like at all!

The issue was I had the scroll lock "on". But I am on Windows 10 and I can't see the scroll lock function key anywhere :O

Here is how you can turn off the scroll key on Windows 10:
Press the Windows key.Type onscreen keyboard and press Enter.When the onscreen keyboard appears, your ScrLk (Or scroll lock button) will be highlighted which means it was turned on. Click the ScrLk button to turn it off.Go back to your excel and you should now be able to use your excel. Hope this helps!

Take screenshot using adb

Many times, when I am working with the Android devices, I just want to keep using the command line and be able to take the screenshots too.

Yes, we can do that!
Here is how:
Start ADB server if its not already running. To check, type in adb devices on the command line -- if its not started it should start now and give you the device id for the device you have connectedNow type in the following commands to capture a screen
adb shell screencap -p /sdcard/Pictures/Screenshots/screen.png adb pull /sdcard/Pictures/Screenshots/screen.png adb shell rm /sdcard/Pictures/Screenshots/screen.png

Ubuntu: "Unlock login keyring" message "the password you use to log in your computer no longer matches that of your login keyring"

Resetting all the keyring passwords: 

Navigate to Places > Home. Press ctrlh to view "hidden files". Navigate to .gnome2 > keyrings and deletelogin.keyring


Using the same keyring (resetting keyring password but keeping old passwords in keyring):


1) Make a backup of the keyring cd ~/.local/share/keyrings/ cp login.keyring login.keyring.backup and after that delete login.keyring file rm ~/.local/share/keyrings/login.keyring 2) Create a new keyring file from Gnome Keyring with the name "login" 3) Replace the new keyring file with the backup of the old keyring file cd ~/.local/share/keyrings/ mv login.keyring.backup login.keyring Note: before Ubuntu 12.10 the path to the keyrings folder was~/.gnome2/keyrings/instead of ~/.local/share/keyrings/

Can't wait to wait -- Webdriver Waits!!

Wait!!!

These four letters can drive you crazy if you are having a bad day using Webdriver...

Thus if you are reading this article you are already in the middle of one bad bad day...thus I'll cut the crap and go directly into the ways you can add waits using webdriver:


Type 1 - Using driver.manager.timeouts()Implicit Waits - When you set this wait, webdriver would wait for this amount of time before failing any command.Syntax - driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);Example - Webdriver is looking to find an element using an xpath and its not able to find it, webdriver waits for 10 seconds before trying to find the element and thus failing if it still can't find the element after 10 secondsPage Load Timeouts - When you set this wait, webdriver would wait for this amount of time to declare page load timeoutsSyntax - driver.manage().timeouts().pageLoadTimeout(100, SECONDS);Example - Let's say we are navigating from one page to another, when we reach the n…