text stringlengths 14 410k | label int32 0 9 |
|---|---|
public int lastSelectedIndex() {
int index = mSelection.length() - 1;
return index < mSize ? index : -1;
} | 1 |
public static ParentInfo getParentInfo(Map<String, Set<String>> graph) {
Set<String> allParents = new HashSet<String>();
for (Set<String> parents : graph.values()) {
allParents.addAll(parents);
}
Set<String> unseenParents = new HashSet<String>();
unseenParents.addAll... | 5 |
private Document httpGetXmlContent(String queryString) {
try {
URIBuilder builder = new URIBuilder();
builder.setScheme("http");
builder.setHost(this.endpointUri);
builder.setPath("/sparql");
builder.setParameter("query", queryString);
buil... | 4 |
@Override
public void run()//GameLoop
{
while (marioWorld.getWhatcha() != Doing.EXIT)
{
if ((System.currentTimeMillis() - gameTimer) > GAMESPEED)
{
gameTimer = System.currentTimeMillis();
marioWorld.doLoopAction();
switch (m... | 8 |
public LocalInfo findSlot(int slot) {
for (int i = 0; i < count; i++)
if (locals[i].getSlot() == slot)
return locals[i];
return null;
} | 2 |
public synchronized void addReceivedPacketHistoryToOutgoingPacket(Packet packet) {
if(packet != null) {
packet.setLastReceivedSequenceNumber(lastReceivedPacketSequenceNumber);
packet.setReceivedPacketHistory(receivedPacketHistoryInt);
}
} | 1 |
private void btn_submitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_submitActionPerformed
if ((cbx_backTrouble.getSelectedIndex() == 0) || (cbx_heartTrouble.getSelectedIndex() == 0) || txt_heightInput.getText().isEmpty()) { // if no options were chosen
txt_output.setText("Please an... | 7 |
@Override
public void run() {
try {
while(!Thread.interrupted()) {
synchronized(this) {
while(restaurant.meal != null) {
wait(); // ... for the meal to be taken
}
}
if(++count == 10) {... | 4 |
public int ramainQuantity(String cou_name){
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql = "";
int result = 0;
try{
conn = getConnection();
sql = "select cou_name,count(*) as quantity from coupon where cou_name=? ans cou_usage=1";
pstmt = conn.prepareState... | 8 |
public void minHeapify_top_down(int index) {
int small;
if (index * 2 + 1 >= heap.size())
return;
else if (2 * index + 2 == heap.size()) {
if (heap.get(2 * index + 1).compareTo(heap.get(index)) < 0) {
Type temp = heap.get(2 * index + 1);
heap.set(2 * index + 1, heap.get(index));
heap.set(index, ... | 5 |
static Constructor getDeclaredConstructor(final Class clazz,
final Class[] types)
throws NoSuchMethodException
{
if (System.getSecurityManager() == null)
return clazz.getDeclaredConstructor(types);
else {
try {
... | 3 |
public void start() {
try {
Display.setFullscreen(true);
Display.create();
} catch (LWJGLException e) {
e.printStackTrace();
System.exit(0);
}
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GL11.glOrtho(0, Display.getWidth(), 0, Display.get... | 9 |
public double getMeleeDefence(Client o) {
double level = c.playerLevel[1];
double levelMultiplier = 1.00;
if (c.prayerActive[2])
levelMultiplier *= 1.05;
else if (c.prayerActive[7])
levelMultiplier *= 1.1;
else if (c.prayerActive[15])
levelMultiplier... | 6 |
private void writePostData(OutputStream out, PostData postData)
throws IOException
{
InputStream in = postData.getInputStream();
int contentLength = -1;
if (mHeaders != null) {
Integer i = mHeaders.getInteger("Content-Length");
if (i != null) {
... | 9 |
void processMouseMoved(MouseEvent e) {
if (!hasFocus())
return;
int x = e.getX();
int y = e.getY();
getModel().runMouseScript(MouseEvent.MOUSE_MOVED, x, y);
if (energizerOn) {
if (energizer != null) {
if (x >= energizer.x) {
energizer.mouseEntered(x, y);
} else {
energizer.mouseExited(... | 7 |
public int isGemCollision(int x, int y, ArrayList gems)
{
Gem tempGem;
int number;
for (int i = 0; i < gems.size(); i++)
{
tempGem = (Gem) gems.get(i);
if(tempGem.x == x && tempGem.y == y)
{
number = i;
... | 3 |
public void Check() {
if( ((this.x >= p.x-p.w && this.x < p.x+p.w) && (this.y >= p.y-p.l && this.y < p.y+p.l)) ){
Game.stuff.update();
p.kill();
}
for(Enemy A: Game.Enemies){
if( ((this.x >= A.x-A.w && this.x < A.x+A.w) && (this.y >= A.y-A.l && this.y < A.y+A.l)) ){
this.xSpeed = -this.xSpeed;
th... | 9 |
public void upgrade(T snap) {
Transaction me = Thread.getTransaction();
Locator oldLocator = this.start.get();
T version = (T) oldLocator.fastPath(me);
if (version != null) {
if (version != snap) {
throw new SnapshotException();
} else {
return;
}
}
ContentionM... | 6 |
void addWithArgument( AbstractOptionSpec<?> spec, String argument ) {
detectedSpecs.add( spec );
for ( String each : spec.options() )
detectedOptions.put( each, spec );
List<String> optionArguments = optionsToArguments.get( spec );
if ( optionArguments == null ) {
... | 4 |
@Override
@Command
public MessageResponse upload(String filename) throws IOException
{
File f = new File(directory, filename);
if(f.exists())
{
BufferedReader br = new BufferedReader(new FileReader(f));
try
{
StringBuilder sb = new StringBuilder();
String line = br.readLine();
while (line... | 5 |
protected int getBreedingAge()
{
return breeding_age;
} | 0 |
public NullInfoRegistry add(NullInfoRegistry other) {
if ((other.tagBits & NULL_FLAG_MASK) == 0) {
return this;
}
this.tagBits |= NULL_FLAG_MASK;
this.nullBit1 |= other.nullBit1;
this.nullBit2 |= other.nullBit2;
this.nullBit3 |= other.nullBit3;
this.nullBit4 |= other.nullBit4;
if (other.extra != null) {
if ... | 9 |
private void serverConnectionAction(ActiveUser activeUser, String msg) {
if(activeUser.getUsername()==null) {
try {
activeUser.setUsername(Xmlhandle.extractUsername(msg));
} catch (DocumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
try {
xmlHandle.perform... | 6 |
public void setCoefiente(int coefiente) {
this.coefiente = coefiente;
} | 0 |
int[] kmpTable(String needle) {
if (needle.length() == 0)
return null;
if (needle.length() == 1) {
int[] T = new int[1];
T[0] = -1;
return T;
}
int[] T = new int[needle.length()];
int pos = 2; // the current position we are computing in T
int cnd = 0; // current candidate substring
T[0] = -1... | 5 |
@PUT
@Path("/{isbn}")
@Timed(name = "update-book")
public Response updateBook(@PathParam("isbn") long isbn, @QueryParam("status") String status) throws Exception {
try{
if(!status.equalsIgnoreCase("avialable") &&
!status.equalsIgnoreCase("lost") &&
!status.equalsIgnoreCase("checked-out") &&
... | 6 |
public static String[] jobSearch(String inJob) {
String[] userInfo = new String[5];
Connection c = null;
Statement stmt = null;
try {
Class.forName("org.sqlite.JDBC");
c = DriverManager.getConnection("jdbc:sqlite:Restuarant.db");
c.setAutoCommit(false);
System.out.println("Opened database successful... | 3 |
public Object set(Context cx, Object value)
{
switch (type) {
case SPECIAL_NONE:
return ScriptRuntime.setObjectProp(target, name, value, cx);
case SPECIAL_PROTO:
case SPECIAL_PARENT:
{
Scriptable obj = ScriptRuntime.toObjectOrNull(cx, val... | 8 |
@Override
protected CycNaut toCycTerm(final Money obj) throws ParseException {
ensureCurrencyMapInitialized();
final CycFort functor = lookupCycCurrencyTerm(obj.getCurrency());
if (functor == null) {
throwParseException("Cannot find Cyc UnitOfMoney for currency code " + obj.getCurrency().getCurrency... | 1 |
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
try {
Library library = new Library();
request.setAttribute("bookResults",
library.getBooks("", "Title", "Title", 0));
} catch (SQLException e) {
e.printStackTrace();
}
request.... | 1 |
public static void setHost(String host) {
if (host.length() > 0 && !host.substring(host.length() - 1).equals("/")) {
host += "/";
}
getInstance().host = host;
} | 2 |
public boolean equals(Object y) {
if (y == this) return true;
if (y == null) return false;
if (y.getClass() != this.getClass()) return false;
SET<Key> that = (SET<Key>) y;
if (this.size() != that.size()) return false;
try {
for (Key k : this)
i... | 7 |
public void pushPreferences() {
try {
if (rpcURL == null) {
preferences.put("rpcurl", "");
} else {
preferences.put("rpcurl", rpcURL.toString());
}
preferences.putLong("updateinterval", updateInterval);
preferences.put("... | 2 |
@Override
public boolean execute(AdrundaalGods plugin, CommandSender sender, String... args) {
// Grab the argument, if any.
String arg1 = (args.length > 1 ? args[0] : "");
if(arg1.isEmpty()) {
plugin.saveConfigs();
plugin.saveDataFiles();
Messenger.sendMessage(sender, ChatColor.GRAY+"All fil... | 4 |
public String dibujarMuneco(){
String m = "";
if(nivel.equals("Basico")){
m = munecoBasico();
}
if(nivel.equals("Intermedio")){
m = munecoIntermedio();
}
if(nivel.equalsIgnoreCase("Avanzado")){
m = munecoAvanzado();
}
return m;
} | 3 |
private int medianOf3(int[] array, int left, int right){
int center = (left+right)/2;
if( array[left] > array[center] )
swap(array,left, center);
if( array[left] > array[right] )
swap(array,left, right);
if( array[center] > array[right] )
swap(array, center, right);
swap(arr... | 3 |
public int getNumEntries() {
return numEntries;
} | 0 |
private void arrayList(JsonArray array) {
if(currTok.getType() == STR || currTok.getType() == NUM || currTok.getType() == LBRACE ||
currTok.getType() == LBRACKET || currTok.getType() == BOOL || currTok.getType() == NULL) {
array.addValue(value());
arrayListTail(array);
... | 7 |
@Override
public boolean equals(Object o){
if(o instanceof Pair){
Pair<?, ?> p = (Pair<?, ?>) o;
if(getValueOne().equals(p.getValueOne()) && getValueTwo().equals(p.getValueTwo())){
return true;
}
}
return false;
} | 7 |
public void attemptClose(Dockable dockable) {
if (dockable instanceof CloseHandler) {
if (mDockables.contains(dockable)) {
CloseHandler closeable = (CloseHandler) dockable;
if (closeable.mayAttemptClose()) {
closeable.attemptClose();
}
}
}
} | 3 |
private void copyRGBtoBGRA(ByteBuffer buffer, byte[] curLine) {
if(transPixel != null) {
byte tr = transPixel[1];
byte tg = transPixel[3];
byte tb = transPixel[5];
for(int i=1,n=curLine.length ; i<n ; i+=3) {
byte r = curLine[i];
by... | 6 |
double getKth(int[] a, int[] b, int k) {
int m = a.length;
int n = b.length;
if (n == 0)
return a[k - 1];
if (m == 0)
return b[k - 1];
if (k == 1)
return Math.min(a[0], b[0]);
// divide k into two parts
int p1 = Math.min(k / 2, m);
int p2 = Math.min(k - p1, n);
if (a[p1 - 1] < b[p2 - 1])
... | 5 |
public static CarJsonConverter getInstance() {
return instance;
} | 0 |
public static void main(String[] args) throws Exception
{
for( int x=1; x < NewRDPParserFileLine.TAXA_ARRAY.length; x++)
{
System.out.println(NewRDPParserFileLine.TAXA_ARRAY[x]);
File inFile = new File(ConfigReader.getTopeSep2015Dir() + File.separator +
"spreadsheets" + File.separator +
NewRDP... | 7 |
public void notifyPatternTableToBeModified(int pageNum, int index) {
if (editorRegion != null) {
byte b[] = editorRegion.getTileMask();
int byteOffset = index * 16;
System.arraycopy(b, 0, modelRef.getCHRModel().patternTable[pageNum], byteOffset, 16);
}
if (su... | 6 |
public static boolean isServerUp() {
Map<String, String> connParams = getServerConnectionParams(serverId);
try {
System.setProperty("java.rmi.server.hostname",
connParams.get("serverIP"));
Registry registry = LocateRegistry.getRegistry(
connParams.get("serverIP"), serverPort);
server = (ServerInt... | 3 |
public void visitTableSwitchInsn(final int min, final int max,
final Label dflt, final Label[] labels) {
buf.setLength(0);
for (int i = 0; i < labels.length; ++i) {
declareLabel(labels[i]);
}
declareLabel(dflt);
buf.append("mv.visitTableSwitchInsn(").append(min).append(", ")
.append(max).append(", ... | 3 |
void getValue() {
String methodName = "get" + nameCombo.getText();
getText.setText("");
Widget[] widgets = getExampleWidgets();
for (int i = 0; i < widgets.length; i++) {
try {
java.lang.reflect.Method method = widgets[i].getClass().getMethod(methodName, (Class<?>)null);
Object result = method.invoke... | 8 |
@Override
public List<Categoria> listAll() {
Connection conn = null;
PreparedStatement pstm = null;
ResultSet rs = null;
List<Categoria> categorias = new ArrayList<>();
try{
conn = ConnectionFactory.getConnection();
pstm = conn.prepareStatement(LIST);
... | 3 |
public boolean Shift(int amt)
{
int i;
if(amt < 0)
{
/* right-shift: discarding digits */
/* get positive magnitude */
amt *= -1;
if(amt >= this.size)
{
/* discarding all digits -- set to zero */
this.SetToNative(0);
}
else
{
/* copy digits down, and update size ... | 8 |
public String toString() {
String affiche = "message intelligence";
return affiche;
} | 0 |
public static void main(String args[]){
/*for(int x=0;x<16;x++){
for(int y=0;y<4; y++){
System.out.printf("%b\t", lookUp[x][y]);
}
System.out.printf("\n");
}
}*/
for( int x = 0; x < 256; x++){
String bin = Integer.toBinaryString(x);
if(bin.leng... | 4 |
public void loadHeatSources() {
try {
plugin.heatSources.clear();
try {
for (String tempSource : GlobalConf.getConfigurationSection("HeatSources").getKeys(false)) {
if (Material.getMaterial(tempSource) != null) {
if (!GlobalConf... | 9 |
public static Dao getInstance() {
if (Dao.instance == null) {
if (useJpa) Dao.instance = new JpaDao();
else Dao.instance = new ListDao();
}
return Dao.instance;
} | 2 |
public void run() {
try {
boolean eos = false;
while (!eos) {
OggPage op = OggPage.create(source);
synchronized (drainLock) {
pageCache.add(op);
}
if (!op.isBos()) {
... | 8 |
public int[] getClosestClusters(){
int []arr = new int[2];
arr[0]=0;
arr[1]=0;
double largestSimilarity = -100;
for (int i = 0; i < numberOfDocuments; i++) {
for (int j = 0; j < numberOfDocuments; j++) {
if( i>=j || !clustersExists.get(i) || !clustersExists.get(j) ) continue;
if(similairtyMatrix[i]... | 6 |
public void startGame() {
// Start the game.
mode = ZombieMode.PLAYING;
maxLevel = level.houseList.size() - 1;
levelNum = 0;
score = 0;
initialScore = 0;
zombieLevel = new ZombieLevel(level.houseList.get(levelNum));
house = zombieLevel.getHouse();
... | 2 |
public static String slowEncrypt(String msg, String password) {
// KeyGenerator keyGenerator = null;
// try {
// keyGenerator = KeyGenerator.getInstance("DESede");
// } catch (Throwable e1) {
// e1.printStackTrace();
// }
// if (keyGenerator == null)
// return "";
// keyGenerator.init(168);
SecretKey secr... | 6 |
private void sliderock(Map m, int i, int j) {
if( m.map[i+1][j+1]==Pos.EMPTY || prev!=null && (m.map[i+1][j+1]==Pos.ROCK && prev.map[i+1][j+1]==Pos.EMPTY)){
m.map[i+1][j+1]=Pos.ROCK;
m.map[i][j]=Pos.EMPTY;
}
else if( m.map[i+1][j-1]==Pos.EMPTY || prev!=null && (m.map[i+1][j-1]==Pos.ROCK && prev.map[i+1]... | 8 |
public void move(int dGameX, int dGameY) {
if (getState() == State.MOVING)
return;
if (!canMove(dGameX, dGameY))
return;
if (dGameX == 0 && dGameY == 0)
return;
setNScreenX(getScreenX());
setNScreenY(getScreenY());
if (dGameX != 0) {
setNScreenX(getScreenX() +
dGameX * ... | 8 |
public String getFname() {
return fname;
} | 0 |
public Props getStats(StatType tp) {
if (tp == null) {
tp = StatType.FULL;
}
Props p = new Props();
int nsp = sps.length();
if (tp == StatType.FULL || tp == StatType.PAIRTABLE) {
p.put("date", (new Date()).toString());
String desc = String.for... | 9 |
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DigestMethod")
public JAXBElement<DigestMethodType> createDigestMethod(DigestMethodType value) {
return new JAXBElement<DigestMethodType>(_DigestMethod_QNAME, DigestMethodType.class, null, value);
} | 0 |
static final void method3254(int i, int i_2_, int i_3_,
Class318_Sub1_Sub4 class318_sub1_sub4,
Class318_Sub1_Sub4 class318_sub1_sub4_4_) {
Class357 class357 = Class348_Sub46.method3321(i, i_2_, i_3_);
if (class357 != null) {
((Class357) class357).aClass318_Sub1_Sub4_4406
= class318_sub1_sub4;
((... | 7 |
@Override
public List<Tour> load(Criteria criteria, GenericLoadQuery loadGeneric, Connection conn) throws DaoQueryException {
int pageSize = 10;
List params = new ArrayList<>();
StringBuilder sb = new StringBuilder();
StringBuilder sbw = new StringBuilder();
Boolean f1 = fo... | 2 |
private <T, E extends LangElem> void addAnnotatedClass(Class<T> clazz) throws MappingException {
AnyMapping<T, ?> mapping;
if (clazz.isAnnotationPresent(DefAtom.class)) {
mapping = createAtomMapping(clazz);
} else if (clazz.isAnnotationPresent(DefTerm.class)) {
... | 9 |
@Override
public Vector solveLinearEquationsSystem(Matrix equationMatrix, Vector results) {
isValid(equationMatrix);
if (equationMatrix.getRows() != equationMatrix.getColumns()) {
throw new MathArithmeticException("Cannot solve linear equations system for nonsquare matrix.");
}... | 8 |
public EncryptableObject decrypt(Key key) throws Exception{
String Algrithem;
if(key instanceof PrivateKey){Algrithem = "RSA";}
else{Algrithem = "AES";}
if(encrypted == null) return null;
Cipher decrypt = Cipher.getInstance(Algrithem);
decrypt.init(Cipher.DECRYPT_MODE, key);
ByteArrayInputStream bais... | 3 |
public SingleGuide(DependencyParserConfig configuration, GuideHistory history, GuideMode guideMode) throws MaltChainedException {
this.configuration = configuration;
this.guideMode = guideMode;
final FeatureEngine system = new FeatureEngine();
system.load("/appdata/features/ParserFeatureSystem.xml");
syste... | 9 |
@Override
public void execute() {
} | 0 |
public void run() {
checkTimestamp();
if (RealTimeOrdersSingleton.instance.getLoopStatus()) {
ServiceArgs loginArgs = new ServiceArgs();
loginArgs.setUsername(splunk_username);
loginArgs.setPassword(splunk_password);
loginArgs.setHost(splunk_hostname);
loginArgs.setPort(splunk_serviceport);
try {... | 8 |
public void aff_plateau(List<Coup> coups) {
String[][] tab = new String[plateau.getLigne()][plateau.getColonne()];
String newLine = System.getProperty("line.separator");
for (int i = 0; i < plateau.getLigne() ; i++) {
for (int j = 0; j < plateau.getColonne() ; j++) {
tab[i][j] = "*";
}
}
... | 5 |
final void method415(int i, int j, int k) {
if (k != 0) {
int l = anIntArray2815[k];
int k1 = anIntArray2807[k];
for (int j2 = 0; j2 < anInt2818; j2++) {
int i3 = yPositions[j2] * l + xPositions[j2] * k1 >> 16;
yPositions[j2] = yPositions[j2] *... | 6 |
public static void main(String[] args) throws IOException {
// AuctionService as = new AuctionService();
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try(
Socket client = new Socket("localhost", 10000);
BufferedReader file = new BufferedReader(new InputStreamReader(client.getInput... | 1 |
@Override
public List<Administrador> Buscar(Administrador obj) {
// Corpo da consulta
String consulta = "select f from Administrador f WHERE f.ativo = 1 AND f.id != 0 ";
// A parte where da consulta
String filtro = " ";
// Verifica campo por campo os valores que serão fil... | 8 |
private void defineVariables() {
spawnWorld = Bukkit.getWorld(getConfig().getString("SBB World"));
for (String s : getConfig().getConfigurationSection("Arenas").getKeys(false)) {
try {
Integer.valueOf(s);
} catch (Exception e) {
continue;
}
String[] redSpawn = getConfig().getString("Arenas." + s... | 2 |
public void SetDest(int antiPredict)
{
String type=this.instruction.type;
if(type.equals("LW")||
type.equals("ADD")||
type.equals("NAND")||
type.equals("ADDI")||
type.equals("MUL")||
type.equals("DIV")||
type.equals("JALR"))
this.dest=this.instruction.Rd;
if(type.equals("SW"))
... | 9 |
public static HLinkedList getSortedLinkedList(HLinkedList list){
/* If the list is null, return a null list. */
if (list.getHeadNode() == null) {
return new HLinkedList();
}
/* If the list root is the only node, return the same list. */
if (list.length() == 1){
return new HLink... | 7 |
public void stratify(int numFolds) {
if (numFolds <= 0) {
throw new IllegalArgumentException("Number of folds must be greater than 1");
}
if (m_ClassIndex < 0) {
throw new UnassignedClassException("Class index is negative (not set)!");
}
if (classAttribute().isNominal()) {
//... | 8 |
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof User)) {
return false;
}
User other = (User) object;
if ((this.userid == null && other.userid != null) || (this... | 5 |
private void put(final Item i) {
if (index + typeCount > threshold) {
int ll = items.length;
int nl = ll * 2 + 1;
Item[] newItems = new Item[nl];
for (int l = ll - 1; l >= 0; --l) {
Item j = items[l];
while (j != null) {
... | 3 |
public static Couleur parseCouleur(char codeCouleur)
{
for (Couleur couleur : Couleur.values())
if (couleur.colorChar == codeCouleur)
return couleur;
return null;
} | 2 |
private void enableThisDrag() {
final Delta dragDelta = new Delta();
thisShape.getEllipse().setOnMousePressed(new EventHandler<MouseEvent>() {
@Override public void handle(MouseEvent mouseEvent) {
// record a delta distance for the drag and drop operation.
String curAction = MainContro... | 8 |
public void run(int i) {
while(sim40.memory[i] != -1) {
switch(sim40.memory[i]) {
/* stop */
case 0: return;
/* print, printb, printch */
case 1: case 2: case 3:
this.stdStream.getOutput().add(result(i));
++i;
break;
default:
/* jump, comp, xcomp, ycomp, jineg, jipos, jizero, ji... | 9 |
public void init() throws IOException{
if(basicInfos == null){
try {
initBasicInfoFromInternet();
} catch (JsonSyntaxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} ca... | 4 |
private void handleMessage() {
AbstractTab tab = InputHandler.getActiveTab();
if (tab == null) {
InputHandler.showNotConnectedError();
return;
} else if (tab instanceof ServerTab) {
tab.appendError("Nelze odeslat zprávu. Toto není chatovací místnost!");
... | 2 |
public Solution(Environment env) {
environment = env;
assignmentMap = new TreeMap<String, Assign>(environment.getFixedAssignments());
numLectures = environment.getLectureList().size();
TreeSet<Session> sessionList = environment.getSessionList();
for (Session session : sessionList) {
currentRoomCap... | 5 |
@Override
public boolean containsShort(String name) {
JOSObject<? , ?> raw = this.getObject(name);
if(raw == null) return false;
if(raw.getName().equalsIgnoreCase(SHORT_NAME)) return true;
return false;
} | 4 |
@SuppressWarnings("unchecked")
public void updateLocalWords() {
RestWrapper restRep = new RestWrapper();
Map<String, Serializable> fileSnapshot = restRep.getFileSnapshot();
String requestPrefix = (String) fileSnapshot.get("request_prefix");
Map<String, String> newFileMap = (Map<String, String>) fileSnapshot
... | 9 |
@Override
public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel)
{
if(!mob.isInCombat())
{
mob.tell(L("You must be in combat to do this!"));
return false;
}
if(mob.rangeToTarget()>0)
{
mob.tell(L("You can't do that from this range."));
return false... | 8 |
private void dragColumnDivider(int x) {
int old = mDividerDrag.getWidth();
if (x <= mColumnStart + DIVIDER_HIT_SLOP * 2) {
x = mColumnStart + DIVIDER_HIT_SLOP * 2 + 1;
}
x -= mColumnStart;
if (old != x) {
adjustColumnWidth(mDividerDrag, x);
}
} | 2 |
public boolean equals( Object other ) {
if ( ! ( other instanceof TObjectShortMap ) ) {
return false;
}
TObjectShortMap that = ( TObjectShortMap ) other;
if ( that.size() != this.size() ) {
return false;
}
try {
TObjectShortIterator ite... | 8 |
@Override
public String getDescription(Hero hero) {
int height = (int) SkillConfigManager.getUseSetting(hero, this, "Height", 3, false);
int width = (int) SkillConfigManager.getUseSetting(hero, this, "width", 2, false);
int maxDist = (int) SkillConfigManager.getUseSetting(hero, this, Setting.MAX... | 6 |
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
if (getAirlineName() != null) {
_hashCode += getAirlineName().hashCode();
}
if (getEmployeeId() != null) {
... | 6 |
private void jComboBox2actionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox2actionPerformed
// TODO add your handling code here:
if (this.jComboBox2.getSelectedIndex() == 0) {
return;
}
int ptr = this.jComboBox2.getSelectedIndex() - 1;
String str = "The select event --- ... | 9 |
/* */ public void start() {
/* 74 */ if (this.applet != null) {
/* 75 */ this.applet.start();
/* 76 */ return;
/* */ }
/* 78 */ if (this.gameUpdaterStarted) return;
/* */
/* 80 */ Thread t = new Thread() {
/* */ public void run() {
/* 82 */ Launcher.thi... | 8 |
public static Object trapWrite(Object[] args, String name) {
Metalevel base = (Metalevel)args[0];
if (base == null)
_classobject.trapFieldWrite(name, args[1]);
else
base._getMetaobject().trapFieldWrite(name, args[1]);
return null;
} | 1 |
public void combine(String IP_PORT, String apiKey){
DBService dbService = new DBService();
HashMap data = null;
FileService fileService = new FileService();
if(this.link.contains("haitao.smzdm")){
PageHaitao pageHaitao = new PageHaitao();
data = pageHaitao.getInfo... | 8 |
private String getResponse(HttpURLConnection conn) {
String xml = "";
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String next = null;
while ((next = reader.readLine()) != null)
xml += next.equals("") ? next : next + "\n";
} catch (IOExcept... | 3 |
public void setStatus(Status status) {
this.status = status;
} | 0 |
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.