I hereby claim:
- I am sks147 on github.
- I am sks147 (https://keybase.io/sks147) on keybase.
- I have a public key whose fingerprint is 4F25 6418 4029 FC03 7E18 FC2F AB61 1170 3BDD E734
To claim this, I am signing this object:
# pass file arguments in double quotes | |
# e.g last_modified("/etc/passwd") | |
def last_modified(file) | |
t1 = File.stat(file).ctime | |
t2 = Time.now | |
elapsed = (t2-t1)/(60*60*24) | |
puts "#{file} was modified #{elapsed} days ago." | |
end |
I hereby claim:
To claim this, I am signing this object:
import java.util.*; | |
import java.lang.*; | |
import java.io.*; | |
import java.net.*; | |
import java.awt.Desktop; | |
// Read all data from the http connection and write it to a temporary | |
// file created on your local system | |
public class HTTPConnectionReader{ | |
public static void main (String[] args){ |
#include <iostream> | |
using namespace std; | |
int server_start_index; | |
int server_end_index; | |
int main(){ | |
string url; | |
cin>>url; | |
cout << "Retrieving the server :" << endl; |
import java.util.*; | |
import java.lang.*; | |
import java.io.*; | |
import java.net.*; | |
import java.awt.Desktop; | |
//Determine the Server Side MIME type information and Spawn an external viewer to display the file. | |
public class URLDownloader{ | |
public static void main (String[] args){ | |
URL u = null; |
#include <string> | |
#include <iostream> | |
using namespace std; | |
int main(){ | |
string s; | |
cin>>s; | |
string s1; | |
s1=s; |
//Simulating selective repeat sliding window protocol | |
#include <iostream> | |
#include <cstdlib> | |
using namespace std; | |
void receiver(int r); | |
int sent_packets=0; | |
int received_packets=0; | |
bool ack; | |
void sender() | |
{ |
import java.net.*; | |
import java.io.*; | |
//Create a socket that is connected to port 80(HTTP) | |
public class HTTPClient{ | |
public static void main(String args[]){ | |
Socket socket = null; | |
String hostname = "www.google.com"; | |
int port = 80; | |
try{ | |
socket = new Socket(hostname, port); |
import java.io.*; | |
import java.net.*; | |
import java.util.*; | |
//Send a request to www server using the HTTP protocol format using GET method | |
public class GETMethod{ | |
public static void main(String args[]){ | |
URL u = null; | |
try{ | |
u = new URL("http://www.bbc.co.uk/accessibility/guides/"); | |
HttpURLConnection http = (HttpURLConnection) u.openConnection(); |
import java.io.*; | |
import java.net.*; | |
public class ConsoleChatClient { | |
public static void main(String[] args) throws IOException { | |
new ConsoleChatClient().chat(); | |
} | |
protected Socket sock; | |
protected BufferedReader is; |