Skip to content

Instantly share code, notes, and snippets.

@pradeep1288
pradeep1288 / findmeway.html
Created July 14, 2012 15:17
Find me the way
<form action="http://maps.google.com/maps" method="get" target="_blank">
<label for="saddr">Where are you now ?</label>
<input type="text" name="saddr" />
<input type="hidden" name="daddr" value="<Your desired destination address>" />
<input type="submit" value="Find me the way" />
</form>
@pradeep1288
pradeep1288 / README.md
Created August 13, 2012 18:05 — forked from harry1989/README.md
Thanking friends who wishes for your birthday
@pradeep1288
pradeep1288 / all_databases_size.sql
Last active August 29, 2015 13:56
Gets the size of all the databases on a given sql server instance. (Credits: http://goo.gl/4aw6Al)
SELECT @@SERVERNAME AS SqlServerInstance,
db.name AS DatabaseName,
SUM(CASE WHEN af.groupid = 0 THEN 0 ELSE 8192.0E * af.size / 1048576.0E END) AS DatabaseSize,
SUM(CASE WHEN af.groupid = 0 THEN 8192.0E * af.size / 1048576.0E ELSE 0 END) AS LogSize,
SUM(8192.0E * af.size / 1048576.0E) AS TotalSize
FROM master..sysdatabases AS db
INNER JOIN master..sysaltfiles AS af ON af.[dbid] = db.[dbid]
WHERE db.name NOT IN('distribution', 'Resource', 'master', 'tempdb', 'model', 'msdb')
GROUP BY db.name
@pradeep1288
pradeep1288 / tsp.java
Created February 26, 2014 08:04
Assignment 2 - AI
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
/**
* Created with IntelliJ IDEA.
* User: pradeepnayak
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
/**
* Created with IntelliJ IDEA.
* User: pradeepnayak
from 'A' to 'B'
---------------------------------------------
x,y,g,h,f
15,15,0,14,14
15,14,1,13,14
15,13,2,12,14
15,12,3,11,14
15,11,4,10,14
15,10,5,9,14
15,9,6,8,14
from 'A' to 'B'
-----------------------------------------------
x,y,g,h,f
1,15,0.0,11.0,11.0
1,14,1.0,10.0,11.0
1,13,2.0,9.0,11.0
1,12,3.0,8.0,11.0
1,11,4.0,7.0,11.0
1,10,5.0,6.0,11.0
1,9,6.0,5.0,11.0
@pradeep1288
pradeep1288 / tsp.java
Created February 26, 2014 09:11
Assignment 2 - AI
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
/**
* Created with IntelliJ IDEA.
* User: pradeepnayak
import java.io.*;
import java.util.*;
/**
* Created with IntelliJ IDEA.
* User: pradeepnayak
* Date: 23/02/14
* Time: 3:45 PM
* To change this template use File | Settings | File Templates.
@pradeep1288
pradeep1288 / tsp.java
Created February 28, 2014 08:36
AI Assignment 2 - Completed
import java.io.*;
import java.util.*;
public class tsp {
public static void main(String[] args) throws IOException{
int taskNumber = Integer.parseInt(args[1]);
Graph g = new Graph();
buildShortestPathGraph(g,taskNumber,args);