Change the port number in the following files:
/etc/apache2/sites-enabled/example.com /etc/apache2/ports.conf /etc/apache2/sites-available/defaultFinally remember to restart apache server:
/etc/init.d/apache2 restart
/etc/apache2/sites-enabled/example.com /etc/apache2/ports.conf /etc/apache2/sites-available/defaultFinally remember to restart apache server:
/etc/init.d/apache2 restart
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.FileOutputStream;
import java.io.BufferedOutputStream;
import java.net.URL;
public class FileDownloader
{
public static void main(String args[])
{
if(args.length != 2 && !(args[0].equals(""))){
System.out.println("Usage: <web-link> <new-filename>");
}else{try{
if((args[0].substring(7,10)).equals("172"))
args[0] = "http://cl.thapar.edu/" + args[0].substring(20);
System.out.println("FileDownloader: "+args[0]+" "+args[1]);
URL url = new URL(args[0]);
java.io.BufferedInputStream in = new BufferedInputStream(url.openStream());
java.io.FileOutputStream fos = new FileOutputStream(args[1]+".pdf");
java.io.BufferedOutputStream bout = new BufferedOutputStream(fos,1024);
byte[] data = new byte[1024];
int x=0;
while((x=in.read(data,0,1024))>=0)
{
bout.write(data,0,x);
}
bout.close();
in.close();
}catch(IOException e){
System.out.println(e.toString());
}}
}
}
jar cf JarFileToCreate.jar abc.class def.class ...For More details on creating Jar files, see create-jar-file-for-java-app
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://localhost/jnlp" href="MyApp.jnlp">
<information>
<title>My App Title</title>
<vendor>MonishVendor</vendor>
</information>
<resources>
<!-- Application Resources -->
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="TestApp.jar" main="true" />
</resources>
<application-desc
name="DemoName"
main-class="GUI_QPDownloader"
width="300"
height="300">
</application-desc>
<update check="background"/>
</jnlp> jar cfm jar-file manifest-addition input-file(s)
Base::func()
template<class T> class Widget; // uses "class" template<typename T> class Widget; // uses "typename"When declaring template parameters, class and typename are interchangeable.
class basic_ios { ... };
class basic_istream: public basic_ios { ... };
class basic_ostream: public basic_ios { ... };
class basic_iostream: public basic_istream, public basic_ostream
{ ... };class basic_ios { ... };
class basic_istream: virtual public basic_ios { ... };
class basic_ostream: virtual public basic_ios { ... };
class basic_iostream: public basic_istream, public basic_ostream
{ ... };But try to avoid virtual inheritance because:class Widget {
private:
class WidgetTimer: public Timer {
public:
virtual void onTick() const;
...
};
WidgetTimer timer;
...
};
In the third alternative's example, we need to redefine onTick() of class Timer.This design is appreciated over private inheritance because 1.the derived classes would not be able to refine onTick(). 2. In case of private inheritance, Widget get compilation dependencies on the definition of class Timer which would force us to #include timer.h Whereas in alternative 3, By defining WidgetTimer class out of the Widget class and placing a pointer to WidgetTimer would require just declaration of WidgetTimer class at the minimum.