code stringlengths 3 1.18M | language stringclasses 1
value |
|---|---|
/*
* Copyright 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 w... | Java |
/*
* Copyright 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 w... | Java |
/*
* Copyright 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 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 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 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 |
/** Automatically generated file. DO NOT MODIFY */
package com.google.android.gcm;
public final class BuildConfig {
public final static boolean DEBUG = true;
} | Java |
/*
* Copyright 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 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 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 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 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 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 w... | Java |
/*
* Copyright 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 w... | Java |
/*
* Copyright 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 w... | Java |
/*
* Copyright 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 w... | Java |
/*
* Copyright 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 w... | Java |
/*
* Copyright 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 w... | Java |
package javabook.ch01;
import java.io.*;
public class FileReaderDemo {
public static void man(String args[]) throws Exception{
FileReader fr = new FileReader(args[0]);
int i;
while((i=fr.read())!=-1){
System.out.print((char)i);
}
fr.close();
}
}
| Java |
/*
* Copyright (C) 2010 Cyril Mottier (http://www.cyrilmottier.com)
*
* 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... | Java |
/*
* Copyright (C) 2010 Cyril Mottier (http://www.cyrilmottier.com)
*
* 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... | Java |
/*
* Copyright (C) 2010 Cyril Mottier (http://www.cyrilmottier.com)
*
* 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... | Java |
package org.emergent.android.weave.client;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpException;
import org.apache.http.HttpHost;
import org.apache.http.HttpMessage;
import org.apache.http.HttpRequest;
import org.apache.http.HttpRequestInterceptor;
import org.apache.ht... | Java |
package org.emergent.android.weave.client;
import org.json.JSONException;
import org.json.JSONObject;
import java.net.URI;
import java.net.URISyntaxException;
/**
* @author Patrick Woodworth
*/
public class WeaveAccountInfo {
private final URI m_server;
private final String m_username;
private final String m_... | Java |
package org.emergent.android.weave.client;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
class Hex
{
private static final HexEncoder encoder = new HexEncoder();
/**
* encode the input data producing a Hex encoded byte array.
*
* @return a byte a... | Java |
/*
* Copyright 2010 Patrick Woodworth
*
* 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... | Java |
/*
* Copyright 2010 Patrick Woodworth
*
* 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... | Java |
/* (PD) 2001 The Bitzi Corporation
* Please see http://bitzi.com/publicdomain for more info.
*
* As modified by Patrick Woodworth:
*
* Copyright 2011 Patrick Woodworth
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ma... | Java |
package org.emergent.android.weave.client;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
class Base64
{
private static final Base64Encoder encoder = new Base64Encoder();
/**
* encode the input data producing a base 64 encoded byte array.
*
* @re... | Java |
package org.emergent.android.weave.client;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import javax.crypto.spec.SecretKeySpec;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.security.GeneralSecurityException;
import java.secur... | Java |
/*
* Copyright 2010 Patrick Woodworth
*
* 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... | Java |
/*
* Copyright 2010 Patrick Woodworth
*
* 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... | Java |
package org.emergent.android.weave.client;
import java.io.IOException;
import java.io.OutputStream;
class HexEncoder {
protected final byte[] encodingTable =
{
(byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5', (byte)'6', (byte)'7',
(byte)'8', (byte)'9', (byte)'a', (byte)'b... | Java |
package org.emergent.android.weave.client;
import javax.crypto.Cipher;
import javax.crypto.Mac;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.io.ByteArrayInputStream;
import java.security.*;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Cert... | Java |
/*
* Copyright 2010 Patrick Woodworth
*
* 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... | Java |
package org.emergent.android.weave.client;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
/**
* @author Patrick Woodworth
*/
class Dbg {
private static final Level LEVEL_ANDROID_VERBOSE = Level.FINE; // should never ship using this
private static final Leve... | Java |
package org.emergent.android.weave.client;
import java.io.IOException;
import java.io.OutputStream;
class Base64Encoder {
protected final byte[] encodingTable =
{
(byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G',
(byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte... | Java |
/*
* Copyright 2010 Patrick Woodworth
*
* 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... | Java |
/*
* Copyright 2010 Patrick Woodworth
*
* 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... | Java |
/*
* Copyright 2010 Patrick Woodworth
*
* 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 t... | Java |
/*
* Copyright 2010 Patrick Woodworth
*
* 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... | Java |
/*
* Copyright 2010 Patrick Woodworth
*
* 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... | Java |
/*
* Copyright 2010 Patrick Woodworth
*
* 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... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 - 2011 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is d... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 - 2011 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distribute... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 - 2011 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is d... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 - 2011 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is d... | Java |
package org.zirco.sync;
import java.io.IOException;
import java.net.URI;
import java.security.GeneralSecurityException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.emergent.android.weave.client.QueryParams;
import org.emergent.android.weave.client.QueryResult;
import org.emerg... | Java |
package org.zirco.sync;
public interface ISyncListener {
void onSyncProgress(int step, int done, int total);
void onSyncEnd(Throwable result);
void onSyncCancelled();
}
| Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
package org.zirco.utils;
import org.zirco.ui.activities.MainActivity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
public class ProxyChangeReceiver extends BroadcastReceiver
{
@Override
public void onReceive(Cont... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 - 2011 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distribute... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
package org.zirco.utils;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpGet;
import org.apache.... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
package org.zirco.model.items;
/**
* Represent a bookmark.
*/
public class BookmarkItem {
private String mTitle;
private String mUrl;
/**
* Constructor.
* @param title The bookmark title.
* @param url The bookmark url.
*/
public BookmarkItem(String title, String url) {
mTitle = titl... | Java |
package org.zirco.model.items;
public class WeaveBookmarkItem {
private String mTitle;
private String mUrl;
private boolean mIsFolder;
private String mWeaveId;
public WeaveBookmarkItem(String title, String url, String weaveId, boolean isFolder) {
mTitle = title;
mUrl = url;
mWeaveId = weaveId;
mIsFolde... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 - 2011 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distribute... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 - 2011 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distribute... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 - 2011 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distribute... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in th... | Java |
package Jv_3_2;
public class Jv_3_2 {
/**
* @param args
*/
public static void main(String[] args) {
int x=100, y=30;
System.out.println("***** result *****");
System.out.println("x+y =" + (x+y));
System.out.println("x-y =" + (x-y));
System.out.println("x*y =" + (x*y));
System.out.prin... | Java |
package jv_example_4;
public class jv_example_4 {
public static void main(String[] args) {
int j;
char i;
for(i='A',j=0;i<='Z';i++){
System.out.print(i + " ");
j++;
if(j%10 == 0){
System.out.print("\n");
}
}
System.out.print("\n");
}
}
| Java |
package Jv_3_8;
public class Jv_3_8 {
/**
* @param args
*/
public static void main(String[] args) {
int x, y;
float c, d;
x = 10;
y = 3;
c = x/y;
d = (float)x/y;
System.out.println("***** result *****");
System.out.println("c == " + c + ", d == " + d);
}
}
| Java |
package Jv_3_4;
public class Jv_3_4 {
/**
* @param args
*/
public static void main(String[] args) {
boolean x=true, y=true, z=false;
System.out.println("***** result *****");
System.out.println("boolean x=true, y=true, z=false");
System.out.println("--- logical AND ---");
System.out.prin... | Java |
package Jv_10;
public class Jv_10 {
public static void main(String[] args) {
int i = 0;
String[] ken = {"one","two","three"};
while (i<4){
try{
System.out.println("====try step");
System.out.println(ken[i]);
}
catch(ArrayIndexOutOfBoundsException e){
System.o... | Java |
package jv_example_5;
public class jv_example_5 {
public static void main(String[] args) {
int i,j=0;
int sum=1;
for(i=1;i<11;i++){
for(j=1;j<i+1;j++){
sum *= j;
}
System.out.print(i + "! = " + sum);
System.out.println();
sum = 1;
}
}
}
| Java |
package Jv_3_3;
public class Jv_3_3 {
/**
* @param args
*/
public static void main(String[] args) {
int x=50, y=30;
System.out.println("***** result *****");
System.out.println("x<y ->" + (x<y));
System.out.println("x<=y ->" + (x<=y));
System.out.println("x>y ->" + (x>y));
System.ou... | Java |
package Jv_3_5;
public class Jv_3_5 {
/**
* @param args
*/
public static void main(String[] args) {
int ken=2, boo=7, yoo=-7;
System.out.println("***** result *****\n");
System.out.println("ken=2, boo=7, yoo=-7");
System.out.println("--- bitwise AND ---");
System.out.println("ken&boo -> ... | Java |
package Jv_3_1;
public class Jv_3_1 {
/**
* @param args
*/
public static void main(String[] args) {
int ken=10, yoo=-20, boo;
boo=-yoo;
System.out.println("***** result *****");
System.out.println("ken=" + ken + "," + "yoo=" + yoo + "," + "boo=" + boo);
System.out.println("++ken=" + (++ken... | Java |
package jv_example_3;
public class jv_example_3 {
public static void main(String[] args) {
int i=0;
int sum=0;
for(i=1;i<101;i++){
if(i%2 == 0){
sum += i;
}
else{}
}
System.out.println("Total = " + sum);
}
}
| Java |
package Jv_3_7;
public class Jv_3_7 {
public static void main(String[] args) {
int x=10, y=20, ken, boo, yoo, soo;
ken=boo=30;
yoo = (ken == boo ? x: y);
soo = (ken < boo ? x: y);
System.out.println("***** result *****\n");
System.out.println("yoo = " + yoo + ", soo = " + soo);
... | Java |
package Jv_3_6;
public class Jv_3_6 {
/**
* @param args
*/
public static void main(String[] args) {
int x=7, y=2;
int a, b;
a = 7;
b= 2;
System.out.println("***** result *****\n");
System.out.println("x=" + x + ", y=" + y);
System.out.println("a=" + a + ", b=" + b);
System.out.p... | Java |
package Jv_quiz;
class ppp{
int i;
float f;
String s;
public ppp(int i){
System.out.println("*** " + i + " ***");
}
public ppp(int i, double f){
System.out.println("*** " + i + ", " + f + " ***");
}
public ppp(int i, double f, String s){
System.out.println("*** " + i + ", " + ... | Java |
package ar.edu.itba.pod.legajo48240;
import java.util.Properties;
import org.apache.log4j.Logger;
import org.joda.time.Duration;
import ar.edu.itba.pod.agent.market.Consumer;
import ar.edu.itba.pod.agent.market.Market;
import ar.edu.itba.pod.agent.market.Producer;
import ar.edu.itba.pod.agent.market.Resource;
import... | Java |
package ar.edu.itba.pod.legajo48240.utils;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.BlockingQueue;
import ar.edu.itba.event.EventInformation;
import ar.edu.itba.node.NodeInformation;
import ar.edu.itba.pod.agent.runner.Agent;
publi... | Java |
package ar.edu.itba.pod.legajo48240.utils;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import ar.edu.itba.balance.api.AgentsBalancer;
import ar.edu.itba.balance.api.AgentsTransfer;
import ar.edu.itba.event.RemoteEventD... | Java |
package ar.edu.itba.pod.legajo48240.node;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.ArrayList;
import java.util.List;
import ar.edu.itba.node.api.NodeStatistics;
import ar.edu.itba.node.api.StatisticReports;
import ar.edu.itba.pod.agent.market.AgentState;
import ar.... | Java |
package ar.edu.itba.pod.legajo48240.node;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.Set;
import org.apache.log4j.Logger;
import ... | Java |
package ar.edu.itba.pod.legajo48240.balance;
import ar.edu.itba.node.NodeInformation;
public class NodeRank {
private final NodeInformation node;
private int agents;
public NodeRank(NodeInformation node, int agents) {
this.node=node;
this.agents=agents;
}
public NodeInformation node(){
return node;
... | Java |
package ar.edu.itba.pod.legajo48240.balance;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.con... | Java |
package ar.edu.itba.pod.legajo48240.balance;
import java.util.Comparator;
public class CompareRank implements Comparator<NodeRank> {
@Override
public int compare(NodeRank o1, NodeRank o2) {
if( o2.agents() == o1.agents()){
return 0;
}else if (o2.agents() > o1.agents()){
return -1;
}
return 1;
}
}
| Java |
package ar.edu.itba.pod.legajo48240.event.threads;
import java.util.concurrent.BlockingQueue;
import org.apache.log4j.Logger;
import ar.edu.itba.event.EventInformation;
import ar.edu.itba.pod.legajo48240.model.Host;
import ar.edu.itba.pod.thread.CleanableThread;
public class EventProcessThread extends CleanableThre... | Java |
package ar.edu.itba.pod.legajo48240.event.threads;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.util.HashSet;
import java.util.Set;
import org.apache.log4j.Logger;
import ar.edu.itba.event.EventInformation;
import ar.edu.itba.event.RemoteEventDispatcher;
import ar.edu.itba.node.Nod... | Java |
package ar.edu.itba.pod.legajo48240.event.threads;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.BlockingQueue;
import org.apache.log4j.Logger;
import ar.edu.itba.event.EventInformation;
import ar.edu.itba.event.RemoteEv... | Java |
package ar.edu.itba.pod.legajo48240.event;
import java.io.Serializable;
import java.rmi.RemoteException;
import org.apache.log4j.Logger;
import ar.edu.itba.event.EventInformation;
import ar.edu.itba.pod.agent.runner.Agent;
import ar.edu.itba.pod.legajo48240.model.Host;
import ar.edu.itba.pod.legajo48240.node.Cluster... | Java |
package ar.edu.itba.pod.legajo48240.event;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.LinkedBlockingQueue;
import org.... | Java |
package ar.edu.itba.pod.legajo48240.model;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.BlockingQueue;
import org.apache.log4j.Logger;
import ar.edu.itba.balance.api.Agent... | Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.