code
stringlengths
3
1.18M
language
stringclasses
1 value
/* * 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 applicable law or agreed to in writing, software distributed under t...
Java
/* * 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 applicable law or agreed to in writing, software distributed under t...
Java
/* * Copyright (c) 2012 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2012 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2010 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2010 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2012 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2012 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * 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 applicable law or agreed to in writing, software distributed under t...
Java
/* * 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 applicable law or agreed to in writing, software distributed under t...
Java
/* * 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 applicable law or agreed to in writing, software distributed under t...
Java
/* * 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 applicable law or agreed to in writing, software distributed under t...
Java
/* * 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 applicable law or agreed to in writing, software distributed under t...
Java
/* * Copyright (c) 2012 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2012 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2012 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2012 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2012 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2012 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2012 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2012 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2012 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2011 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2012 Google Inc. * * 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 applicable law or agreed to in ...
Java
/* * Copyright (c) 2012 Google Inc. * * 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 applicable law or agreed to in ...
Java
package com.example.tenmins; import java.util.ArrayList; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android....
Java
package com.example.tenmins; import java.io.IOException; import java.util.ArrayList; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.TimeZone; import java.util.Timer; import android.app.Activity; import android.content.Context; import android.content.Intent; import android....
Java
package com.example.tenmins; import java.util.ArrayList; import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.graphics.Typeface; import android.os.Bundle; import android.util.Log; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; im...
Java
package com.example.tenmins; import java.util.Random; import android.app.Activity; import android.graphics.Typeface; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; public c...
Java
package com.example.tenmins; import java.util.ArrayList; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.TimeZone; import android.app.Activity; import android.app.AlarmManager; import android.app.AlertDialog; import android.app.PendingIntent; import android.content.Context; i...
Java
package com.example.tenmins; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.TimeZone; import android.app.Activity; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bundle; im...
Java
package com.example.tenmins; import android.content.Context; import android.database.Cursor; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; public class Database { private static String DB_NA...
Java
package com.example.tenmins; public class Alarm_data{ private int id; private int clock; private String time; private int monday; private int tuesday; private int wednesday; private int thursday; private int friday; private int saturday; private int sunday; private String am_pm; public Ala...
Java
package com.example.tenmins; import java.util.Random; import android.app.Activity; import android.graphics.Typeface; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.TextView; import ...
Java
package com.example.ten_minutes_more; import java.util.ArrayList; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; import android.view.LayoutI...
Java
package com.example.ten_minutes_more; import java.io.IOException; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.TimeZone; import java.util.Timer; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.media.AudioManager; ...
Java
package com.example.ten_minutes_more; import java.util.ArrayList; import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.graphics.Typeface; import android.os.Bundle; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; import android.vie...
Java
package com.example.ten_minutes_more; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; public class AlarmReceiver extends BroadcastReceiver{ @Override public void onReceive(Context context, Intent intent) { Log.e("tag...
Java
package com.example.ten_minutes_more; import java.util.Random; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; public class Multi extends Activity { Button btn[]; String input_text; TextView num1, num2, inp...
Java
package com.example.ten_minutes_more; import java.util.ArrayList; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.Scanner; import java.util.TimeZone; import android.app.Activity; import android.app.AlarmManager; import android.app.AlertDialog; import android.app.PendingInten...
Java
package com.example.ten_minutes_more; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.TimeZone; import android.app.Activity; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bu...
Java
package com.example.ten_minutes_more; import android.content.Context; import android.database.Cursor; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; public class Database { private static Str...
Java
package com.example.ten_minutes_more; public class Alarm_data{ private int id; private int clock; private String time; private int monday; private int tuesday; private int wednesday; private int thursday; private int friday; private int saturday; private int sunday; private String am_pm; p...
Java
package com.example.ten_minutes_more; import java.util.Random; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class Text extends Activity { String[] str = { "설마 오늘도 ...
Java
/** * @file EclairMotionEvent.java * @brief * * Copyright (C)2010-2012 Magnus Uppman <magnus.uppman@gmail.com> * License: GPLv3+ */ package com.linuxfunkar.mousekeysremote; import android.view.MotionEvent; public class EclairMotionEvent extends WrapMotionEvent { protected EclairMotionEvent(MotionEvent even...
Java
package com.linuxfunkar.mousekeysremote; import java.io.UnsupportedEncodingException; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; import javax.crypto.BadPadd...
Java
/** * @file ColorPickerDialog.java * @brief * * Copyright (C)2012 Magnus Uppman <magnus.uppman@gmail.com> * License: GPLv3+ */ package com.linuxfunkar.mousekeysremote; import android.app.Dialog; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphi...
Java
/** * @file CustomDrawableView.java * @brief * * Copyright (C)2010-2012 Magnus Uppman <magnus.uppman@gmail.com> * License: GPLv3+ */ package com.linuxfunkar.mousekeysremote; import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.RectF; import andr...
Java
package com.linuxfunkar.mousekeysremote; import android.app.Dialog; import android.content.Context; import android.os.Bundle; import android.text.Editable; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class SimpleTextDialog e...
Java
package com.linuxfunkar.mousekeysremote; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.graphics.LightingColorFilter; import android.util.AttributeSet; import android.view.ContextMenu.ContextMenuInfo; import android.view.KeyEvent; import a...
Java
/** * @file MouseKeysRemote.java * @brief * * Copyright (C)2010-2012 Magnus Uppman <magnus.uppman@gmail.com> * License: GPLv3+ */ /** * Changelog: * 20101219 v.1.1 * Bugfix. New keys don't have a valid state when changing rows and cols. * Bugfix. Settings screen isn't scrollable. * Added key N/C for the p...
Java
package com.linuxfunkar.mousekeysremote; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; public class Preferences { private static Preferences preferences; private SharedPreferences prefs; public static Preferences getInstance(Context context) { ...
Java
package com.linuxfunkar.mousekeysremote; import android.text.Editable; import android.text.TextWatcher; public abstract class TextWatcherAdapter implements TextWatcher { @Override public void afterTextChanged(Editable s) { } @Override public void beforeTextChanged(CharSequence s, int start, int cou...
Java
/** * @file WrapMotionEvent.java * @brief * * Copyright (C)2010-2012 Magnus Uppman <magnus.uppman@gmail.com> * License: GPLv3+ */ package com.linuxfunkar.mousekeysremote; import android.view.MotionEvent; public class WrapMotionEvent { protected MotionEvent event; protected WrapMotionEvent(MotionEvent eve...
Java
package com.linuxfunkar.mousekeysremote; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.InputStreamReader; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetSocketAddress; import java.nio.charset.Charset; import android.app.Activity; imp...
Java
/** Automatically generated file. DO NOT MODIFY */ package com.linuxfunkar.mousekeysremote; public final class BuildConfig { public final static boolean DEBUG = true; }
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MyDatabase; import java.io.Serializable; import java.util.ArrayList; import java.util.Vector; /** * * @author HUYNHLOC */ public class Data implements Serializable { Vector<Database> _da...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MyDatabase; import java.io.Serializable; /** * * @author HUYNHLOC */ public class Command implements Serializable { public static enum CommandType { Message, // mot thong bao ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MyDatabase; import java.io.*; /** * * @author HUYNHLOC */ public class Server_Data { //Seriable một đối tượng xuống file public static void SerialDatabase(String fileName, Data data) th...
Java
package MyDatabase; import java.io.Serializable; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Sunlang */ public class Column implements Serializable{ String _nameCol; String _nameRefCol; Table _tableRef; int ...
Java
package MyDatabase; import java.io.Serializable; import java.util.ArrayList; import java.util.Vector; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Sunlang */ public class Database implements Serializable{ private String _...
Java
package MyDatabase; import java.io.Serializable; import java.util.Vector; /* * To change this template, choose Tools | Templates and open the template in * the editor. */ /** * * @author Sunlang */ public class Table implements Serializable { String _nameTable; Vector<Column> _columns; ...
Java
package client; import java.net.Socket; import MyDatabase.*; interface LoginWindowConnectListener{ public void handleConnectSusscess(Socket socket); } interface CommandListener{ public void handleReceiveCommand(Command cmd); }
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package client; /** * * @author HUYNHLOC */ public class TableResult extends javax.swing.JFrame { /** * Creates new form TableResult */ public TableResult() { initComponents(); } /...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package client; import javax.swing.table.DefaultTableModel; /** * * @author HUYNHLOC */ public class TableValues extends DefaultTableModel{ TableValues(String[] colNames, int i) { super(col...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package client; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.Socket; import java.util.logging.Level; import java.util.logging.Logger; impor...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package client; import MyDatabase.Column; import MyDatabase.Command; import MyDatabase.Table; import java.lang.reflect.InvocationTargetException; import java.net.Socket; import java.util.Vector; import java.util.logging...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package client; import java.net.Inet4Address; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Socket; import javax.swing.JOptionPane; /** * * @author HUYNHLOC */ public class LoginWi...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package SQLParse; import MyDatabase.Database; import MyDatabase.Table; import MyQuery.Query_PhepToan; import MyQuery.String_Query; import java.util.Vector; /** * * @author HUYNHLOC */ public class SQ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MyQuery; /** * * @author Sunlang */ //Where a = 3 and b >2 //Where a = 3 or b>2 public class WhereParse { private String _strDieuKienWhere; private String[] _dsColumnNhanDuoc; pri...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MyQuery; import MyDatabase.Column; import MyDatabase.Table; import java.util.Vector; /** * * @author Sunlang */ public class Query_PhepToan { Table _table; String _colName; Obj...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MyQuery; import MyDatabase.Database; import MyDatabase.Table; import java.util.Vector; /** * * @author Sunlang */ //Trường hợp //SELECT MSSV FROM SINHVIEN WHERE MSSV (In, Not In, >All, >=All,...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MyQuery; import MyDatabase.Database; import MyDatabase.Table; /** * * @author Sunlang */ public class String_Query { String _strQuery; String _commandQuery; int _queryLevels; ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package server; import MyDatabase.Command; import java.io.*; import java.net.Socket; import java.util.logging.Level; import java.util.logging.Logger; /** * * @author HUYNHLOC */ public class Client e...
Java
package server; import MyDatabase.Command; interface CommandListener{ void handleReceiveCommand(Client sender,Command cmd); } interface DisconnectListener{ void handleDisconnect(int index); }
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package server; import MyDatabase.Column; import MyDatabase.Database; import MyDatabase.Table; import java.io.File; import java.util.EventObject; import java.util.Vector; import java.util.logging.Level; imp...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package server; import MyDatabase.*; import SQLParse.SQLParser; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; import java.util.ArrayList; import java.util.Vector; /** ...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package server; import MyDatabase.*; import java.awt.Color; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; impo...
Java
/* * Copyright (C) 2011 Jacquet Wong * * 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 applicable law or ...
Java
/* * Copyright (C) 2011 Jacquet Wong * * 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 applicable law or ...
Java
/* * Copyright (C) 2011 Jacquet Wong * * 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 applicable law or ...
Java
/* * Copyright (C) 2011 Jacquet Wong * * 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 applicable law or ...
Java
/* * Copyright (C) 2011 Jacquet Wong * * 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 applicable law or ...
Java
/* * Copyright (C) 2011 Jacquet Wong * * 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 applicable law or ...
Java
/* * Copyright (C) 2011 Jacquet Wong * * 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 applicable law or ...
Java
/* * Copyright (C) 2011 Jacquet Wong * * 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 applicable law or ...
Java
/* * Copyright (C) 2011 Jacquet Wong * * 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 applicable law or ...
Java
package com.musicg.math.rank; import java.util.List; public interface MapRank{ public List getOrderedKeyList(int numKeys, boolean sharpLimit); }
Java
package com.musicg.math.rank; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; public class MapRankInteger implements MapRank{ private Map map; priva...
Java
package com.musicg.math.rank; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; public class MapRankDouble implements MapRank{ private Map map; privat...
Java
package com.musicg.math.rank; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; public class MapRankShort implements MapRank{ private Map map; private...
Java
/* * Copyright (C) 2011 Jacquet Wong * * 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 applicable law or ...
Java
package com.musicg.math.quicksort; public class QuickSortDouble extends QuickSort{ private int[] indexes; private double[] array; public QuickSortDouble(double[] array){ this.array=array; indexes=new int[array.length]; for (int i=0; i<indexes.length; i++){ indexes[i]=i; } } public in...
Java
package com.musicg.math.quicksort; public abstract class QuickSort{ public abstract int[] getSortIndexes(); }
Java
package com.musicg.math.quicksort; public class QuickSortIndexPreserved { private QuickSort quickSort; public QuickSortIndexPreserved(int[] array){ quickSort=new QuickSortInteger(array); } public QuickSortIndexPreserved(double[] array){ quickSort=new QuickSortDouble(array); } public Quick...
Java
package com.musicg.math.quicksort; public class QuickSortShort extends QuickSort{ private int[] indexes; private short[] array; public QuickSortShort(short[] array){ this.array=array; indexes=new int[array.length]; for (int i=0; i<indexes.length; i++){ indexes[i]=i; } } public int[] ...
Java
package com.musicg.math.quicksort; public class QuickSortInteger extends QuickSort{ private int[] indexes; private int[] array; public QuickSortInteger(int[] array){ this.array=array; indexes=new int[array.length]; for (int i=0; i<indexes.length; i++){ indexes[i]=i; } } public int[] ...
Java
package com.musicg.wave; import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.ArrayList; import com.musicg.api.WhistleApi; public class WaveTypeDetector { private Wave wave; public WaveTypeDetector(Wave wave) { this.wave = wave; } public double getWhistleProbabil...
Java
/* * Copyright (C) 2011 Jacquet Wong * * 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 applicable law or ...
Java
/* * Copyright (C) 2011 Jacquet Wong * * 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 applicable law or ...
Java