Run Windows Files Requiring JRE on Ubuntu

There are certain windows files that need JRE (Java Runtime Environment) and therefore doesn’t run on Ubuntu. There are two reasons for that.
  1. Even if you have latest Linux version of JRE installed, the Windows application will not detect it when you run it through an application layer like WINE installer.
  2. If you download the Windows version of JRE and try to install it through WINE, then it would make your system unstable, and even in this case, the program will not detect JRE installed.

The good news is — you can run such programs like Minecraft that need Java runtime environment by leveraging Java’s cross-platform capabilities. If you don’t have Java installed then, you can get java here.

Here are the steps

  1. If the software you are planning to install is in .exe, then go directly to step #3. If it is in any other form, then use an extractor. One of the common extensions is .msi, and for this file type, you can get .msi extractor by typing the below command in your terminal.                                                                                                                                                                                    sudo apt-get install msitools
  2. Then, extract the file. Say, if your target file is in .msi, then type the below command in your terminal
                     msiextract (FileName).msi
    Note: Replace (FileName) with the name of your file. So for instance, if the name of your .msi file is “blue”, then the command should be msiextract blue.msiWe do all this to convert the source file into .exe format.
  3. Go to the directory of installed program. Program Files/(FileName) by entering the below command

    cd “Program Files/(FileName)”                                                                                                                                                      
  4. Extract the EXE file now. You can do that by entering below command                                                                                                                                                                                                                       unzip (FileName).exe                                                                                                                                                                                 
  5. After extraction, your terminal will run through a screen, which will display some data. Now from that data, check the main-class.
    It will have two names separated by comma, like filename.FileName (Notice the capitals in the second string)
  6. Copy the name of main-class and substitute  “.” (dot) with “/” (Forward dash).
                                                                                                                                                                                                                Java MainClass

Congratulations! Your .exe program which requires JRE is now running on Ubuntu.

Delete Facebook Photos in Bulk — Step by Step Solution

There are some facebook albums which can be deleted directly, but there are some others, which cannot be deleted and hence you are required to delete one photo at a time. If you have a lot of photographs, then it can get tedious.

In my case, I deleted about 8,000 photographs — in about 20 different albums. Such things are repetitive, and you should let your computer handle it. I have broken down the entire process in 8 simple steps.

So here’s a step-wise solution that explains how to delete facebook photos at once.

Step1 : Get Imacros Browser ExtensionScroll down to the bottom of the page, and select the imacro extension compatible with your browser.
Reason This lets you automate a task.

Step2: Once you install imacro, the addon will appear on the top right of your bar (If you are using Chrome, Firefox or IE), click on it to open iMacro Dialogue box

Step3: Now, at the bottom, there will be a record button, once you click on it, there will be an option call “record macro”. Just click on “record macro”, and then immediately click stop. A pop-up window (with heading – #current.iim] would appear.

Step4: In that #current.iim window, select all and delete (ctrl+a and delete on windows; cmd+a on mac). Then, paste this imacro code to bulk delete facebook photos.
SET !ERRORIGNORE YES

WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:”Open Photo Viewer”
WAIT SECONDS= 5
TAG POS=1 TYPE=SPAN ATTR=TXT:Options
TAG POS=2 TYPE=SPAN ATTR=TXT:”Delete This Photo”
TAG POS=1 TYPE=BUTTON ATTR=TXT:Confirm
WAIT SECONDS=2

 

Step 5: Now click save as & close (Make sure you click on “save as and close” and not “save ans close”). Name the macro as “delete facebook photos bulk” (It can be any name that you want, but I suggested this name just to streamline things).

Step6: Now, you will see the macro in under your bookmarked imacros (in the imacro window).

Step 7: Select the macro that you just created (“delete facebook photos bulk” or whatever you named it), and then click on the “play” button below. Once you click on it, there would be a box asking “play macro repeatedly”. You can put any number up to 100.

Step 8: Hit the button “play loop”.

This will keep deleting your facebook photographs one by one.

 

If you need any further assistance, feel free to drop a comment, and I will help you asap.

Install Python Modules Through Pip and Bypass Windows Error

The two most common reasons for the failure of python installation module through python pip are:

  1. If you have more than one Python programs. For instance, if you use both the official Python and Enthought’s Canopy flavor of Python.
  2. If you don’t run programs with root privileges.

The module installation access denied error looks like this on the Windows PC. It reads “this app can’t run on your PC. To find a version for your PC, check with the software publisher.”

This technical guide has the solution to both these instances — in a step by step process.

  1. Add your Python Scripts directory to Windows environmental variable. (Skip this step, if you have already done this).If you don’t know your python scripts directory, go hit file–>save as on your IDLE, and the destination folder will have your scripts directory. To add an environment variable, go to windows search option, and type environment variable. Select “edit system environment variables”–> a dialogue box will open, under system variable, click on path –> add the scripts directory, be sure to include a semicolon (;) after the directory nameWhy is this step important? This is essential to let command prompt run “pip” command. if you don’t do this, it would not allow you to install using pip command.
  2. Now, go to command prompt, and type python -m pip install <module name>, so if you want to install a python module called “selenium”, type python – m pip install selenium.

    Why should you do this?
     This is sudo command in Ubuntu; this gives you a superuser access.
  3. You are all set, use this command to install just any python module using Pip.

If you still find it difficult, then watch the video below that I have made which explains the entire process. If you find any difficulty in entering an environment variable for python or installing a python module, then drop a comment and I would do my best to help you.

Easy way to find repetation of words in Excel

“Most humans use 2000 words in a language”, says an old adage. Although I do not agree with it, I still believe that word analysis is essential for everyone.

Suppose you are learning a language, how great would be it if you knew the keywords that most newspapers use. Or, if you are a technical writer who is tasked to write a highly specialized content that demands a specific vocabulary, in such cases, word analysis can help.

Even if you read newspapers, you are likely to find a few words that you may not pay attention to, but if you did, then you could improve your vocabulary. Or say if you are a content head, and want to check content for plagiarism, you could find the frequency of the words used, and make out if the content is plagiarized.

This article will help you understand how this can be done — in simple steps. All you need is Microsoft Excel installed on your computer.

1. Start your excel program.

2. Copy Any string, or piece of string that you want to perform a repetition check for. (I have posted the image just below step 3)

3. Go to “Developer” option on your Excel and click on Macros (As located in the image below)
4. Once you click there, assign macro a name (like, Find String Macro), and click on ‘create’ which is located on the right-hand side of the dialog box.

5. You will see a dialogue box, which would be blank, paste the code below.

Sub Fable()
Dim BigString As String, I As Long, J As Long, K As Long
         BigString = “”
For Each r In Selection
BigString = BigString & ” ” & r.Value
Next r
BigString = Trim(BigString)
ary = Split(BigString, ” “)
Dim cl As Collection
Set cl = New Collection
For Each a In ary
On Error Resume Next
cl.Add a, CStr(a)
Next a

For I = 1 To cl.Count
v = cl(I)
Cells(I, “B”).Value = v
J = 0
For Each a In ary
If a = v Then J = J + 1
Next a
Cells(I, “C”) = J
Next I
End Sub

6. Now, press Alt+F11 or click Excel icon on the top left (below file menu).

7. Select the cells that you want to run text repetition check for, and click on macros again, and select the macro that you just created (with the name you assigned in step 4).

Say you have data in cells A1 to A4, so, you need to first select all the four cells and then click on macro (So that it excel knows where to run the string repetition check).

8. You are done! now you will see two rows, one with the word, and second with the number of repetition of the word in the excel file.

Now, if you are learning a language like Spanish or English,  pick up the words that you don’t know, and put them in your flashcard or some other repetition list.

Copy-Paste more than One String at a time in Windows

Often, we wish if we could copy more than one piece of string at a time. It would have just saved a lot of time. But alas! our windows OS generally doesn’t give us this capability. If you think it isn’t important, just think for a minute, what if you saw 5 good websites that you want to open separately in a new tab? You would have to do Copy paste, over and over again, that’s tedious.

Control+c (cmd+c) and control+v (control+v) method allows you to copy one string at a time, and that is quite frustrating when you want to copy a lot of strings on the go. The good news is, there is a way to do it — all at once.

This is a very simple process for which, you would need to download autohotkey from https://autohotkey.com. I have used this software to building an autocorrect tool. If you don’t know how to set it up, then refer to the article on autocorrection.  Or, you can see the procedure below.

Once you are set, let’s begin. It is a very simple process which everyone can easily follow.

As soon as you have your script file open up, paste the below code in the notepad

^+1::
Send ^c
ClipWait
Clip1 := ClipBoardAll
return
!1::
ClipBoard := Clip1
Send ^v
return

^+2::
Send ^c
ClipWait
Clip2 := ClipBoardAll
return
!2::
ClipBoard := Clip2
Send ^v
return

^+3::
Send ^c
ClipWait
Clip3 := ClipBoardAll
return
!3::
ClipBoard := Clip3
Send ^v
return

^+4::
Send ^c
ClipWait
Clip4 := ClipBoardAll
return
!4::
ClipBoard := Clip4
Send ^v
return

^+5::
Send ^c
ClipWait
Clip5 := ClipBoardAll
return
!5::
ClipBoard := Clip5
Send ^v
return

^+6::
Send ^c
ClipWait
Clip6 := ClipBoardAll
return
!6::
ClipBoard := Clip6
Send ^v
return

^+7::
Send ^c
ClipWait
Clip7 := ClipBoardAll
return
!7::
ClipBoard := Clip7
Send ^v
return

^+8::
Send ^c
ClipWait
Clip8 := ClipBoardAll
return
!8::
ClipBoard := Clip8
Send ^v
return

^+9::
Send ^c
ClipWait
Clip9 := ClipBoardAll
return
!9::
ClipBoard := Clip9
Send ^v
return

^+0::
Send ^c
ClipWait
Clip0 := ClipBoardAll
return
!0::
ClipBoard := Clip0
Send ^v
return

In the above code, you can hover select the text and press control-Shift-(respective number) to copy, and alt (respective number to paste).

So, for instance, I want to copy “6789” and “1234”, then first I would select 6789, press control-Shift-1, and select 1234 and press control-shift-2. By doing that, I can paste 1234 when I press, alt-2, and 6789 whenever I press alt-1. This code lets you configure 10 keys which you can use to copy paste more conveniently, right from 0 to 9.

This would save you a lot of time, especially if you copy paste a lot — be it on the browser, or excel etc. If you run into any problem, then do not hesitate to drop in a comment, and I would do my best to help you.