text stringlengths 3 1.18M |
|---|
/**
* Title: <p>
* Description: <p>
* Copyright: Copyright (c) <p>
* Company: <p>
* @author
* @version 1.0
*/
public class Test_Hopfield {
static float[] data [] = {
{1, 1, 1, -1, -1, -1, -1, -1, -1, -1},
{-1, -1, -1, 1, 1, 1, -1, -1, -1, -1},
{-1, -1, -1, -1, -1, -... |
/**
* Title: <p>
* Description: <p>
* Copyright: Copyright (c) <p>
* Company: <p>
* @author
* @version 1.0
*/
import javax.swing.*;
import java.awt.*;
public class Plot2DPanel extends java.awt.Canvas { // JPanel {
public Plot2DPanel(int num1, int num2, float min, float max, float[][] value... |
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
/**
* Title: <p>
* Description: <p>
* Copyright: Copyright (c) <p>
* Company: <p>
* @author
* @version 1.0
*/
public class GUITest_1H extends JFrame {
static float[] in1 = {0.1f, 0.1f, 0.9f};
static float[] in2 = {0.1f, ... |
/**
* Title: <p>
* Description: <p>
* Copyright: Copyright (c) <p>
* Company: <p>
* @author
* @version 1.0
*/
import javax.swing.*;
import java.awt.*;
public class Plot1DPanel extends java.awt.Canvas { // JPanel {
public Plot1DPanel(int num, float min, float max, float[] values) {
... |
// 3/7/2004: note: someone asked for an XOR example... -Mark
public class xor {
static float FALSE = 0.01f;
static float TRUE = 0.99f;
static float[] in1 = {FALSE, FALSE};
static float[] in2 = {FALSE, TRUE};
static float[] in3 = {TRUE, FALSE};
static float[] in4 = {TRUE, TRUE};
static ... |
/**
* Title: <p>
* Description: <p>
* Copyright: Copyright (c) <p>
* Company: <p>
* @author
* @version 1.0
*/
public class Test_2H {
static float[] in1 = {0.1f, 0.1f, 0.9f};
static float[] in2 = {0.1f, 0.9f, 0.1f};
static float[] in3 = {0.9f, 0.1f, 0.1f};
static float[] out1 ... |
/**
* Title: Neural_1H<p>
* Description: A one hidden layer back propagtion neural network model<p>
* Copyright: Copyright (c) 2000 Mark Watson. Artistic Open Source License<p>
* @author Mark Watson
* @version 1.2
*/
import java.util.*;
import java.io.*;
class Neural_1H implements Serializable {
... |
/**
* Title: Neural_2H<p>
* Description: Two hidden layer back propagtion neural network model<p>
* Copyright: Copyright (c) 2000 Mark Watson. Artisitic Open Source License<p>
* @author Mark Watson
* @version 1.2
*/
import java.util.*;
import java.io.*;
public class Neural_2H_momentum implements Seri... |
/**
* Title: Neural_2H<p>
* Description: Two hidden layer back propagtion neural network model<p>
* Copyright: Copyright (c) 2000 Mark Watson. Artisitic Open Source License<p>
* @author Mark Watson
* @version 1.2
*/
import java.util.*;
import java.io.*;
class Neural_2H implements Serializable {
pr... |
/**
* Title: <p>
* Description: <p>
* Copyright: Copyright (c) <p>
* Company: <p>
* @author
* @version 1.0
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class GUITest_2H_momentum extends JFrame {
static float[] in1 = {0.1f, 0.1f, 0.9f};
static float[] in2 =... |
public class DepthFirstSearch extends AbstractGraphSearch {
/** findPath - abstract method in super class */
public int [] findPath(int start_node, int goal_node) { // return an array of node indices
System.out.println("Entered DepthFirstSearch.findPath(" +
start_node + ", " ... |
import javax.swing.*;
import java.awt.*;
public class GraphBreadthFirstSearch extends JFrame {
JPanel jPanel1 = new JPanel();
public GraphBreadthFirstSearch() {
BreadthFirstSearch engine = new BreadthFirstSearch();
// Define a test network before calling the super class 'init':
engine.addNode("0", 20, 4... |
import java.util.Vector;
abstract public class AbstractGraphSearch {
public void addNode(String name, int x, int y) {
System.out.println("Adding node: " + name + ", " + x + ", " + y);
nodeNames[numNodes] = name;
node_x[numNodes] = x;
node_y[numNodes] = y;
numNodes++;
}
public int getNumNodes() { ret... |
public class BreadthFirstSearch extends AbstractGraphSearch {
/** findPath - abstract method in super class */
public int [] findPath(int start_node, int goal_node) { // return an array of node indices
System.out.println("Entered BreadthFirstSearch.findPath(" +
start_node + ", " + goal_node + ")");
// ... |
import javax.swing.*;
import java.awt.*;
public class GraphDepthFirstSearch extends JFrame {
JPanel jPanel1 = new JPanel();
public GraphDepthFirstSearch() {
DepthFirstSearch engine = new DepthFirstSearch();
// Define a test network before calling the super class 'init':
engine.addNode("0", 20, 40);
e... |
// License your choice: LGPL, GPL, Mozilla, or Apache
import edu.isi.powerloom.*;
import edu.isi.powerloom.logic.*;
import edu.isi.stella.Cons;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class PowerLoomUtils {
public PowerLoomUtils() {
Syste... |
import java.util.List;
public class PowerLoomExample_1 {
/**
* @param args
*/
public static void main(String[] args) {
System.out.println("Testing PowerLoom Wrapper Class");
PowerLoomUtils plu = new PowerLoomUtils();
plu.load("test_data/test.plm");
plu.changeModule("BUSINESS");
// Note: query strings... |
import java.util.List;
// File: textGenetic.java
// This file contains a text-mode test program
// for class Genetic.
public class TestGenetic {
static MyGenetic genetic_experiment;
static public void main(String args[]) {
// we will use chromosomes with 10 1 bit genes per
// chromosomes, an... |
// Genetic Algorithm Java classes
//
// Copyright 1996-2008, Mark Watson. All rights reserved.
import java.util.*;
abstract public class Genetic {
protected int numGenesPerChromosome; // number of genes per chromosome
protected int numChromosomes; // number of chromosomes
List<Chromosome> chromosomes;
private f... |
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.knowledgebooks.nlp.util.Tokenizer;
/**
* A spel... |
import java.util.*;
import java.io.*;
public class Markov {
static public void main(String[] args) {
new Markov();
}
/**
* The public constructor does everything:
*
* 1. reads a tagged input file tagged_text.txt and builds
* a list of all possible tags and words
*... |
import java.io.IOException;
import java.util.List;
import org.openrdf.query.MalformedQueryException;
import org.openrdf.query.QueryEvaluationException;
import org.openrdf.repository.RepositoryException;
import org.openrdf.rio.RDFParseException;
/**
*
* <p/>
* Copyright 2002-2008 by Mark Watson. All rights reserve... |
import java.io.IOException;
import java.util.List;
import org.openrdf.query.MalformedQueryException;
import org.openrdf.query.QueryEvaluationException;
import org.openrdf.repository.RepositoryException;
import org.openrdf.rio.RDFParseException;
/**
*
* <p/>
* Copyright 2002-2008 by Mark Watson. All rights reserved... |
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.openrdf.query.BindingSet;
import org.openrdf.query.MalformedQueryException;
import org.openrdf.query.QueryEvaluationE... |
import java.io.IOException;
import org.openrdf.repository.RepositoryException;
import org.openrdf.rio.RDFHandlerException;
import org.openrdf.rio.RDFParseException;
/**
*
* <p/>
* Copyright 2002-2008 by Mark Watson. All rights reserved.
* <p/>
* This software is not public domain. It can be legally
* used unde... |
import java.util.List;
/**
* <p/>
* Copyright 2008 by Mark Watson. All rights reserved.
* <p/>
* This software is not public domain. It can be legally
* used under either the LGPL version 3 or Apache 2 license.
*
* @author Mark Watson
*/
public interface ISparqlProcessResults {
/**
* Callback handler... |
import java.io.IOException;
import java.util.List;
import org.openrdf.query.MalformedQueryException;
import org.openrdf.query.QueryEvaluationException;
import org.openrdf.repository.RepositoryException;
import org.openrdf.rio.RDFParseException;
/**
*
* <p/>
* Copyright 2002-2008 by Mark Watson. All rights reserved... |
import java.awt.Dimension;
/**
* Class Maze - private class for representing search space as a two-dimensional maze
*/
public class Maze {
public static short OBSTICLE = -1;
public static short START_LOC_VALUE = -2;
public static short GOAL_LOC_VALUE = -3;
private int width = 0;
private int heigh... |
/**
* Title: DepthFirstSearchEngine<p>
* Description: Performs a depth first search in a maze<p>
* Copyright: Copyright (c) Mark Watson, Released under Open Source Artistic License<p>
* Company: Mark Watson Associates<p>
* @author Mark Watson
* @version 1.0
*/
import java.awt.Dimension;
public ... |
/**
* Title: AbstractSearchEngine<p>
* Description: Abstract search engine for searching paths in a maze<p>
* Copyright: Copyright (c) Mark Watson, Released under Open Source Artistic License<p>
* Company: Mark Watson Associates<p>
* @author Mark Watson
* @version 1.0
*/
import java.awt.Dimensio... |
/**
* Title: BreadthFirstSearchEngine<p>
* Description: Performs a Breadth first search in a maze<p>
* Copyright: Copyright (c) Mark Watson, Released under Open Source Artistic License<p>
* Company: Mark Watson Associates<p>
* @author Mark Watson
* @version 1.0
*/
import java.awt.Dimension;
pub... |
import javax.swing.*;
import java.awt.*;
import java.awt.image.*;
import java.awt.event.*;
/**
* Title: MazeDepthFirstSearch<p>
* Description: Demo program for Java AI Programming<p>
* Copyright: Copyright (c) Mark Watson, Released under Open Source Artistic License<p>
* Company: Mark Watson Associa... |
import javax.swing.*;
import java.awt.*;
import java.awt.image.*;
import java.awt.event.*;
/**
* Title: MazeBreadthFirstSearch<p>
* Description: Demo program for Java AI Programming<p>
* Copyright: Copyright (c) Mark Watson, Released under Open Source Artistic License<p>
* Company: Mark Watson Assoc... |
import java.io.BufferedInputStream;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
import java.util.Scanner;
import javax.xml.parsers.DocumentBu... |
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.inde... |
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.TreeSet;
public class InMemorySearch {
private final int MAX_WORDS_PER_DOCUMEN... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
/*
Jazzy - a Java library for Spell Checking
Copyright (C) 2001 Mindaugas Idzelis
Full text of license can be found in LICENSE.txt
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versio... |
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import com.swabunga.spell.engine.SpellDictionaryHashMap;
import com.swabunga.spell.event.SpellChecker;
public class SpellingJazzyTester {
/**
* @param args
* @throws IOException
* @throws FileNotFoundException
*/
publ... |
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
public class DumpMetaData {
public DumpMetaData(Strin... |
import java.io.File;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import org.w3c.dom.*;
import org.w3c.dom.Document;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException... |
public class ChessMove extends Move {
public int from;
public int to;
}
|
public class TicTacToePosition extends Position {
final static public int BLANK = 0;
final static public int HUMAN = 1;
final static public int PROGRAM = -1;
int [] board = new int[9];
public String toString() {
StringBuffer sb = new StringBuffer("[");
for (int i=0; i<9; i++) {
... |
abstract public class Move {
}
|
import java.util.*;
public abstract class GameSearch {
public static final boolean DEBUG = false;
/*
* Note: the abstract Position also needs to be
* subclassed to write a new game program.
*/
/*
* Note: the abstract class Move also needs to be subclassed.
*
*/
... |
public class TicTacToeMove extends Move {
public int moveIndex;
}
|
abstract public class Position {
} |
public class ChessPosition extends Position {
final static public int BLANK = 0;
final static public int HUMAN = 1;
final static public int PROGRAM = -1;
final static public int PAWN = 1;
final static public int KNIGHT = 2;
final static public int BISHOP = 3;
final static public int ROOK = 4... |
import java.util.*;
import java.io.*;
public class Chess extends GameSearch {
/**
* Notes: PROGRAM false -1, HUMAN true 1
*/
/**
* PUBLIC API (mostly fromGameSearch)
*/
public boolean drawnPosition(Position p) {
/**
* We want to keep searching:
... |
import java.util.*;
public class TicTacToe extends GameSearch {
public boolean drawnPosition(Position p) {
if (GameSearch.DEBUG) System.out.println("drawnPosition("+p+")");
boolean ret = true;
TicTacToePosition pos = (TicTacToePosition)p;
for (int i=0; i<9; i++) {
if (p... |
package com.example.testhandler;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.view.View;
import android... |
/*
* Copyright 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... |
/*
* Copyright 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... |
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/*
purpose find match only a line start
*/
public class testLookForwardPattern
{
public String datas[]={
"08024 2008-03-03 08 12 17 20 30 01 02 37092316 66940000 0 0 9 271283 35 14117 51 3000 1855 500 7102 200 71356 10 778481 5 0 0 2 162769 7 8470 0 4707... |
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/*
purpose find match only a line start
*/
public class testGroupPattern
{
static String pattern = "(\\w+)\\s(\\1)";
static String input = "He said that that was the the correct answer.";
public static void main(String[] args)
{
testGroupP... |
/*
* Copyright 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... |
package com.example.android.MyApplication;
import android.app.Application;
import android.util.Log;
public class GlobalApplication extends Application{
public static String TAG="navigation_GlobalApplication";
private static GlobalApplication singleton;
private String username;
private String password;
public Stri... |
package com.sputnik.wispr;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.NetworkInfo.State;
import android.net.wifi.WifiInfo;
i... |
package com.sputnik.wispr.logger;
public interface WebLogger {
public static final String CONNECTED = "CONNECTED";
public static final String BLOCKED_URL = "http://www.saltando.net/uploads/android.txt";
public String login(String user, String password);
}
|
package com.sputnik.wispr.logger;
import java.io.IOException;
import java.util.Map;
import android.util.Log;
import com.sputnik.wispr.util.HttpUtils;
import com.sputnik.wispr.util.WISPrConstants;
public abstract class SimpleHTTPLogger extends HTTPLogger {
protected static String TAG = SimpleHTTPLogger.class.getNam... |
package com.sputnik.wispr.logger;
import java.util.HashMap;
import java.util.Map;
public class BTFonLogger extends SimpleHTTPLogger {
protected static String TAG = BTFonLogger.class.getName();
private static final String NETWORK_PREFIX = "BTFON/";
public BTFonLogger() {
super("https://www.btopenzone.com:8443/a... |
package com.sputnik.wispr.logger;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.HashMap;
import java.util.Map;
import android.util.Log;
import com.sputnik.wispr.util.HttpUtils;
public abstract class HTTPLogger implements WebLogge... |
package com.sputnik.wispr.logger;
import java.util.HashMap;
import java.util.Map;
public class LivedoorLogger extends SimpleHTTPLogger {
protected static String TAG = LivedoorLogger.class.getName();
private static final String NETWORK_SUFIX = "@fon";
public LivedoorLogger() {
super("https://vauth.lw.livedoor.c... |
package com.sputnik.wispr.logger;
import java.util.HashMap;
import java.util.Map;
import org.xml.sax.SAXException;
import android.util.Log;
import com.sputnik.wispr.handler.WISPrResponseHandler;
import com.sputnik.wispr.util.HttpUtils;
import com.sputnik.wispr.util.WISPrConstants;
import com.sputnik.wispr.util.WISP... |
package com.sputnik.wispr.logger;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import org.xml.sax.SAXException;
import android.util.Log;
import com.sputnik.wispr.handler.WISPrIn... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.