text stringlengths 14 410k | label int32 0 9 |
|---|---|
public int getMalesCount() {
return getGenderCount(Gender.MALE);
} | 0 |
private static void fillArray( final String s1,
final String s2,
final SubstitutionMatrix sm,
final float gapPenalty,
final int affinePenalty,
final boolean noPenaltyForBeginningOrEndingGaps,
final AlignmentCell[][] cels )
throws Exception
{
cels[0][0] = n... | 8 |
private static int calculate(final Collection<Rotation4D> group,
final Collection<Rotation4D> arg1, final Collection<Rotation4D> arg2,
final Collection<Rotation4D> dist) {
int newElems = 0;
Rotation4D z;
for (Rotation4D x : arg1) {
for (Rotation4D y : arg2) {
z = x.nextRotation(y);... | 5 |
public void visitTableSwitchInsn(final int min, final int max,
final Label dflt, final Label[] labels) {
if (mv != null) {
mv.visitTableSwitchInsn(min, max, dflt, labels);
}
execute(Opcodes.TABLESWITCH, 0, null);
this.locals = null;
this.stack = null;
} | 1 |
@SafeVarargs
public CommandHandler(P plugin, String defaultLabel, int pageCommands, AbstractCommand<P>... commands) throws IllegalArgumentException {
this.plugin = plugin;
this.defaultLabel = defaultLabel;
this.commands = new LinkedHashMap<String, AbstractCommand<P>>();
for (AbstractCommand<P> command : comman... | 3 |
@After
public void tearDown() {
} | 0 |
@Override
public void onTestUserKeyChanged(String userKey) {
BmTestManager bmTestManager = BmTestManager.getInstance();
boolean isUserKeyValid = bmTestManager.isUserKeyValid();
if (signUpButton.isVisible()) {
signUpButton.setEnabled(!(userKey.matches(Constants.USERKEY_REGEX) & is... | 2 |
@Override
public String getDescription() {
if (descriptionValue == null || isEmpty(descriptionValue.getText())) {
return "";
}
return descriptionValue.getText();
} | 2 |
void integer_operation(int[][] A, int[][] B, int[][] C)
{
for(int i=0;i<cnt;i++)
{
for(int j=0;j<cnt;j++)
{
C[i][j] = 0;
for(int k=0;k<cnt;++k)
{
C[i][j]+=A[i][k]+B[k][j];
}
}
}
} | 3 |
@Override
protected boolean isValidNonDropMove(GameState state, int x, int y) {
/* Begins by verifying if a move is within the range of the board.
* Then verifies if a move is on one of the diagonals (the change in x equals the change in y).
* Then it checks to see if all tile on the way t... | 9 |
public Node reverseAlter2KNodes(Node head, int k){
//process 2K nodes at a time
//reverse till k nodes and set the the pointer to k+1
int x = k;
Node moving = head;
Node head_prev = null;
Node head_next = null;
while(x>0 && moving!=null){
head_next = moving.next;
moving.next = head_prev;
head_p... | 6 |
public void computeSuplementalFactors() {
for (Entry<Float, float[][]> week : DB_ARRAY.entrySet()) {
float[][] weekNumber = week.getValue();
float[][][] techs = DB_PRICES.get(week.getKey());
float[][] sups = new float[weekNumber.length][];
for (int i = 0; i < weekNumber.length; i++) {
float[] supleme... | 2 |
public static int getArrayOrListLength(Object arrayOrList) {
if (arrayOrList == null) {
return 0;
}
Class<?> clazz = arrayOrList.getClass();
boolean isArray = ClassHelper.isTypeArray(clazz);
boolean isList = ClassHelper.isTypeList(clazz);
if (!isArray && !isList) {
throw new IllegalArgumentExce... | 6 |
public void addHistory(String date, String name1, String name2, String score, String duration) throws IOException {
// Add a new record to the top of the log
String savedGame = date + "," + name1 + "," + name2 + "," + score + "," + duration;
String temp = "temp-history.csv";
String p = n... | 7 |
private void threadroot() {
// this should be running the current thread
Lib.assertTrue(javaThread == Thread.currentThread());
if (!isFirstTCB) {
/* start() is waiting for us to wake it up, signalling that it's OK
* to context switch to us. We leave the running flag false so that
* we'll still run ... | 6 |
private void playGame() {
// if second player then becomes backup server
if (gameState.getBackupServerID() == this.id) {
becomeBackupServer();
}
// play
while (!gameState.isGameOver()) {
curClock++;
int randSleep = rand.nextInt(PLAYER_MOVE_MAX_DELAY) + 1;
sleep(randSleep);
... | 7 |
public void learn(double[] expectedOutputs) {
this.learningCycles++;
double sum = 0;
double error = 0;
double weight = 0;
//Last layer
int lastLayer = layers.length - 1;
for(int j = 0; j < layers[lastLayer].getSize(); j++) {
for(int k = 0; k < layers[lastLayer].getNeuron(j).getInputSize(); k++){... | 6 |
private static Connection getConnection(){
String dbtime=null;
String dbUrl = "jdbc:mysql://your.database.domain/yourDBname";
String dbClass = "com.mysql.jdbc.Driver";
Connection con=null;
try {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection (dbUrl);
} catch (ClassNotFoundEx... | 2 |
@Override
public int hashCode() {
int result;
long temp;
result = consignmentId;
result = 31 * result + (logTime != null ? logTime.hashCode() : 0);
temp = amount != +0.0d ? Double.doubleToLongBits(amount) : 0L;
result = 31 * result + (int) (temp ^ (temp >>> 32));
... | 3 |
private void checkDirectoryListing(Path path, String[] expected_children,
boolean[] expected_kinds) {
// List the given directory.
String[] listing = null;
try {
listing = serviceStub.list(path);
} catch(Throwable t) {
t.... | 9 |
public DecisionQuest() {
super(QuestType.DECISIONQUEST);
} | 0 |
public final Node state() {
synchronized (lock) {
final Node stateNode = this.current_node.get();
if (stateNode != null && stateNode.isAlive()) {
return null;
} else {
for (final Node state : nodes) {
if (state != null && state.activate()) {
return state;
}
}
}
return null;
... | 5 |
private void btSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btSalvarActionPerformed
Funcionario f = new Funcionario();
if (!(txCodigo.getText().equals("") || ((txCodigo.getText().equals(null))))) {
f.setId(Integer.parseInt(txCodigo.getText()));
}
... | 9 |
public Matrix transpose() {
Matrix n = new Matrix();
for (int c = 0; c != 4; c++) {
for (int r = 0; r != 4; r++) {
n.set(c, r, get(r, c));
}
}
return n;
} | 2 |
private static void downloadClient(){
try{
LauncherFrame.notificationLabel.setText("Download del client in corso ... 0%");
URL url = new URL(Settings.updateFile);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
int filesize = connection.getContentLength();
float totalDataRe... | 4 |
public void start() throws IOException {
myServerSocket = new ServerSocket();
myServerSocket.bind((hostname != null) ? new InetSocketAddress(hostname, myPort) : new InetSocketAddress(myPort));
myThread = new Thread(new Runnable() {
@Override
public void run() {
... | 7 |
public void addTreatmentMeta(TreatmentMeta treatmentMeta){
this.treatmentMeta.add(treatmentMeta);
} | 0 |
public WorldCommand(TotalPermissions p) {
plugin = p;
} | 0 |
public int valueofCadEquals(String cad) {
for (int i = 0; i < this.getLista().size() - 1; i++) {
if (cad.equals(this.getLista().get(i).getMatch())) {
return this.getLista().get(i).getValor();
}
}
return 0; // si no coincide retorn ]a valor de otros
} | 2 |
protected ActorMind initAI() {
final Fauna actor = this ;
return new ActorMind(actor) {
protected Behaviour createBehaviour() {
final Choice choice = new Choice(actor) ;
addChoices(choice) ;
return choice.weightedPick() ;
}
protected void updateAI(int numUpd... | 5 |
private static void populate(String s){
if(Cards.containsKey(s))
return;
else
CardsInfo.Cards.put(s, new Card(s));
} | 1 |
public void drawHill(Grid g) {
Random r = new Random();
int height;
int width;
int seed;
height = r.nextInt(20) + 1;
seed = r.nextInt(50) + 2;
HashMap<Point, GridSpace> grid = g.getGrid();
ArrayList<Integer> a = new ArrayList<Integer>();
for (int p = 0; p <= height; p = p + r.nextInt(3) + 1) {
a... | 9 |
@Override
public void mouseClicked(MouseEvent e) {
// Check if ok to send card.
if (chooseCard) {
boolean lastCard = nbrOfPlayedCards == nbrOfPlayers;
if (lastCard || card.getSuit() == firstCardsSuit) {
removeCardFromHand();
} else {
boolean hasTrumf = false;
boolean hasSuit = false;
... | 9 |
public Map getConfiguration() {
Map config = (HashMap) servletContext.getAttribute(Constants.CONFIG);
// so unit tests don't puke when nothing's been set
if (config == null) {
return new HashMap();
}
return config;
} | 1 |
public float setBand(int band, float neweq)
{
float eq = 0.0f;
if ((band>=0) && (band<BANDS))
{
eq = settings[band];
settings[band] = limit(neweq);
}
return eq;
} | 2 |
public static Vector min(Vector a, Vector b){
return new Vector((a.getX() < b.getX() ? a.getX() : b.getX()), (a.getY() < b.getY() ? a.getY() : b.getY()), (a.getZ() < b.getZ() ? a.getZ() : b.getZ()));
} | 3 |
private void writeValue(Object value) throws JSONException {
if (value instanceof Number) {
String string = JSONObject.numberToString((Number) value);
int integer = this.valuekeep.find(string);
if (integer != none) {
write(2, 2);
write(integer,... | 9 |
public void waddleForImprovement()
{
if (queueTiles.size() == 0)
{
City nearestCity = location.grid.nearestCivCity(owner, location.row, location.col);
Tile t = location.grid.bestToImprove(nearestCity);
if (t != null)
waddleTo(t.row, t.col);
else
waddleInTerritory();
}
if (queueTiles.size() ... | 8 |
public static String[] getArgs(String arg) throws AccessException{
int index = 0;
String args[] = new String[2];
if(!arg.isEmpty() && arg.charAt(0) == ' '){
while(index < arg.length() && arg.charAt(index) == ' ') index++;
}
int split = arg.indexOf(' ',index);
if(split == -1) split = arg.length();
a... | 7 |
public static Class<?> getCallingClass(Class<?>... ignore) {
List<Class<?>> list = Arrays.asList(ignore);
StackTraceElement[] stes = new Throwable().getStackTrace();
for (int i = 1; i < stes.length; i++) {
try {
Class<?> cls = Class.forName(stes[i].getClassName());
if (!list.contains(cls)) return cls;
... | 7 |
public void updateUser(User user, int port){
if(port == LOGIN_PORT || port == CASH_PORT){
try {
String serverAddress = (port == LOGIN_PORT ? SERVER_ADDRESS_LOGIN : SERVER_ADDRESS_CASH);
Socket socket = new Socket(serverAddress, port);
socket.setSoTimeout(TIMEOUT);
OutputStream outputStrea... | 6 |
private void fixNegativeRed(Node negRed){
Node n1, n2, n3, n4, t1, t2, t3, child;
Node parent = negRed.parent;
if (parent.left == negRed){
n1 = negRed.left;
n2 = negRed;
n3 = negRed.right;
n4 = parent;
t1 = n3.left;
t2 = n3.right;
t3 =... | 5 |
public int GetMaximumPassenger()
{
return maximumPassenger;
} | 0 |
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
T2Impl<?, ?> other = (T2Impl<?, ?>) obj;
return Tuples.equals(_first, other._first)
&& Tuples.equals(_second, other._... | 8 |
protected void drawRadarPoly(Graphics2D g2,
Rectangle2D plotArea,
Point2D centre,
PlotRenderingInfo info,
int series, int catCount,
double headH, double he... | 9 |
public void downsample() {
//read the image
Mat image = Highgui.imread(path);
//mat out
Mat out = new Mat();
if(image.empty()) {
System.out.println("Image not found !!");
return;
}
//Show the Image before down sampling
ImageUtils.displayImage(ImageUtils.toBufferedImage(image), "Before Downsa... | 1 |
protected void FillBuff() throws java.io.IOException
{
if (maxNextCharInd == available)
{
if (available == bufsize)
{
if (tokenBegin > 2048)
{
bufpos = maxNextCharInd = 0;
available = tokenBegin;
}
else if (tokenBegin < 0)
bufpos = maxN... | 9 |
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Manager other = (Manager) obj;
if (code == null) {
if (other.code != null)
return false;
} else if (!code.equals(other.code))
return ... | 9 |
public static void correctRuleIndices(Node<?> node, int n) {
if (n == 0)
return;
for (;;) {
if (node instanceof CallNode) {
((CallNode) node).ruleIndex += n;
} else if (node instanceof RuleNode) {
((RuleNode) node).index += n;
... | 7 |
public void cancel()
{
int counter = 0;
int prevSize = 0;
while (getNotifyQueue().size() != 0)
{
if (prevSize != getNotifyQueue().size())
{
prevSize = getNotifyQueue().size();
counter = 0;
}
else if ((prevSize == getNotifyQueue().size()) && (counter == 25)) break;
try
{
Thread.sle... | 5 |
public static boolean position(String position){
position=position.toLowerCase();
if(!position.equals("tech")||!position.equals("manager")||!position.equals("pharmacist")){
return false;}
else return true;
} | 3 |
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((domain == null) ? 0 : domain.hashCode());
result = prime * result + ((local == null) ? 0 : local.hashCode());
return result;
} | 2 |
public void persist() {
System.out.println(typeEntity.getName());
roomEntity.setType(typeEntity);
em.persist(roomEntity);
typeEntity.setRooms(rooms);
em.persist(typeEntity);
} | 0 |
@Override
public void configure(ResourceInfo resourceInfo, FeatureContext context) {
Collection<String> requiredPermissions = new ArrayList<>();
Class<?> resourceClass = resourceInfo.getResourceClass();
Method method = resourceInfo.getResourceMethod();
if(resourceClass.isAnnotationPresent(RequiresPer... | 7 |
public HashMap getTableValue(int table, int row, int field) throws Exception
{
HashMap<String, Integer> result = new HashMap<String, Integer>();
byte[] bytes = java.nio.ByteBuffer.allocate(4).putInt(row).array();
char[] params = new char[]{(char)table, (char)bytes[2], (char)bytes[3], (char)f... | 3 |
private Tree elementPro(){
Symbol identifier = null;
Tree parameterList = null,
compoundStatement = null;
if(accept(Symbol.Id.KEYWORD, "function")!=null){
if((identifier = accept(Symbol.Id.IDENTIFIER_NAME))!=null){
if(accept(Symbol.Id.PUNCTUATORS, "\\(")!=null){
parameterList = parameterListPro();... | 6 |
@Override
public void addEntry(Entry entry) throws IOException {
if (exampleWord == null) {
exampleWord = entry.getWord();
}
if (r.nextInt(100) == 1) {
exampleWord = entry.getWord();
}
wordBuilder.append("'" + escape(entry.getWord()) + "',");
definitionBuilder.append("'" + escape(entry.getDefiniti... | 3 |
@Test
public void testStronglyConnectedComponentsMin() {
DirectedGraph<String> graphM = new DirectedGraph<String>();
DirectedGraph<String> reversedGraphM = new DirectedGraph<String>();
List<String> input = new ArrayList<String>();
input.add("A B");
input.add("B D");
... | 3 |
@Override
public void unInvoke()
{
if(!(affected instanceof MOB))
return;
// undo the affects of this spell
final MOB mob=(MOB)affected;
super.unInvoke();
if((canBeUninvoked()&&(!mob.amDead())))
{
mob.tell(L("Your piety curse has been lifted"));
if(mob.isMonster() && (!mob.amDead()))
{
CML... | 8 |
@Override
public void runCommand(CommandSender sender, String label, String[] args) {
tntControlHelper = tntControlConfig.getTNTControlHelper();
Player player = null;
String pname = "(Console)";
if ((sender instanceof Player)) {
player = (Player) sender;
pname... | 8 |
public String toString() {
return "Extension(use): " + (useExtension ? "true" : "false") + "\n" +
"Hash(use/name): " + (useHash ? "true" : "false") + "/" + nameHash + "\n" +
"Name(use/percentage/algo-ordinal): " + (useName ? "true" : "false") +
"/" + String.valueOf(percentageMatchName) + "/" + ... | 6 |
private void fixAfterAdd(Node newNode){
if (newNode.parent == null){newNode.color = black;}
else{
newNode.color = red;
if (newNode.parent.color == red) { fixDoubleRed(newNode); }
}
} | 2 |
public void tick() {
if (shouldTake != null) {
if (shouldTake.activeItem instanceof PowerGloveItem) {
remove();
shouldTake.inventory.add(0, shouldTake.activeItem);
shouldTake.activeItem = new FurnitureItem(this);
}
shouldTake = null;
}
if (pushDir == 0) move(0, +1);
if (pushDir == 1) move(0... | 7 |
public void updateObjDetails(JObjective obj, String name){
//if there is a change in objective name
if(!obj.getName().equals(name))
for (int i=0; i<alts.size(); i++){
HashMap temp = (HashMap)alts.get(i);
temp.put(obj.getName(), temp.get(name));
temp.remove(name);
}
//changes in objective... | 5 |
@Override
public int hashCode() {
int hash = 0;
hash += (idapplicant != null ? idapplicant.hashCode() : 0);
return hash;
} | 1 |
private void notifySelectionListeners(Event event) {
if (!(event.widget instanceof Control)) {
return;
}
if (getDecorationRectangle((Control) event.widget).contains(event.x,
event.y)) {
SelectionEvent clientEvent = new SelectionEvent(event);
clientEvent.data = this;
if (getImage() != null) {
c... | 9 |
public Object copyColorData() {
// Note: This is a fudge. The data about defaultColor,
// groutingColor, and alwaysDrawGrouting is added to the
// last row of the grid. If alwaysDrawGrouting is true,
// this is recorded by adding an extra empty space to
// that row.
Color[][] copy... | 3 |
public void optionSelect()
{
System.out.println("WELCOME TO WORD LADDER MADNESS ");
System.out.println();
System.out.println("Enter option 1 for Discovery mode: ");
System.out.println("Enter option 2 for Generation mode: ");
System.out.println("Enter option 3 for information on modes: ");
System.out.printl... | 4 |
private boolean recombinationInitialization(HaploStruct hs, double recombPos)
throws Exception {
if (hs==null || !this.getChrom().equals(hs.chrom)) {
throw new Exception("recombine: parameter hs invalid");
}
if (recombPos<chrom.getHeadPos() || recombPos>chrom.getTailPos()... | 5 |
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(sender.hasPermission("NE.freeze") || sender.isOp() || sender instanceof ConsoleCommandSender || sender instanceof BlockCommandSender) {
if(command.getName().equalsIgnoreCase("Freeze")) {
if(args.length ... | 7 |
static public ParseException generateParseException() {
jj_expentries.removeAllElements();
boolean[] la1tokens = new boolean[9];
for (int i = 0; i < 9; i++) {
la1tokens[i] = false;
}
if (jj_kind >= 0) {
la1tokens[jj_kind] = true;
jj_kind = -1;
}
for (int i = 0; i < 2; i++) ... | 9 |
public SNMPSequence processGetNextRequest(SNMPPDU requestPDU, String communityName) throws SNMPGetException
{
SNMPSequence varBindList = requestPDU.getVarBindList();
SNMPSequence responseList = new SNMPSequence();
byte pduType = requestPDU.getPDUType();
for (int i = 0; i < varBindLi... | 9 |
public String authentic(String userID, String pwd) {
Connection connection = DBconnection.getInstance();
Statement stmt;
try {
stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("");
while (rs.next()) {
String userID1 = rs.getString("userID");
String pwd1 = rs.getString("pwd")... | 4 |
private void llenarLista(JTable tabla, int numColumnas, LinkedList listaDeDatos) {
Object[] renglonDeDatos = new Object[numColumnas];
DefaultTableModel modeloLista = (DefaultTableModel) tabla.getModel();
limpiarLista(tabla);
boolean seAgregaranProveedores = false;
for (Objec... | 6 |
static double prim(double[][] mAdy){
int n,p[]=new int[n=mAdy.length],v=0;double d[]=new double[n];boolean[] vis=new boolean[n];
PriorityQueue<double[]> cola=new PriorityQueue<double[]>(n,new Comparator<double[]>() {
public int compare(double[] o1,double[] o2){
return o1[1]!=o2[1]?(o1[1]<o2[1]?-1:1):(int)o1[... | 9 |
public void run() throws Exception {
System.out.println("Running " + algorithm.FLAG + " algorithm:");
for (Dataset dataset : datasets_to_run) {
System.out.println("\nRunning " + dataset.NAME + " dataset.");
System.out.println("Training...");
train(dataset);
for (Filetype ... | 4 |
public Updater(Plugin plugin, int id, File file, UpdateType type, boolean announce) {
this.plugin = plugin;
this.type = type;
this.announce = announce;
this.file = file;
this.id = id;
this.updateFolder = new File(plugin.getDataFolder().getParent(), plugin.getServer().getU... | 8 |
public void tallenna() {
ObjectOutputStream output = null;
try
{
output = new ObjectOutputStream(new FileOutputStream(new File(henkilonTiedot)));
output.writeObject(henkilot);
}
catch (IOException ex)
{
System.out.prin... | 3 |
public void turnOnePlayer() {
GameEngine gEngine = new GameEngine();
if (activeP >= GameEngine.playerCount) {
int[] results = new int[GameEngine.playerCount];
int winSum = 0;
for (int i = 0; i < winners.size(); i++) {
winSum = winSum + GameEngine.Playe... | 7 |
@Override
public List<Tourist> load(Criteria criteria, GenericLoadQuery loadGeneric, Connection conn) throws DaoQueryException {
int pageSize = 50;
List paramList = new ArrayList<>();
StringBuilder sb = new StringBuilder(WHERE);
String queryStr = new QueryMapper() {
@Ove... | 2 |
private Element parseLoop() throws ParserException, XMLStreamException {
String type = getAttribute("type", "test-first");
switch (type) {
case "test-first":
return parseTestLoop(true);
case "test-last":
return parseTestLoop(false);
case "infinite":
return parseInfiniteLoop();
default:
t... | 3 |
public static boolean libraryCompatible(Class<?> libraryClass) {
if (libraryClass == null) {
errorMessage("Parameter 'libraryClass' null in method"
+ "'librayCompatible'");
return false;
}
if (!Library.class.isAssignableFrom(libraryClass)) {
errorMessage("The specified class does not extend class "
... | 4 |
public void refreshPanel() {
vakLijst.clear();
if (Sessie.getIngelogdeGebruiker().heeftPermissie(
PermissieHelper.permissies.get("BEHEERALLEKLASSEN"))) {
List<Vak> vakken = Dao.getInstance().getVakken();
for (Vak vak : vakken) {
vakLijst.addElement(vak);
}
} else if (Sessie.getIngelogdeGebruiker(... | 4 |
public Map<Object, Object> toMap() {
final Map<Object, Object> map = new HashMap<Object, Object>(this.size());
try {
for (E elt : this) {
CycList<Object> eltAsList = (CycList<Object>)elt;
map.put(eltAsList.first(), eltAsList.rest());
}
} catch (Exception e) {
throw new Unsu... | 2 |
public void order() {
if (b > a) {
Integer temp = a;
a = b;
b = temp;
}
} | 1 |
@Override
public boolean equals(Object obj) {
if(this == obj) {
return true;
}
if(obj == null) {
return false;
}
if(getClass() != obj.getClass()) {
return false;
}
CamLocalUser other = (CamLocalUser) obj;
if(this.nam... | 9 |
public void updatePosition() {
if (position.mX < destination.mX) position.mX++;
else if (position.mX > destination.mX) position.mX--;
if (position.mY < destination.mY) position.mY++;
else if (position.mY > destination.mY) position.mY--;
if (position.mX == destination.mX && po... | 8 |
int g(final int i) {
return i + 1;
} | 0 |
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Person person = (Person) o;
if (age != person.age) return false;
if (firstName != null ? !firstName.equals(person.firstName) : person.firstName... | 9 |
@Override
public void action() {
if(log.isLoggable(Logger.INFO))
log.log(Logger.INFO, "action()");
// dfd = new DFAgentDescription();
// description = new ServiceDescription();
// description.setName("Wumpus' Wumpus-Game");
// description.setType("wumpus-game");
// dfd.addServices(description);
// ... | 1 |
public void request()
{
System.out.println("From Real Subject !");
} | 0 |
public void setFunUnidad(String funUnidad) {
this.funUnidad = funUnidad;
} | 0 |
public String getOrderCount() {
return orderCount;
} | 0 |
public void testAddDocument() throws Exception {
Document testDoc = new Document();
DocHelper.setupDoc(testDoc);
Analyzer analyzer = new WhitespaceAnalyzer();
IndexWriter writer = new IndexWriter(dir, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
writer.addDocument(testDoc);
writer.commit... | 7 |
private Collection<Boolean> shift(Collection<Boolean> data, int difference) {
if (difference > 0 && difference < data.size()) {
/* Ištrinama pradžia */
int size = data.size() - difference;
ArrayList<Boolean> result = new ArrayList<Boolean>(size);
int i = 0;
... | 8 |
public Host replace(String failedPath, Host... failedHosts) {
for (Host failedHost : failedHosts) {
if (routingTable_.contains(failedHost)) {
routingTable_.removeReference(failedHost);
}
}
replace_.execute(routingTable_, new PGridPath(failedPath));
... | 4 |
protected boolean[] datasetIntegrity(
boolean nominalPredictor,
boolean numericPredictor,
boolean stringPredictor,
boolean datePredictor,
boolean relationalPredictor,
boolean multiInstance,
int classType,
boolean predictorMissing,
boolean classMissing) {
... | 9 |
private void createHiveGroups(int groupDimension, int groupCount, int groupSize, int x, int y, int dimensionX,
int dimensionY, int pixelX, int pixelY, int groupFixed, int fullLineSwitch) {
for (int yg = 0; yg < groupDimension; yg++) {
for (int xg = 0; xg < groupDimension; xg++) {
if (groupCount < groupSize)... | 4 |
public void addOperand(final LocalExpr operand) {
for (int i = 0; i < operands.size(); i++) {
final LocalExpr expr = (LocalExpr) operands.get(i);
Assert.isTrue(expr.def() != operand.def());
}
operands.add(operand);
operand.setParent(this);
} | 1 |
private MoveValue negaMax(Board b, int remainingDepth, double alpha, double beta)
throws ExitThreadException {
if ( ((IterativeDeepeningThread)Thread.currentThread()).isStopped() ) {
throw new ExitThreadException();
}
if (remainingDepth <= 0 || b.isGameOver()) { //At bottom of tree, return node with its ... | 7 |
Subsets and Splits
SQL Console for giganticode/java-cmpx-v1
The query retrieves a limited number of text entries within a specific length range, providing basic filtering but minimal analytical insight.