Showing posts with label Start. Show all posts
Showing posts with label Start. Show all posts

March 03, 2020

Run local file server with NPM http-server

Hi folks,

Today i'll explian the process of making your folder as a standalone file server.

Objective

Make my folder contents browse over http

Procedure


  • Install Node
  • Install http-server module in node globally
    • npm install -g http-server
  • Open terminal/command-prompt
  • Navigate to your folder
  • Run the following command to start the server
    • http-server .
  • or simply run
    • hs .
  • Run from anywhere with full path of the folder
    • hs C:\FileFolder
  • Starting up http-server, serving .
  • Available on:
    • http://10.10.6.2:8080
    • http://127.0.0.1:8080
    • http://youripaddress:8080
  • Hit CTRL-C to stop the server
  • You should be able to browse your file folder contents with any of the above URLs
Hope you are able to access your file contents over the browser

Tip: Using this approach, you can share your content over intranet/internet with full control over data as read only.

After stopped the server, access to the folder is stopped.

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

September 23, 2019

ADFS (Active Directory Federation Services) not starting after reboot

Hi all,

I have stuck with one of the problem where ADFS was not starting after rebooting the PC.

Solution from different sources worked for me

Try your luck.


ADFS not starting issue solution
  1. Start "Microsoft Key Distribution Service"
  2. Start "Windows Internal Database"
  3. Start "Active Directory Federation Services"
Please send your feedback to psrdotcom@gmail.com


February 22, 2017

Tomcat issue "windows could not start apache tomcat on local computer" after java update issue with resolution

Hi friends,

Today I have faced an issue with Tomcat service starting. I would like to share with you the resolution as well. Please find the details below.

Root cause

Updated java version

Resolution


  • Navigate to you apache installed folder
  • Go bin folder
  • Double click on "Tomcat(X)w.exe" where X the version of tomcat.
  • In my case it is "Tomcat8w.exe" because the version is 8
  • Select "Use Default". So that, it uses the JAVA_HOME version by default.
  • Click on OK
  • Start the Tomcat service and enjoy deploying


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

December 17, 2014

Android insufficient permissions for device

Hi Friends,

I was having an issue when connected my friend's Micromax Doodle to my Ubuntu with the following error
"insufficient permissions for device"

Resolution

  1. Open Terminal
  2. Kill the server by typing the following command
    • $ adb kill-server
  3. Now, start the server
    • $ adb start-server
  4. On your device, a pop-up might come asking for granting the permission
  5. Click on "Yes" for approving the access
  6. Now, check your device status with the following command
    • adb devices
  7. With the above command, you should be able to see devive IMEI and device name
Enjoy the Ubuntu and Android combination :)

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

January 09, 2012

Creating basic Graphical User Interface (GUI) application in java with Screenshots

Hi all,

One of my friend asked me, how to create a basic java GUI application which can run on desktop?

A small java gui desktop application, which is having a button and when user click on it, it will show the status of the application.

Source code:

import javax.swing.JFrame;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JOptionPane;

public class PSRSampleGUI
public static void main(String[] args) {
       
        // Creating a frame
        JFrame frame_name = new JFrame("PSR");
      
        //Setting the layout to view the content
        frame_name.setLayout(new FlowLayout());
      
        // Sample lable option
        JLabel label_name = new JLabel("Click Start button");
      
        // Creating a button
        JButton button_name = new JButton("Start");
      
        // Adding button to frame
        frame_name.add(label_name);
        frame_name.add(button_name);
      
        // Adding button functionality
        button_name.addActionListener(new ActionListener()
        {
            @Override
            public void actionPerformed(ActionEvent ae)
            {
                JOptionPane.showMessageDialog(null, "Started", "App Status", JOptionPane.INFORMATION_MESSAGE);
                // Call the method here ( the implemented method)
            }
        });
      
        // Displaying the frame in the center of the screen window
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension windowSize = frame_name.getSize();
        int windowX = Math.max(0, (screenSize.width  - windowSize.width ) / 2);
        int windowY = Math.max(0, (screenSize.height - windowSize.height) / 2);
        frame_name.setLocation(windowX,windowY);
      
        // Displaying the Frame with packing all the contents properly
        frame_name.setVisible(true);
        frame_name.pack();
    } // main method ends here
} // class ends here

Screenshots:
  • By Running the application, you will get the following window in the center of your screen.
  • After clicking on "Start" button, you will get the following window

If you have any queries, please mail to psrdotcom@gmail.com

December 24, 2011

Customize Command Prompt in Windows 7 with your own Icon, Starting Directory and more settings ...

Hi all,

Are you getting bored with the same command prompt with black colored background and other settings?

You can customize your own command prompt and you can start from the preferred location (Directory) path, choose your own icon and lot more.

Go ahead by following the below steps ..


Creating the shortcut icon on Destop
  1. Right click on the desktop, select "New" -> "shortcut"
  2. Browse for the command prompt executable file "cmd.exe"
  3. If you have installed your Operating System in C drive then the path might be similar to this
  4. C:\Windows\System32\cmd.exe
  5. Click on "Next"
  6. Type the name for this shortcut, something like "MyCmdPrompt"
  7. Click on "Finish"
  8. Now you can see your command prompt named of your own choice
  9. Now, you can change some properties of your command prompt

Changing the properties of the custom command prompt

  • Right click on the newly created shortcut from the Desktop
  • Select "Shortcut" tab and change the following settings
  1. Change the starting directory: Specify your own choice of directory path in the "Start in" box.
  2. Default Start in path: C:\Windows\System32
  3. Change the icon of your own choice: Click on "Change Icon" and Click on "Browse" button and Select the "C:\Windows\System32\imageres.dll" to list all the windows installed icons.
  4. Select an icon of your own choice and Click on "Ok"
  5. Run as Administrator by default: Click "Advanced" button, Select "Run as administrator" and Click "Ok"
  • Select "Options" tab and change the following settings
    1. Check "Quick Edit mode" to copy and paste easily
  • Select "Font" tab and change the following settings
    1. select your desired "Font" and "Size" settings
  • Select "Layout" tab and change the following settings
  1. select your desired "Window Size"
  2. Note: To see a bigger screen, increase the "Width and Height" attributes of the "Window Size"
  3. You can preview, your settings in the left side preview
  • Select "Colors" tab, You might be bored by seeing the same black and white combination.
  1. Choose your desired colors for Background, Foreground colors for both the "Screen" and "Pop-Up screen"
  • Click on "Apply" and then "Ok" to see your own command prompt.

Hope this post is useful to you customize your own Command Prompt in Windows 7.

For further queries, mail to psrdotcom@gmail.com

Featured Post

Java Introdcution

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