Friday, February 2, 2018

how to see xml preview in browser php

xml preview view in browser

$xml = new DOMDocument('1.0', 'UTF-8');
                $xml->preserveWhiteSpace = false;
                $xml->formatOutput = true;
                $xml_data = $xml->createElement("DATA");
 $xml_row = $xml->createElement("ROW","test");
                                        $xml_data->appendChild( $xml_row );
 $str = $xml->saveXML();
                $str = "

xml not allowed character list

public function xmlEscape($string) {
        return str_replace(array('&', '<', '>', '\'', '"'), array('&', '<', '>', ''', '"'), $string);

xml add html data in value
$xml_sub_col = $xml->createElement("ITEM");
$xml_sub_col->appendChild($xml->createCDATASection( "test"));

add attrubute in xml

Monday, November 23, 2015

Simulate an Incoming Call in Android Emulator

Android Studio

menu -> tools -> Android -> Android Device Monitor

open window dialog

select Emulator Control

Telephony Actions

In coming number :  1234567890
Voice radio button select
And call button press

Wednesday, July 8, 2015

Add Virtual host for nodejs in apache

Open apache virtual conf file

    #ProxyPass / connectiontimeout=5 timeout=30  # optional timeout settings

    ProxyRequests off

        Order deny,allow
        Allow from all

        ProxyPass http://localhost:3000/
        ProxyPassReverse http://localhost:3000/

Virtualhost run in Genymotion

Open oracle virtual machine

Open file preferences

Click on left panel network

Open tab host only network

Right click on vboxnet0
Open dhcp server

Server address
Lower address bound
Upper address bound

Add host entry in android device

emulator -avd myAvdNameHere -partition-size 128  
adb remount  
adb pull /system/etc/hosts c:\temp  
add your virtual host entry and 
adb push c:\temp\hosts /system/etc

Tuesday, February 10, 2015

How to install MySQL Server 5.6 on CentOS 7 / RHEL 7

Remove mariadb
yum remove mariadb-server
yum remove mariadb-libs
step to install
yum install wget

rpm -ivh mysql-community-release-el7-5.noarch.rpm

[root@localhost ~]# ls -1 /etc/yum.repos.d/mysql-community* /etc/yum.repos.d/mysql-community.repo /etc/yum.repos.d/mysql-community-source.repo [root@localhost ~]#

Installing MySQL Server

yum install mysql-server

To start MySQL Service, run command

systemctl start mysqld

To stop MySQL Service, run command
systemctl stop mysqld

To restart MySQL Service, run command
systemctl restart mysqld

To get status of MySQL Service, run command
systemctl status mysqld

Reset MySQL root password

mysql -u root You will see mysql prompt like this mysql> . Use the below given commands to reset root’s password.
mysql> use mysql; 
mysql> update user set password=PASSWORD("GIVE-NEW-ROOT-PASSWORD") where User='root'; 
 mysql> flush privileges; 
 mysql> quit

Monday, October 13, 2014

hiphop with nginx and php 5.5 with opcache

hiphop with nginx is 2 time faster than php with appche
php-opcache is better than php-apc

I install hiphop with nginx in fedora 20 and centos 6.5

sh file run when system boot

add sh file in /etc/init.d/ directory

how to see xml preview in browser php

xml preview view in browser $xml = new DOMDocument('1.0', 'UTF-8');                 $xml->preserveWhiteSpace = false; ...