This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
OlderNewer