Thursday, 7 December 2017

What is Difference Between Windows Web Hosting and Linux Web Hosting..?


Difference Between Windows Web Hosting and Linux Web Hosting


Introduction :

  • Linux and Windows are two different types of operating systems. 
  • Linux is the most popular operating system for web servers. 
  • Since Linux-based hosting is more popular, it has more of the features web designers expect.  So unless you have websites which need specific Windows applications, Linux is the preferred choice.

Windows Specific Applications:Windows Hosting

Windows applications which require a Windows server:
  • ASP Classic
  • ASP.NET
  • MSSQL (Microsoft SQL Server)
  • MS Access (Microsoft Access)
  • Visual Basic Development
  • C#
  • Remote Desktop (dedicated server only)
Windows Dedicated Servers can support additional Windows-specific applications. For some applications, you may need to purchase a license and install the software on your Windows dedicated server.
  • Microsoft Exchange (requires license & Installation)
  • Microsoft SharePoint (requires license & Installation)

Linux Specific Applications:Linux Hosting

Applications that require a Linux-based server.
  • SSH
  • Scripts or applications that require specific Apache modules



Control Panels:

Windows servers and Linux servers use different control panels.

  • cPanel is available on all Linux-based hosting plans, such as Linux Shared, Reseller, VPS and Linux Dedicated Servers.
  • WHM (Web Host Manager) is available on Linux Reseller, VPS and Dedicated Servers.
  • Plesk is available on Windows Shared and Dedicated Servers.


File Names:


Another difference between Linux and Windows servers is that Linux files are case sensitive while Windows files are not.


For example:
  • On a Linux server, home.html and Home.html are different names.
  • On a Windows server, home.htmlHome.html, and HOME.HTML are all the same name.


Server Security:


Although many people consider Linux to be more secure than Windows, both operating systems are equally secure. Security really depends more on the server setup and the administrators running the server. All of HostGator's managed servers are maintained with the latest security and performance patches and configured for optimal security.


ServiceShared/ResellerDedicated/VPS
Ad servingNoYes
Adobe ColdFusion
(Installation & configuration not available)
NoYes
Adobe Media Server (was Flash Media Server)NoYes
AdSpy SitesNoNo
AjaxYesYes
Alias files, aliasesYesYes
aMember ProYesYes
AmfphpYesYes
Apache 2YesYes
Apache CassandraNoYes
Apache FlexNoYes
Apple Mail, Mac MailYesYes
apt-get (would require a different OS than we provide)NoTIX
Aspell, PspellYesYes
AutosshNoYes
AWstats (included)YesYes
AWstats includesTIXYes
browscap, browscap.iniNoYes
Bugzilla (Installation & configuration not available)
(Snappy VPS 2000 or higher)
NoYes
Byte Range Requests/Byte ServingYesYes
C, C++, GCC, C CompilerNoYes
CakePHPYesYes
Clam AVNoTIX
CentOS 6.4 (included)YesYes
CGExtensionsYesYes
ClipShare/File SharingNoYes
Code signingNoYes
Colo, colocation servicesNoNo
Composer
(Installation & configuration not available)
NoYes
Compressed Files (.rar* .zip .tar.gz .bz2)YesYes
concrete5YesYes
CouchDBNoYes
cPanelYesYes
cPanel ProNoYes
cPanel skins - Third partyNoYes
CRE Loaded SitesYesYes
CRE Loader
(Not included, but you can install it)
YesYes
Cron jobs (included)YesYes
Crypt::SSLeay5TIXYes
CS-CartYesYes
cURL, libcurl, PHP/CURL (included)YesYes
Cyberduck FTPYesYes
DelavoYesYes
Disable open_base dirYesYes
Django (shared requires fastcgi)YesYes
dl() functionNoYes
Dolphin 7
(You provide installation and license)
NoYes
Ray, Orca, & older Dolphin versions (Boonex.com)YesYes
Drupal (included)YesYes
e107YesYes
eAcceleratorNoNo
eGroupWareYesYes
elggYesYes
Email PipingYesYes
ExpressionEngineYesYes
FastCGIYesYes
FFmpegNoVPS = No
Dedi = Yes
Flash FLV
(browsers must have MacroMedia Flash Player installed)
YesYes
Flv2toolNoYes
formailYesYes
formmailYesYes
fopenYesYes
FreeBSD, Ubuntu (all at your own risk)NoYes
fsockopenYesYes
FXP (File Exchange Protocol)NoYes
Game serverNoVPS = No
Dedi = Yes
GCD (Google Cash Detective)NoNo
GD2 Library (included)YesYes
get, WgetYesYes
GhostscriptYesYes
Git clientYesYes
Git serverNoYes
Gnome/KDE (No support or installation provided, install at your own risk)NoYes
GnuPGYesYes
Google AdSense & AdWordsYesYes
Google Apps & EmailYesYes
gzipYesYes
HIPAA complianceNoNo
HTML (Hyper Text Markup Language)YesYes
HTTP Digest AuthenticationNoYes
HTTP keep-aliveYesYes
HTTP streaming (audio/video)YesYes
If-Modified-Since HTTP headerYesYes
ihtmlNoYes
ImageMagick, Image Magick (included)YesYes
IMAPYesYes
imap_openYesYes
innoDBYesYes
ionCube Loader, decoderYesYes
IPsecNoVPS = No
Dedi = Yes
IRCNoNo
Java, Tomcat, .jspNoYes
Java virtual machine (JRE, JVM)NoYes
JavaServer Faces (JSF)NoYes
JavaScriptYesYes
JIRANoYes
Joomla (included)YesYes
JSONYesYes
KayakoYesYes
KVMNoNo
LAME MP3 EncoderNoYes
LaravelYesYes
LaTeX (but we do not support the binary)YesYes
LDAP, openldapNoYes
lib_curlYesYes
libmysqlclientYesYes
Libogg + LibvorbisNoYes
Live streaming, webcam, radio or video broadcastNoYes
Load balancingNoTIX
lynxTIXYes
MagentoYesYes
Mail - EximYesYes
Mail - any other MTA (postfix)NoYes
memcached
(Snappy 2000 VPS or higher)
NoYes
Midnight Commander, MCNoYes
Ming (PHP module)NoYes
Miva empresaNoYes
mod_deflate, mod_gzipYesYes
mod_layoutNoYes
mod_mimeYesYes
mod_pagespeedNoYes
mod_perl, mod_python, mod_sql_auth, mod_rubyNoYes
mod_rewrite, mod_speling
(must enable in .htaccess)
YesYes
mod_security, mod_secTIXYes
MokoalaYesYes
MongoDBNoYes
MoodleYesYes
mpeg2encTIXTIX
Mplayer + MEncoderNoYes
MySQL 5 (included)YesYes
MySQLiYesYes
mysqlndNoYes
MySQL ClusterNoYes
NNTP/UsenetNoYes
Node.jsNoYes
Nulled scripts (forbidden per our TOS)NoNo
NuSphere PhpExpressNoYes
OLSB, OLPNoNo
Online chat programsYesYes
openSSL 0.9.8oYesYes
Oracle (not recommended for VPS plans)NoYes
ownCloud (against our TOS on shared servers)NoYes
paFileDBNoNo
ParaChatNoYes
Payment gateway/merchant providerYesYes
PCI ComplianceYesYes
PCRE (Perl Compatible Regular Expressions)YesYes
PDFlib (requires commercial license)NoYes
PDFtkNoYes
PDO or pdo_mysqlYesYes
Pear MDB2TIXTIX
PEAR modules - full listYesYes
PennyWizeNoYes
Perl 5, Python 2, CGI, CPAN (all included)YesYes
Perl DBI moduleYesYes
PHP 5 (included)YesYes
PHP-FPM with Zend OPCache (Snappy 2000 VPS or higher)NoYes
PHP iconvYesYes
PHP and PECL modules - full listYesYes
PHP shell_execYesYes
PHP tokenizerYesYes
PHPArcadeScript, phpasYesYes
phpFoxYesYes
PHPmotionNoYes
PHP Multibyte String (mbstring)YesYes
phpMyAdmin (included)YesYes
Pine (email client)NoYes
PleskNoNo
PodcastingYesYes
POP3 (included)YesYes
PostgreSQL, Informix, Sybase Solid, Generic ODBCNoYes
PrestaShopYesYes
procmailYesNo
Proxy servers, socket servers, SOCKS 4, 4a, &5NoNo
Push Button Cash SiteNoNo
Push EmailNoNo
Python setuptoolsYesYes
QuickInstall (included)YesTIX
Rapid LeechNoYes
Red5 Media ServerNoYes
RedisNoYes
RHEL (Red Hat Enterprise Linux)NoYes
RiakNoYes
Round Robin DNSNoYes
RSS feedsYesYes
rsyncYesYes
Ruby on Rails (included)YesYes
Safe Harbor Certified (included)YesYes
SCP, SFTPYesYes
sem_getNoNo
Sendgrid SMTP
(Sending email via Sendgrid's SMTP servers via script) (Note: Sendgrid's Web API may work on shared & reseller, but is untested at this time.)
TIXYes
Server clock adjustments
(other than Central Standard Time [CST] & Central Daylight Saving [CDT])
NoYes
Server redundancyNoNo
session_gc, probability, divisor, maxlifetimeNoYes
Shared SSLNoNo
Shopping cartsYesYes
SHTML (SSI-enabled HTML), SSI, server side includes (all included)YesYes
ShoutCast, IcecastNoYes
SimpleXMLYesYes
SiteBuilder by Parallels Plesk (available by request)Shared = No
Reseller = Yes
Yes
SmartyYesYes
SMF (Simple Machines Forum)YesYes
SMS Gateway, MMSNoNo
SMTP (Simple Mail Transfer Protocol)(included)YesYes
SOAPYesYes
SoftaculousNoYes
SourceGuardian (decoder)YesYes
SoX (audio processing)YesYes
SpamAssassin, spamdYesYes
SQLiteYesYes
SRV record (Service Record)YesYes
SSH2 (included)YesYes
SSH tunnelNoYes
Streaming FlashNoYes
Subversion SVN ClientYesYes
SVN/CVS RepositoryNoYes
SWFToolsNoYes
tmpfs (configuration requires billing for admin time)NoYes
Trac, TracInstallNoYes
Urchin Stats (discontinued)NoYes
vBulletinYesYes
vi (requires SSH)YesYes
VidiscriptNoYes
VMware (virtualization)NoYes
VirtualEnvYesYes
VNC (You provide installation)NoYes
Voice servers (TeamSpeak/Ventrillo)NoYes
VPN/VPSNoVPS = No
Dedi = Yes
vtiger CRM, SugarCRM
(You provide installation and license)
YesYes
WAPYesYes
Webalizer (included) (Video tutorial)YesYes
Webdav (class 1)YesYes
Web DiskYesYes
WebMail Access: Horde, SquirrelMail, Roundcube (all included)YesYes
WHMYesYes
Wiki (MediaWiki, PhpWiki, TWiki)YesYes
Wildcard SSLmulti-domain SSLYesYes
WoopraYesYes
WordPress (included)YesYes
WordPress MU (now incorporated into WordPress 3.0 and above)YesYes
WSGI (Web Server Gateway Interface), mod_wsgiNoYes
X Windows (X11)NoNo
XAMPPNoYes
xdebugNoYes
XenNoYes
XMLxml-rpcYesYes
XMPP (you provide installation)NoYes
XOOPSYesYes
XSiteProYesYes
XSLTYesYes
XSSI (extended server side includes)NoYes
yamdiNoYes
yumNoYes
Zend CoreNoYes
Zend FrameworkNoYes
Zend Guard (replaces Optimizer)NoYes
zip_openYesYes
zlib compression libraryYesYes
Zope/PloneNoYes

What is Java List and List Iterator?

Learning Java Programming Made Easy

List And List Iterator


Java List Interface:

List Interface is the subinterface of Collection.It contains methods to insert and delete elements in index basis.It is a factory of ListIterator interface.

Java List Example

  1. import java.util.*;  
  2. public class ListExample{  
  3. public static void main(String args[]){  
  4. ArrayList<String> al=new ArrayList<String>();  
  5. al.add("Amit");  
  6. al.add("Vijay");  
  7. al.add("Kumar");  
  8. al.add(1,"Sachin");  
  9. System.out.println("Element at 2nd position: "+al.get(2));  
  10. for(String s:al){  
  11.  System.out.println(s);  
  12. }  
  13. }  
  14. }


Java ListIterator Interface:

ListIterator Interface is used to traverse the element in backward and forward direction.

Example of ListIterator Interface

  1. import java.util.*;  
  2. public class TestCollection8{  
  3. public static void main(String args[]){  
  4. ArrayList<String> al=new ArrayList<String>();  
  5. al.add("Amit");  
  6. al.add("Vijay");  
  7. al.add("Kumar");  
  8. al.add(1,"Sachin");  
  9. System.out.println("element at 2nd position: "+al.get(2));  
  10. ListIterator<String> itr=al.listIterator();  
  11. System.out.println("traversing elements in forward direction...");  
  12. while(itr.hasNext()){  
  13. System.out.println(itr.next());  
  14. }  
  15. System.out.println("traversing elements in backward direction...");  
  16. while(itr.hasPrevious()){  
  17. System.out.println(itr.previous());  
  18. }  
  19. }  
  20. }




What is Encapsulation in Java Programming?

Learning Java Programming Made Easy

Encapsulation in Java

Encapsulation in java is a process of wrapping code and data together into a single unit, for example capsule i.e. mixed of several medicines.


We can create a fully encapsulated class in java by making all the data members of the class private. Now we can use setter and getter methods to set and get the data in it. The Java Bean class is the example of fully encapsulated class.


Advantage of Encapsulation in java

By providing only setter or getter method, you can make the class read-only or write-only. It provides you the control over the data. Suppose you want to set the value of id i.e. greater than 100 only, you can write the logic inside the setter method.


  1. //save as Student.java  
  2. package com.funlearn;  
  3. public class Student{  
  4. private String name;  
  5.    
  6. public String getName(){  
  7. return name;  
  8. }  
  9. public void setName(String name){  
  10. this.name=name  
  11. }  
  12. }  



  1. //save as Test.java  
  2. package com.funlearn;  
  3. class Test{  
  4. public static void main(String[] args){  
  5. Student s=new Student();  
  6. s.setName("vijay");  
  7. System.out.println(s.getName());  
  8. }  
  9. }  

Wednesday, 6 December 2017

How Sting Joiner Class Works in JAVA Programming

Learning Java Programming Made Easy


Java StringJoiner



Java added a new final class StringJoiner in java.util package. It is used to construct a sequence of characters separated by a delimiter. Now, you can create string by passing delimiters like comma(,), hyphen(-) etc. You can also pass prefix and suffix to the char sequence.



Java StringJoiner Example


  1. // importing StringJoiner class  
  2. import java.util.StringJoiner;  
  3. public class StringJoinerExample {  
  4.     public static void main(String[] args) {  
  5.         StringJoiner joinNames = new StringJoiner(","); // passing comma(,) as delimiter   
  6.           
  7.         // Adding values to StringJoiner  
  8.         joinNames.add("Rahul");  
  9.         joinNames.add("Raju");  
  10.         joinNames.add("Peter");  
  11.         joinNames.add("Raheem");  
  12.                   
  13.         System.out.println(joinNames);  
  14.     }  
  15. }  


Java StringJoiner Example: adding prefix and suffix



  1. // importing StringJoiner class  
  2. import java.util.StringJoiner;  
  3. public class StringJoinerExample {  
  4.     public static void main(String[] args) {  
  5.         StringJoiner joinNames = new StringJoiner(",""[""]");   // passing comma(,) and square-brackets as delimiter   
  6.           
  7.         // Adding values to StringJoiner  
  8.         joinNames.add("Rahul");  
  9.         joinNames.add("Raju");  
  10.         joinNames.add("Peter");  
  11.         joinNames.add("Raheem");  
  12.                   
  13.         System.out.println(joinNames);  
  14.     }  
  15. }  


StringJoiner Example: Merge Two StringJoiner


  1. // importing StringJoiner class  
  2. import java.util.StringJoiner;  
  3. public class StringJoinerExample {  
  4.     public static void main(String[] args) {  
  5.   
  6.         StringJoiner joinNames = new StringJoiner(",""[""]");   // passing comma(,) and square-brackets as delimiter   
  7.           
  8.         // Adding values to StringJoiner  
  9.         joinNames.add("Rahul");  
  10.         joinNames.add("Raju");  
  11.   
  12.         // Creating StringJoiner with :(colon) delimiter  
  13.         StringJoiner joinNames2 = new StringJoiner(":""[""]");  // passing colon(:) and square-brackets as delimiter   
  14.           
  15.         // Adding values to StringJoiner  
  16.         joinNames2.add("Peter");  
  17.         joinNames2.add("Raheem");  
  18.   
  19.         // Merging two StringJoiner  
  20.         StringJoiner merge = joinNames.merge(joinNames2);   
  21.         System.out.println(merge);  
  22.     }  
  23. }

Monday, 4 December 2017

How to use URLConnection class in Java Programming

Learning Java Programming Made Easy

Java Connection Class:

The Java URLConnection class represents a communication link between the URL and the application. This class can be used to read and write data to the specified resource referred by the URL.

The openConnection() method of URL class returns the object of URLConnection class. Syntax:

public URLConnection openConnection()throws IOException{}

Example:


  1. import java.io.*;  
  2. import java.net.*;  
  3. public class URLConnectionExample {  
  4. public static void main(String[] args){  
  5. try{  
  6. URL url=new URL("http://www.javatpoint.com/java-tutorial");  
  7. URLConnection urlcon=url.openConnection();  
  8. InputStream stream=urlcon.getInputStream();  
  9. int i;  
  10. while((i=stream.read())!=-1){  
  11. System.out.print((char)i);  
  12. }  
  13. }catch(Exception e){System.out.println(e);}  
  14. }  
  15. }

How Does URL Programming works in Java Development

Learning Java Programming Made Easy


Java URL:

The Java URL class represents an URL. URL is an acronym for Uniform Resource Locator. It points to a resource on the World Wide Web. For example:


A URL contains many information:
  1. Protocol: In this case, http is the protocol.
  2. Server name or IP Address: In this case, www.javatpoint.com is the server name.
  3. Port Number: It is an optional attribute. If we write http//ww.javatpoint.com:80/sonoojaiswal/ , 80 is the port number. If port number is not mentioned in the URL, it returns -1.
  4. File Name or directory name: In this case, index.jsp is the file name.
MethodDescription
public String getProtocol()it returns the protocol of the URL.
public String getHost()it returns the host name of the URL.
public String getPort()it returns the Port Number of the URL.
public String getFile()it returns the file name of the URL.
public URLConnection openConnection()it returns the instance of URLConnection i.e. associated with this URL.


  1. //URLDemo.java  
  2. import java.io.*;  
  3. import java.net.*;  
  4. public class URLDemo{  
  5. public static void main(String[] args){  
  6. try{  
  7. URL url=new URL("http://www.javatpoint.com/java-tutorial");  
  8.   
  9. System.out.println("Protocol: "+url.getProtocol());  
  10. System.out.println("Host Name: "+url.getHost());  
  11. System.out.println("Port Number: "+url.getPort());  
  12. System.out.println("File Name: "+url.getFile());  
  13.   
  14. }catch(Exception e){System.out.println(e);}  
  15. }  
  16. }

Charactor_At_Position

public class Char_At_Position { public static void main(String[] args) { String str = "Wankhede"; String rev=""...