August 10, 2018

Microsoft Excel Copy row values to another sheet next available row when the value changes

Hi friends,

My friend had given me a problem in excel of copy row whenever the values changed to another sheet next available row.

I have come-up with this following code

Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Application.Intersect(Target, Target.ActiveSheet.Range("A1:D1")) Is Nothing Then
        Application.EnableEvents = False
        Application.ScreenUpdating = False
        MsgBox ("Hi")
        Call ValueChange
        Application.EnableEvents = True
    End If
End Sub
Sub ValueChange()
        Dim lastrow As Long
        
        lastrow = Sheets("Sheet2").Range("A65536").End(xlUp).Row + 1
        Sheets("Sheet2").Range("A" & lastrow & ": D" & lastrow).Value = Sheets("Sheet1").Range("A1:D1").Value

End Sub

Hope it will help you.

Note:
Please share your valuable comments and feedback to psrdotcom@gmail.com

April 07, 2018

Android and Java latest integration changes for AVDManager and SDKManager non-working issues

Hi all,

If you haven't used your Android skills in recent times with latest Java then, you might come across a situation where the SDK Manager and AVD Manager are not working.

Issue

SDK Manager and AVD Manager are not working.

Environment

Java 9 with Android SDK 23

Note

Though, I am able to perform development using Android Studio but when it come to update the SDK build tools and others, I was not able to update with SDK Manager.

Solution


  1. Now, Android SDK Manager have moved to sdk/tools/bin with filename sdkmanager.bat
  2. Edit the sdkmanager.bat file with any text editor
  3. Go to "@rem Execute sdkmanager" command
  4. Update the command with options: -XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee 
  5. It should look like below after you add the arguments
    • @rem Execute sdkmanager
      "%JAVA_EXE%" %DEFAULT_JVM_OPTS% -XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee %JAVA_OPTS% %SDKMANAGER_OPTS%  -classpath "%CLASSPATH%" com.android.sdklib.tool.sdkmanager.SdkManagerCli %CMD_LINE_ARGS%
  6. If you run android-sdk/tools/bin/sdkmanager.bat, it should be able to run

Note

There is nothing like platform-tools folder now in Android SDK.

So, make sure that you have specified ANDROID_HOME/SDK in your environment variables with your system/pc Android SDK folder

In PATH environment variable, you can specify %ANDROID_HOME%/tools/bin

Thanks for reading my blog. Feel free to post your comments below. Contact me on psrdotcom@gmail.com

December 27, 2017

AP SSC (X / 10th) class board duplicate marksmemo / certificate and challan form

Hi friends,

One of my friend lost SSC certificate and applying for duplicate.

Required Documents:
1. Police FIR against lost certificate
2. Fill the Duplicate SSC Form (Link to Form)
3. Fill this Challan (Link to Challan) with 250 rupees towards the fee Payable at SBI Treasury Branch only
Note: This challan is available in SSC website under MNR formats

Hope you will get your duplicate certificate in quick time with this process.

August 29, 2017

Online classes video recording, screen sharing and screen recording software

Hi friends,

Here are the list of online classes video recording and screen sharing apps that can help you


  1. VSee
  2. Record your Skype Calls with these tools
  3. 14 day trail, Go To Meeting
  4. Apache Open Meetings
If you want to have just the screen recordings of your session from your end. You can use the following

  1. ScreenRecordings
  2. Microsoft Powerpoint recording of your slides
  3. Camtasia
  4. Screenflow
Please send your feedback and comments to psrdotcom@gmail.com

May 30, 2017

Compress folders/files and create .tar.gz (Tar archive with GunZip Compression) and .zip (ZIP compression) file in Java

Hi friends,

Today I will explain how easily we can compress files and folders in java.

I have used a third part library which so simple to use.

Download the .jar from the following URL
https://rauschig.org/jarchivelib/download.html

Now, create a java class and create .tar.gz and .zip files.

Sample source code

package gunziptest;

import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.rauschig.jarchivelib.ArchiveFormat;
import org.rauschig.jarchivelib.Archiver;
import org.rauschig.jarchivelib.ArchiverFactory;
import org.rauschig.jarchivelib.CompressionType;

/**
 *
 * @author psrdotcom
 */
public class GunZipTest {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // Archive file name
        String archiveName = "archive";
        // test is destination folder
        File destination = new File("test");
        // source folder has files and sub-folders
        File archive = null;
        
        // zip compression
        Archiver archiver = ArchiverFactory.createArchiver(ArchiveFormat.ZIP);
        try {
            archive = archiver.create(archiveName, destination, source);
            if(archive != null && archive.isFile()) {
                System.out.println("gunziptest.GunZipTest.main()" + "zip file created");
            }
        } catch (IOException ex) {
            Logger.getLogger(GunZipTest.class.getName()).log(Level.SEVERE, null, ex);
        }

        // tar.gz compression
        archiver = ArchiverFactory.createArchiver(ArchiveFormat.TAR, CompressionType.GZIP);
        try {
            archive = archiver.create(archiveName, destination, source);
            if(archive != null && archive.isFile()) {
                System.out.println("gunziptest.GunZipTest.main()" + "zip file created");
            }
        } catch (IOException ex) {
            Logger.getLogger(GunZipTest.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}

Hope, you will find this useful.

Please send your review and feedback to psrdotcom@gmail.com

May 24, 2017

Prevent from WannaCry Ransome attack by disabling SMB protocol on Windows 10

Hi friends,

I want to share my knowledge on disabling SMB protocol on Windows 10.

Procedure


  1. Click on Start Menu
  2. Type "Turn Windows Features On or Off"
  3. Uncheck the "SMB 1.0/CIFS File Sharing Support" as shown below
  4. Click on "OK"
  5. It will take some time to apply the changes
  6. You will be prompted with "Restart"
  7. Save your any unsaved work and restart the machine
  8. This is disable the SMB protocol, which is main reason to spread the WannaCry Ransome Attack


Please send your review and feedback to psrdotcom@gmail.com

May 03, 2017

Eclipse reset/enable workspace preference on startup

Hi all,

Today, I have come across a situation where I want to choose the one of the workspaces i have worked before.

In general, eclipse will prompt for workspace location on startup
But, if you have checked "Consider this as default workspace and don't ask again" option, then next time when you start eclipse, you won't get the prompt for workspace selection.

Re-enable/Reset workspace preference on eclipse startup


  1. Click on eclipse "Window->Preferences"
  2. Go to "General->Startup/Shutdown->Workspaces"
  3. Check "Prompt for workspace on startup" or use keyboard shortcut "Alt+w" 
  4. Now, exit the eclipse
  5. Start the eclipse
You should be able to see the workspace selection on eclipse startup screen.

Happy coding!!

Please send your comments and feedback to psrdotcom@gmail.com

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com