code stringlengths 3 1.18M | language stringclasses 1
value |
|---|---|
/*
* Copyright 2011 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... | Java |
/*
* Copyright 2011 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... | Java |
/*
* Copyright 2011 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... | Java |
/** Automatically generated file. DO NOT MODIFY */
package org.sagemath.droid;
public final class BuildConfig {
public final static boolean DEBUG = true;
} | Java |
package android.text.format;
import java.util.Calendar;
import java.util.Date;
public class Time {
private final static String TAG = "Time";
private Date date;
public void setToNow() {
Calendar cal = Calendar.getInstance();
date = cal.getTime();
}
public String toMillis(boolean ignoreDst) {
return St... | Java |
package android.util;
public class Log {
private static final String TAG = "Log";
public static void d(String tag, String msg) {
System.out.println(tag + "\t" + msg);
}
public static void e(String tag, String msg) {
System.out.println(tag + "\t" + msg);
}
}
| Java |
package org.json;
/**
* The JSONException is thrown by the JSON.org classes when things are amiss.
* @author JSON.org
* @version 2010-12-24
*/
public class JSONException extends Exception {
private static final long serialVersionUID = 0;
private Throwable cause;
/**
* Constructs a JSONExcep... | Java |
package org.json;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... | Java |
package org.json;
/*
Copyright (c) 2008 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... | Java |
package org.json;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, ... | Java |
package org.json;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, ... | Java |
package org.json;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, ... | Java |
package org.json;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, ... | Java |
package org.json;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... | Java |
package org.json;
/*
Copyright (c) 2006 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, ... | Java |
package org.json;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, ... | Java |
package org.json;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StringReader;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software a... | Java |
package org.json;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, ... | Java |
package org.json;
/**
* The <code>JSONString</code> interface allows a <code>toJSONString()</code>
* method so that a class can change the behavior of
* <code>JSONObject.toString()</code>, <code>JSONArray.toString()</code>,
* and <code>JSONWriter.value(</code>Object<code>)</code>. The
* <code>toJSONString... | Java |
package org.json;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.io.StringWriter;
import junit.framework.TestCase;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
... | Java |
package org.json;
import java.io.IOException;
import java.io.Writer;
/*
Copyright (c) 2006 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including witho... | Java |
package org.json;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... | Java |
package org.sagemath.singlecellserver;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URISyntaxException;
import java.text.DateFormat;
import java.util.LinkedList;
import java.util.ListIterator;
import java.util.Timer;
import jav... | Java |
package org.sagemath.singlecellserver;
import org.json.JSONException;
import org.json.JSONObject;
/*
*
* jQuery({
* "content": [{
* "parent_header": {
* "username": "", "msg_id": "749529bd-bcfe-43a7-b660-2cea20df3f32",
* "session": "7af9a99a-2a0d-438f-8576-5e0bd853501a"},
* "msg_type"... | Java |
package org.sagemath.singlecellserver;
import java.util.UUID;
import junit.framework.Assert;
import org.json.JSONException;
import org.json.JSONObject;
import android.util.Log;
/**
* The base class for a server reply
*
* @author vbraun
*
*/
public class CommandReply extends Command {
private final static St... | Java |
package org.sagemath.singlecellserver;
import java.util.UUID;
import junit.framework.Assert;
import org.json.JSONException;
import org.json.JSONObject;
import android.util.Log;
/**
* The base class for server communication. All derived classes should
* derive from CommandRequest and CommandReply, but not from C... | Java |
package org.sagemath.singlecellserver;
import org.json.JSONException;
import org.json.JSONObject;
public class ExecuteReply extends CommandOutput {
private final static String TAG = "ExecuteReply";
private String status;
protected ExecuteReply(JSONObject json) throws JSONException {
super(json);
JSONObject... | Java |
package org.sagemath.singlecellserver;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.LinkedList;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class HtmlFiles extends CommandOutput {
private final static String TA... | Java |
package org.sagemath.singlecellserver;
import org.json.JSONException;
import org.json.JSONObject;
/**
* Roughly, a CommandOutput is any JSON object that has a "output_block" field. These are intended
* to be displayed on the screen.
*
* @author vbraun
*
*/
public class CommandOutput extends CommandReply {
pr... | Java |
package org.sagemath.singlecellserver;
import junit.framework.Assert;
import org.json.JSONException;
import org.json.JSONObject;
public class DisplayData extends CommandOutput {
private final static String TAG = "DisplayData";
private JSONObject data;
protected String value, mime;
protected DisplayData(JSONO... | Java |
package org.sagemath.singlecellserver;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.Buffer;
import org.apache.http.HttpEntity;
i... | Java |
package org.sagemath.singlecellserver;
import org.json.JSONException;
import org.json.JSONObject;
/**
* <h1>Streams (stdout, stderr, etc)</h1>
* <p>
* <pre><code>
* Message type: ``stream``::
* content = {
* # The name of the stream is one of 'stdin', 'stdout', 'stderr'
* 'name' : str,
*
... | Java |
package org.sagemath.singlecellserver;
public class HttpError extends CommandReply {
private final static String TAG = "HttpError";
protected String message;
protected HttpError(CommandRequest request, String message) {
super(request);
this.message = message;
}
public String toString() {
return "HTTP... | Java |
package org.sagemath.singlecellserver;
import java.util.LinkedList;
import java.util.UUID;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class ExecuteRequest extends CommandRequest {
private final static String TAG = "ExecuteRequest";
String input;
boolean sage;
... | Java |
package org.sagemath.singlecellserver;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.LinkedList;
import java.util.ListIterator;
import java.util.UUID... | Java |
package org.sagemath.singlecellserver;
import org.json.JSONException;
import org.json.JSONObject;
public class SessionEnd extends CommandReply {
public final static String TAG = "SessionEnd";
protected SessionEnd(JSONObject json) throws JSONException {
super(json);
}
public String toString() {
return "End o... | Java |
package org.sagemath.singlecellserver;
import java.io.StringWriter;
/**
*
* @author Elad Tabak
* @since 28-Nov-2011
* @version 0.1
*
*/
public class JSONWriter extends StringWriter {
private int indent = 0;
@Override
public void write(int c) {
if (((char)c) == '[' || ((char)c) == '{') {
... | Java |
package org.sagemath.singlecellserver;
import java.util.Iterator;
import org.json.JSONException;
import org.json.JSONObject;
/**
* <h1>Python output</h1>
* <p>
* When Python produces output from code that has been compiled in with the
* 'single' flag to :func:`compile`, any expression that produces a value (suc... | Java |
package org.sagemath.singlecellserver;
import java.util.LinkedList;
import java.util.ListIterator;
public class Transaction {
protected final SageSingleCell server;
protected final CommandRequest request;
protected final LinkedList<CommandReply> reply;
public static class Factory {
public Transaction newTrans... | Java |
package org.sagemath.commandline;
import java.util.LinkedList;
import org.sagemath.singlecellserver.CommandOutput;
import org.sagemath.singlecellserver.CommandReply;
import org.sagemath.singlecellserver.Interact;
import org.sagemath.singlecellserver.SageSingleCell;
import org.sagemath.singlecellserver.SageSingleCell.... | Java |
package org.sagemath.commandline;
import java.io.Console;
import junit.framework.Assert;
public class Client {
private static final String TAG = "Client";
private Console console;
public Client() {
console = System.console();
}
public static void main(String[] args) {
Client client = new Client();
if... | Java |
package org.sagemath.commandline;
import java.util.LinkedList;
import org.sagemath.singlecellserver.CommandReply;
import org.sagemath.singlecellserver.CommandRequest;
import org.sagemath.singlecellserver.SageSingleCell;
import org.sagemath.singlecellserver.Transaction;
public class MyTransaction extends Transaction... | Java |
package org.sagemath.commandline;
import java.io.Console;
import java.util.LinkedList;
import java.util.ListIterator;
import javax.swing.SingleSelectionModel;
import org.sagemath.singlecellserver.CommandOutput;
import org.sagemath.singlecellserver.CommandReply;
import org.sagemath.singlecellserver.ExecuteRequest;
im... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dao;
import java.util.List;
import pojo.User;
/**
*
* @author 4pril
*/
public class UserDAO extends MyQuery{
@Override
protected Class getPOJOClass() {
return this.getCl... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dao;
import java.util.List;
import org.hibernate.Hibernate;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.Transaction;
import util.HibernateUtil;
/**
... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dao;
import java.util.List;
import pojo.ObjType;
/**
*
* @author 4pril
*/
public class ObjectTypeDAO extends MyQuery{
public static ObjType getObjectTypeByName(String obj_name){
St... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dao;
import pojo.Object;
/**
*
* @author 4pril
*/
public class ObjectDAO extends MyQuery{
@Override
protected Class getPOJOClass() {
return this.getClass();
}
... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dao;
import java.util.List;
import myClass.Post;
import pojo.User;
/**
*
* @author 4pril
*/
public class PostDAO extends ObjectDAO{
public static List<Post> getListPost(User u_id){
... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package system;
/**
*
* @author 4pril
*/
public class System {
private static String login_url = "login";
private static String home_url = "index";
/**
* @return the login_url
*... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package myClass;
import dao.ObjectTypeDAO;
/**
*
* @author 4pril
*/
public class Post extends pojo.Object{
public Post(){
this.setObjType( ObjectTypeDAO.getObjectTypeByName("post"));
... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package controller;
import dao.MyQuery;
import dao.UserDAO;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URLDecoder;
import java.util.List;
import java.util.logging.Level;
import ... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package controller;
import dao.MyQuery;
import dao.UserDAO;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotati... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package controller;
import dao.MyQuery;
import dao.UserDAO;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.lang.reflect.... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package controller;
import system.System;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package controller;
import system.System;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package util;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.SessionFactory;
/**
* Hibernate Utility class with a convenient method to get Session Factory
* object.
*
* @author ... | Java |
package controller;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.HashMap;
import java.util... | Java |
package info.tAIR.tAIRApp;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class ContributorActivity extends Activity {
public void onCr... | Java |
package info.tAIR.tAIRApp;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class AndDevActivity extends Activity {
@Override
public vo... | Java |
package info.tAIR.tAIRApp;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class GroupActivity extends Activity {
public void onCreate... | Java |
package info.tAIR.tAIRApp;
import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;
public class tAIRTabWidget extends TabActivity {
/** Called when the activity is first created. */
@Override
public void ... | Java |
package info.tAIR.tAIRApp;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;
public class CodeActivity extends Activity ... | Java |
package info.tAIR.tAIRApp;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class AIActivity extends Activity {
public void onCreat... | Java |
package info.tAIR.tAIRApp;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class tAIRActivity extends Activity {
@Override
public void... | Java |
package fracPackage;
import java.awt.*;
public class ColorScheme
{
public Color[] colorArr;
public ColorScheme()
{
}
public Color color(int nIter)
{
int red = (int)Math.round(-120*Math.cos(nIter/6.) + 120);
int green = (int)Math.round(-120*Math.cos(nIter/6. + 1.04) + 120);
... | Java |
package fracPackage;
import java.awt.*;
public class FractalPoint extends pObject
{
private double x, y;
private int nIter;
private Iteration pIter;
public FractalPoint(int i0, int j0, double x0, double y0, Iteration iter)
{
super(x0, y0);
x = x0;
y = y0;
nIter = 0;
pIter = iter;
}... | Java |
package fracPackage;
public class pObject{
private double re, im;
public pObject(double x, double y)
{
re = 0; im = 0;
}
public void iterate (Iteration iter, double x, double y)
{
double oldRe = re;
re = re*re - im*im + x;
im = 2*im*oldRe + y;
}
public boolean isOut (Iteration ite... | Java |
package fracPackage;
import java.awt.*;
public class ColorScheme
{
public Color[] colorArr;
public double alpha = 0;
public double betta = 0;
public double gamma = 0;
public ColorScheme()
{
}
public ColorScheme(double phi)
{
if(phi<10){
this.alpha = phi*0.628;
} else if(... | Java |
/*package fracPackage;
import javax.swing.*;
import java.awt.*;
import java.awt.image.*;
import java.awt.event.*;
public class rawDraw extends JFrame implements KeyListener
{
UserMenu usrMenu;
public rawDraw()
{
super("RawMandelbrot");
addKeyListener(this);
usrMenu = new UserMenu(this);
... | Java |
package fracPackage;
import polishNotation.Iteration;
public class Message
{
public int type;
public int dx;
public int dy;
public double chSize;
public FractalPoint fPoint;
public int i;
public int j;
public double xLeft;
public double xRight;
public double yLow;
public double y... | Java |
package fracPackage;
import polishNotation.Iteration;
import java.awt.*;
public class FractalPoint extends pObject
{
private double x, y;
private int nIter;
public FractalPoint(double x0, double y0, Iteration iter, double ceiling)
{
super(x0, y0, iter, ceiling);
x = x0;
y = y0;
nIter = 0;
... | Java |
package fracPackage;
import java.awt.*;
import polishNotation.Iteration;
import polishNotation.PolishNotation;
import java.awt.image.*;
//---
public class Fractal implements Runnable
{
Thread computation;
static double xLeftDefault = -2;
static double xRightDefault = 2;
static double yLowDefault... | Java |
package fracPackage;
import polishNotation.Iteration;
import polishNotation.PolishNotation;
import java.util.*;
public class SynchrMenu
{
public static final int NOTHING = -1;
public static final int MAKENEWFRACTAL = 0;
public static final int CHANGESCALE = 1;
public static final int MOVEX... | Java |
package fracPackage;
import polishNotation.Complex;
import polishNotation.Iteration;
public class pObject
{
Iteration iter;
private Complex z;
private Complex c;
private double ceiling;
public pObject(double x, double y, Iteration Iter, double Ceiling) // MANDELBROT
{
z = new Complex(0,0); c = ... | Java |
package fracPackage;
public interface AbleToDraw
{
public void putIterXYdata(double x, double y, int nIter);
}
| Java |
package fracPackage;
import java.awt.Component;
import polishNotation.Iteration;
public class JuliaFractal extends Fractal
{
public JuliaFractal(SynchrMenu synchr, Component Graph, AbleToDraw Window)
{
super(synchr, Graph, Window);
a = synchr.a();
b = synchr.b();
}
public FractalPoint mak... | Java |
package polishNotation;
public class OperObject extends Operand{
private boolean isOperand;
private boolean isOperator;
private Operand operand;
private char operator;
OperObject(boolean nd, boolean tor, Operand o, char c){ //constructors
this.isOperand = nd;
this.isOperator = tor;
this.... | Java |
package polishNotation;
import java.util.LinkedList;
public class PolishNotation{
public LinkedList<OperObject> outline; //fields
public LinkedList<OperObject> stack;
public String s;
public PolishNotation(){ //constructor
s = "";
outline = new LinkedList<OperObject>() ;
stack = new L... | Java |
package polishNotation;
public class Complex {
private static final double EPS = 1e-12; // accuracy
private double re, im;
public Complex(double re, double im) { // constructors
this.re = re; this.im = im;
}
public Complex(double re){
this(re, 0.0);
}
... | Java |
package polishNotation;
public class Operand extends Complex{
private boolean isNumber;
private boolean isZ;
private boolean isC;
private Complex value;
Operand(){ //constructors
this.isNumber = true;
this.isZ = false;
this.isC = false;
this.value = new Complex();
}
public Oper... | Java |
package polishNotation;
import java.util.LinkedList;
//import java.util.LinkedList;
public class Iteration{
public LinkedList<OperObject> outline;
public Complex z;
public Complex c;
public Iteration(){
z = new Complex();
c = new Complex();
this.outline = new LinkedList<OperObject>();
}
... | Java |
package main_interface;
import java.awt.Image;
import java.awt.image.ImageObserver;
public class FractalObserver implements ImageObserver {
public boolean imageUpdate(Image img,int infoflags,int x,int y, int width, int heith){
return true;
}
}
| Java |
package main_interface;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.io.File;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.... | Java |
package main_interface;
import javax.swing.filechooser.FileFilter;
public class JpgFilesFilter extends FileFilter {
public boolean accept(java.io.File file) {
if ( file.isDirectory() )
return true;
return ( file.getName().endsWith("jpg")) ;
}
public String getDescription() {
return "Изображения (*.jpg)";
... | Java |
package main_interface;
import javax.swing.filechooser.FileFilter;
public class PngFilesFilter extends FileFilter {
public boolean accept(java.io.File file) {
if ( file.isDirectory() )
return true;
return ( file.getName().endsWith("png")) ;
}
public String getDescription() {
return "Изображения (*.png)";
... | Java |
package main_interface;
import javax.swing.filechooser.FileFilter;
public class TextFilesFilter extends FileFilter {
public boolean accept(java.io.File file) {
if ( file.isDirectory() ) return true;
return ( file.getName().endsWith(".frac") );
}
public String getDescription() {
return "Фрактал (*.f... | Java |
package main_interface;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPa... | Java |
package main_interface;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import java... | Java |
package main_interface;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSlide... | Java |
package main_interface;
import javax.imageio.ImageIO;
import javax.swing.*;
import javax.swing.border.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.BufferedImage;
import java.awt.image.ImageObserver;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.i... | Java |
package fracPackage;
import java.awt.*;
public class FractalPoint extends pObject
{
private double x, y;
private int nIter;
private Iteration pIter;
public FractalPoint(int i0, int j0, double x0, double y0, Iteration iter)
{
super(x0, y0);
x = x0;
y = y0;
nIter = 0;
pIter = iter;
}... | Java |
//package com.serial;
//
//import java.lang.reflect.Array;
//import java.util.Arrays;
//import java.util.HashMap;
//
//import android.os.Handler;
//import android.util.Log;
//
//import com.friendlyarm.AndroidSDK.HardwareControler;
//import com.mini6410.DataPackage;
//import com.mini6410.MainActivity;
//
//... | Java |
package com.mini6410.PWM;
import android.app.Activity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.T... | Java |
package com.mini6410.EEPROM;
import android.os.Handler;
import android.util.Log;
import com.friendlyarm.AndroidSDK.HardwareControler;
public class ReadEEPROM{
private static final String TAG = "WriteEEPROM";
private static final int MAX_LENGTH = 256; //EEPROM最多可存储256个字节数据
Handler mHandler = null;
... | Java |
package com.mini6410.EEPROM;
import android.os.Handler;
import android.util.Log;
import com.friendlyarm.AndroidSDK.HardwareControler;
public class WriteEEPROM{
private static final String TAG = "WriteEEPROM";
private static final int MAX_LENGTH = 256; //EEPROM最多可存储256个字节数据
Handler mHandler = null;
... | Java |
package com.mini6410.EEPROM;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.Editable;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.EditText;
import com.mini6410.R;
public cla... | Java |
package com.mini6410.ADC;
import java.util.Timer;
import java.util.TimerTask;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.widget.TextView;
import com.friendlyarm.AndroidSDK.HardwareControler;
import com.mini6410.... | Java |
package com.mini6410.HelloMini6410;
import com.mini6410.R;
import android.app.Activity;
import android.os.Bundle;
/**
*
* ClassName:HelloMini6410Activity
* Reason: Hello Mini6410 Demo
*
* @author snowdream
* @version
* @since Ver 1.1
* @Date 2011 2012-03-10 20:11
*
* @see
*/
public class Hel... | Java |
package com.mini6410.LED;
import com.friendlyarm.AndroidSDK.HardwareControler;
import com.mini6410.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.CompoundButton;
import android.widget.ToggleButton;
/**
*
* ClassName:LEDActivity
* Reason: LED Demo
*
* @author snowdream
* @ve... | Java |
package com.mini6410;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
i... | Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.