Search This Blog

Showing posts with label steps. Show all posts
Showing posts with label steps. Show all posts

Monday, September 19, 2022

Android Virtual Device - AVD Setup

 1. Install Andriod SDK

2. Set environment for ANDROID_HOME=/home/android/sdk...

3. Install AVD or Android Studio

4. Open Android Studio 

           /home/android-studio/bin/

                        ./studio.sh


5. In that android Studio, you can see Configure Button -> AVD



6. Create Virutal Device or AVD like below. 



7. Start The Emulator by click Play button



8. Add environment variable.

      8.1  goto /etc/profile.d/    [create one file.sh] ex: > sudo vi myenv.sh
         
      export ANDROID_HOME=$HOME/Library/Android/sdk
      export PATH=$PATH:$ANDROID_HOME/emulator
      export PATH=$PATH:$ANDROID_HOME/tools
      export PATH=$PATH:$ANDROID_HOME/tools/bin
      export PATH=$PATH:$ANDROID_HOME/platform-tools

9. > source /etc/profile




Tuesday, September 20, 2016

STEPS FOR INSTALLING AND CONFIGURING THE APACHE SOLR IN TOMCAT x.x

STEPS FOR INSTALLING AND CONFIGURING THE APACHE SOLR
====================================================


1. copy the solr.war file and place into somewhere in the machine

2. copy the 'solr' folder which contains all cores , and place into some where in machine

3. add 'solr.xml' file  in "tomcat server\conf\Cataline\localhost\"

example: X:\apache-tomcat-8.0.32\conf\Catalina\localhost\solr.xml

4. in 'solr.xml' file we have to specify the path of 'solr.war' and 'solr' folder of cores.

           a)docBase for 'solr.war'  file
           b)environment value for 'solr' folder of cores


solr.xml
---------------



 

-------------



5. Run the tomcat server

  ex:localhost:8080

6. Run the solr admin console

  ex:localhost:8080/solr


7. You will get dashboard of 'solr'  and left side of main page you will get all the cores, which we have from 'solr' folder as specified point number 2.

8. the select the 'query result' and 'execute'



NOTE: Core we have to create manually  , and index the data with datatype manually into each cores.


by
naren


Tuesday, June 14, 2016

Slim Framework - Global PHP reference Steps Installation

1. Download composer_setup.exe for windows
install it -> select php.exe from xampp/php/


2 Copy composer.phar from C:\ProgramData\ComposerSetup\bin [hidden folder] to D:\php\ [apache root directory]

3. type to install vendor folder [slim setups]
    D:\php> php composer.phar require slim/slim

4. create your root folder (ex: test) and in your index.php..
    add ../vendor/autoload.php

ex:index.php
 
   
    use \Psr\Http\Message\ServerRequestInterface as Request;
    use \Psr\Http\Message\ResponseInterface as Response;

    require '../vendor/autoload.php';

    $app = new \Slim\App;
    $app->get('/', function (Request $request, Response $response) {
         $response->getBody()->write("Welcome");
    });

    $app->get('/home/{name}', function (Request $request, Response $response) {
        $name = $request->getAttribute('name');
        $response->getBody()->write("Hello, $name");
   
        return $response;
    });
    $app->run();




5. run apache and in browser    http://localhost:8888/test/




Slim Framework - PHP Install Steps

1. Download composer_setup.exe for windows
install it -> select php.exe from xampp/php/

2. create a folder where your xampp root folder
    Create folder
    D:\works\beyond\php\test
    D:\works\beyond\php\test\src
    D:\works\beyond\php\test\src\public


2.1 Copy composer.phar from C:\ProgramData\ComposerSetup\bin [hidden folder] to X:\test\src

//install slim
3. X:\test\src> php composer.phar require slim/slim

//extra dependencies
4. X:\test\src> composer install

5. SVN commit with vendor folder as ignore. that will take care by composer.phar composer.lock composer.json.

6. Create a file X:\test\src\public\index.php
    write your program.
   

7. RUN xampp and type http://localhost:8888/test/src/public/

FOR REST API
*************

1. Go to xampp/apache/conf/httpd.conf change to doc root/directory to D:/test/public
2. restart the apache
3. api url. http://localhost:8888/hello/vijay

Wednesday, October 7, 2015

Run Open ATNA, XDS, PixPdq Steps

Open ATNA
*********


1. Goto cmd
cd D:\works\BlueCap\POC\openatna\trunk\openatna\all\build

2. java -jar openatna-1.2.1-SNAPSHOT.jar

3. open jboss dev stuido workspace  D:\jbdevstudio\workspace\Blue-Cap\openatna
    run junit


Open XDS
********


1. goto cmd D:\works\BlueCap\POC\openxds\tags\build

2. java -jar openxds-1.0.jar

3. open jboss dev stuido workspace  D:\jbdevstudio\workspace\Blue-Cap
 run ProvideAndRegisterDocumentSetTest.java 


SRC Folder : D:\works\BlueCap\POC\openxds\tags\openxds-1.0-20100309\openxds-core\src\test\java\org\openhealthtools\openxds\integrationtests\

4. use test.properties to change the patient id and check that in personidentifier table in protgres



Open Pixpdq
***********


1. goto Tomcat6.0 and run with openpixpdq.war

2. http://localhost:8080/openpixpdq/
   goto configuration module/menu
   load file : D:\works\BlueCap\POC\openpixpdq\trunk\OpenPIXPDQ\conf\tests\actors\IheActors.xml
3. go down in the same page, select all the check box and give one log file path & save it

4. Go to other screens and test it
    Create a patient and see it in postgres openempi database person_identifier


or
simple open jboss dev stuido workspace  D:\jbdevstudio\workspace\open-pixpdq

FOLLOW 1,2 steps to start 3600 port for pix manager to run directly from IDE

open TestPixFeed.java
    & run junit
FOLDER: D:\works\BlueCap\POC\openpixpdq\trunk\OpenPIXPDQ\src\test\org\openhealthexchange\openpixpdq\ihe\impl_v2\

NOTE: open openpixpdq context , not in trunk, other wise you cannot see junit in right click run as-> junit



if you want to run with dynamically 100 port, such as 8080 to 8180 ....
 x:\>   standalone.bat -Djboss.server.default.config=standalone-full.xml -Djboss.socket.binding.port-offset=100

Monday, October 1, 2012

HornetQ in Jboss EAP 6.0

JAR Files





1)      Add this in standalone-full.xml under   
<jms-destinations>
    <jms-queue name="testQueue">
      <entry name="queue/test"/>
      <entry name="java:jboss/exported/jms/queue/test"/>
    </jms-queue>
    <jms-topic name="testTopic">
      <entry name="topic/test"/>
      <entry name="java:jboss/exported/jms/topic/test"/>
    </jms-topic>
</jms-destinations>

2)      Add new user for JMS through add-user.bat  [application-users type [select option b] ]
X:\> add-user.bat
b
ApplicationRealm
jmsUser
password
yes

                check in mgm-users.properties, application-users.properties like below line [new user with pwd]
jmsUser=aeadcf105686eafa6afc994e86a520db

3)      Add the below line into applicaiton-roles.properties
jmsUser=guest 

3.5) Start the server



D:\EAP-6.0.0.GA\jboss-eap-6.0\bin>standalone.bat -b 192.168.1.111 -Djboss.server.default.config=standalone-full.xml
Or
D:\EAP-6.0.0.GA\jboss-eap-6.0\bin>standalone.bat -b 192.168.1.111 –c standalone-full.xml


4)      Sender1.java
/**
 *
 */
package com.test;

import java.util.Hashtable;

import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;

public class Sender1
{
                public static void main ( String [] args )
                {

                                try
                                {

                                                Hashtable env = new Hashtable ();
                                                env.put ( Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory" );
                                                env.put ( Context.PROVIDER_URL, "remote://192.168.1.111:4447" );
                                                env.put ( Context.SECURITY_PRINCIPAL, "jmsUser" );
                                                env.put ( Context.SECURITY_CREDENTIALS, "password" );
                                                Context context = new InitialContext ( env );

                                                ConnectionFactory cf = (ConnectionFactory) context.lookup ( "jms/RemoteConnectionFactory" );
                                                Destination destination = (Destination) context.lookup ( "jms/queue/test" );
                                                Connection connection = cf.createConnection ( "jmsUser", "password" );
                                                Session session = connection.createSession ( false, Session.AUTO_ACKNOWLEDGE );
                                                Queue queue = (javax.jms.Queue) context.lookup ( "jms/queue/test" );

                                                TextMessage textMessage = session.createTextMessage ();
                                                textMessage.setText ( "hello vijay 3" );
                                                javax.jms.MessageProducer producer = session.createProducer ( destination );
                                                producer.send ( textMessage );

                                                System.out.println ( "Sending Done " );

                                                // Close the session and connection resources.
                                                // context.close();
                                                session.close ();
                                                connection.close ();

                                }
                                catch ( Exception ex )
                                {

                                                ex.printStackTrace ();

                                }

                }

}



1)      QueueReceive.java

package com.test;

import java.util.Hashtable;
import javax.jms.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

public class QueueReceive implements MessageListener
{
                public final static String                  JNDI_FACTORY = "org.jboss.naming.remote.client.InitialContextFactory";

                // *************** Using the RemoteConnectionFactory JNDI name *************************
                public final static String                  JMS_FACTORY                  = "jms/RemoteConnectionFactory";

                // *************** Created Queue's JNDI name *************************
                public final static String                  QUEUE                                 = "jms/queue/test";

                private QueueConnectionFactory            qconFactory;
                private QueueConnection                                           qcon;
                private QueueSession                                   qsession;
                private QueueReceiver                                 qreceiver;
                private Queue                                                                   queue;
                private boolean                                                                                quit                                        = false;

                public void onMessage ( Message msg )
                {
                                try
                                {
                                                String msgText;
                                                if ( msg instanceof TextMessage )
                                                {
                                                                msgText = ( (TextMessage) msg ).getText ();
                                                }
                                                else
                                                {
                                                                msgText = msg.toString ();
                                                }
                                                System.out.println ( "\n\t " + msgText );
                                                if ( msgText.equalsIgnoreCase ( "quit" ) )
                                                {
                                                                synchronized ( this )
                                                                {
                                                                                quit = true;
                                                                                this.notifyAll (); // Notify main thread to quit
                                                                }
                                                }
                                }
                                catch ( JMSException jmse )
                                {
                                                jmse.printStackTrace ();
                                }
                }

                public void init ( Context ctx, String queueName ) throws NamingException, JMSException
                {
                                qconFactory = (QueueConnectionFactory) ctx.lookup ( JMS_FACTORY );

                                // *************** Creating Queue Connection using the UserName & Password *************************
                                qcon = qconFactory.createQueueConnection ( "jmsUser", "password" ); // <------------- amp="amp" change="change" p="p" password="password" the="the" username="username">

                                qsession = qcon.createQueueSession ( false, Session.AUTO_ACKNOWLEDGE );
                                queue = (Queue) ctx.lookup ( queueName );
                                qreceiver = qsession.createReceiver ( queue );
                                qreceiver.setMessageListener ( this );
                                qcon.start ();
                }

                public void close () throws JMSException
                {
                                qreceiver.close ();
                                qsession.close ();
                                qcon.close ();
                }

                public static void main ( String [] args ) throws Exception
                {
                               
                                InitialContext ic = getInitialContext ( "remote://192.168.7.9:4447" );
                                QueueReceive qr = new QueueReceive ();
                                qr.init ( ic, QUEUE );
                                System.out.println ( "JMS Ready To Receive Messages (To quit, send a \"quit\" message from QueueSender.class)." );
                                // Wait until a "quit" message has been received.
                                synchronized ( qr )
                                {
                                                while ( !qr.quit )
                                                {
                                                                try
                                                                {
                                                                                qr.wait ();
                                                                }
                                                                catch ( InterruptedException ie )
                                                                {
                                                                }
                                                }
                                }
                                qr.close ();
                }

                private static InitialContext getInitialContext ( String url ) throws NamingException
                {
                                Hashtable env = new Hashtable ();
                                env.put ( Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY );
                                env.put ( Context.PROVIDER_URL, url );

                                // *************** UserName & Password for the Initial Context for JNDI lookup *************************
                                env.put ( Context.SECURITY_PRINCIPAL, "jmsUser" );
                                env.put ( Context.SECURITY_CREDENTIALS, "password" );

                                return new InitialContext ( env );
                }
}





</------------->

Hit Counter


View My Stats