Skip to content

Instantly share code, notes, and snippets.

import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main (String[] args) throws java.lang.Exception
{
try{
ArrayList<Integer> list= new ArrayList<Integer>();
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main (String[] args) throws java.lang.Exception
{
try{
ArrayList<Integer> list= new ArrayList<Integer>();
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.Net;
using System.IO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.Net;
using System.IO;
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<h2>
Get the List of WSDL addresses
</h2>
<p>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
public class Pair<L,R> {
private L l;
private R r;
public Pair(L l, R r){
this.l = l;
this.r = r;
}
public L getL(){ return l; }
public R getR(){ return r; }
public void setL(L l){ this.l = l; }
<?xml version="1.0" encoding="utf-8" standalone="no"?><web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>CreateNewTodo</servlet-name>
<servlet-class>com.test.todo.dao.ServletCreateTodo</servlet-class>
</servlet>
<servlet>
<servlet-name>RemoveTodo</servlet-name>
<servlet-class>com.test.todo.dao..ServletRemoveTodo</servlet-class>
</servlet>
<servlet-mapping>
@KodeSeeker
KodeSeeker / MajorityElement.java
Created March 14, 2013 03:32
Finding the majority element in an array
public class MajorityElement {
public static void main(String[] args) {
int[] list = new int[] {1, 2, 3, 4, 2, 3, 4, 2, 3, 2, 1, 2, 3, 4, 2, 2, 2};
int count = 1;
int majorityElement = list[0];
for(int index = 1; index < list.length; index++) {
if(majorityElement != list[index]) {
if(count == 0) {
majorityElement = list[index];
@KodeSeeker
KodeSeeker / GraphSearch.java
Last active December 14, 2015 22:29
Given a directed graph, design an algorithm to find out whether there is a route between two nodes
public enum State {
Unvisited, Visited, Visiting;
}
// let the start node and the end node be both the nodes.
// Implementation using DFS.
public static boolean search(Graph g, Node start, Node end) {
LinkedList<Node> stack = new LinkedList<Node>(); // operates as Stack
for (Node u : g.getNodes()) {
u.state = State.Unvisited;