How to fix compile error in Android application where strings.xml contain invalid characters

I created an application with a string-array in the strings.xml file. Unfortunately, I left some apostrophe in one of the string values that was: D’Souza

Obviously, at compile time, the Android Studio 2.2 IDE threw an error about invalid characters not preceded by a \. I should have actually put the string as: D\’Souza

Now, . . . → Read More: How to fix compile error in Android application where strings.xml contain invalid characters

How to install and run Turbo C 2.01 for DOS in DOSBOX in linux

After sooo many years, discovered that students in India were asked to do projects in Turbo C 2.01 in DOS. Amazing, but true!

That being the case, you can download Turbo C 2.01 for MS DOS from http://edn.embarcadero.com/article/20841 for free. It is antique software and embarcadero acquired it way back. They offer it as a . . . → Read More: How to install and run Turbo C 2.01 for DOS in DOSBOX in linux

How to amend default user name and email before committing code to remote github repository

If you commit the code to a local github repo with the default user name, you will get the message as shown below: $ git commit MumbaiStock.pm -m v1.5 <enter> [master 24fea3] v1.5  Committer: wronguser <wrongemail@wrongdomain.com> Your name and email address were configured automatically based on your username and hostname. Please check that they are . . . → Read More: How to amend default user name and email before committing code to remote github repository

How to update or commit code changes from local github repository to repository on github

A user can make changes to code in their local folder (in this case, MumbaiStock) and then update or commit  that code into the github repository.

Below is the user information: github User ID is userid github User Name is “UserFirstName UserLastName” github User Email is “user@emailsystem.com”

To update github or commit code from the . . . → Read More: How to update or commit code changes from local github repository to repository on github

How to fix Eclipse Tab Size, Spacing between menu options and more in Xubuntu 16.04 LTS

Using Numix as the theme on Xubuntu 16.04 LTS, we find that Eclipse IDE toolbars, fonts, menus have excessive spaces between them. They look too big and take away screen real estate forcing you to scroll more.

If you change the Settings -> Appearance to Greybird and Settings -> Window Manager to Daloa or something . . . → Read More: How to fix Eclipse Tab Size, Spacing between menu options and more in Xubuntu 16.04 LTS

Android Virtual device emulator not starting up or very slow with error sh: 1: glxinfo: not found

Android Virtual device emulator not starting up or very slow with error sh: 1: glxinfo: not found takes a very long time to start the emulator and finally returns with an error.

To resolve the above error, do following: $ sudo apt-get install lib64stdc++6 <enter>

Then create a link to the new 64 bit libraries . . . → Read More: Android Virtual device emulator not starting up or very slow with error sh: 1: glxinfo: not found

How to code multiple line tooltips with bold text

Many Java programs use tool tips in Java Swing to display more information when the mouse cursor hovers over a button or text field. There is a method of making text within that tool tip bold, italics, colored and more. Below is an illustration of the command that uses HTML tags to display that formatting . . . → Read More: How to code multiple line tooltips with bold text

How to close the program in Java completely in Swing

A Java Swing application can be closed using the following code segment to retrieve the parent of the container, check if it is a JFrame and then dispose the JFrame:

public class btnCancelListener implements ActionListener { public void actionPerformed(ActionEvent ev) { Container bframe = btnCancel.getParent(); bframe = bframe.getParent(); while (! (bframe instanceof JFrame)) { System.out.println(“Done”); . . . → Read More: How to close the program in Java completely in Swing

How to display message dialog in Java Swing using JOptionPane.showMessageDialog

Following code segments shows how to display a message dialog in Java Swing:

import javax.swing.JOptionPane; JOptionPane.showMessageDialog(mainFrame, “Data processing has been completed”);

where, mainFrame = the parent frame in which the dialog should be displayed. mainFrame can also be replaced with null.

How to disable File Name Input in JFileChooser in Java

JFileChooser is a very powerful Component in Java. It even enables filtering of file names. However, there is no direct method to prevent a user from entering the File Name input in it.

The following method disables the JTextField File input text box in  JFileChooser, by basically taking the JFileChooser as a Component, looking for . . . → Read More: How to disable File Name Input in JFileChooser in Java

May 2017
M T W T F S S
« Mar    
1234567
891011121314
15161718192021
22232425262728
293031