text stringlengths 14 410k | label int32 0 9 |
|---|---|
public boolean benutzerErstellen(String benutzername, String passwort,
int oeEinheit) {
Benutzer neu = dbZugriff.neuerBenutzerErstellen(benutzername, passwort,
oeEinheit, Optionen.isInitialbelegungbenutzergesperrt());
if (neu == null) {
return false;
} else {
return true;
}
} | 1 |
public int getId() {
return id;
} | 0 |
private int setUpForEval(BitSet subset) throws Exception {
int fc = 0;
for (int jj = 0;jj < m_numAttributes; jj++) {
if (subset.get(jj)) {
fc++;
}
}
//int [] nbFs = new int [fc];
//int count = 0;
for (int j = 0; j < m_numAttributes; j++) {
m_theInstances.attribute(j).setWeigh... | 8 |
public void setMatches(Vector matches) {this.matches = matches;} | 0 |
@BeforeClass
public static void setUpClass() {
} | 0 |
@Test
@Ignore
public void test_AttendanceResponseListGet()
{
AttendanceResponseList laAttRespList = laClient.getAttendanceResponseList(5,
"2012-01-01-08.00.00.000000");
System.out.println(laAttRespList.getAttendanceResponseList().size());
if (laAttRespList.getAttendanceResponseList().size() > 0)
{
for... | 2 |
public int getPrice()
{
return price;
} | 0 |
public int AddParagraph(String Text, String ID) {
//Controllo se l'ID sia presente nella lista
for (int i = 0; i < this._MyParagraphList.size(); i++) {
if (this._MyParagraphList.get(i).GetID().equals(ID)) {
//Creo il paragrafo che andrà a comporre il paragrafo
... | 3 |
static void drawBg1(Graphics2D ctx, Game game, World world) {
if (bg == null) {
bg = new BufferedImage(1200, 800, BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = (Graphics2D) bg.getGraphics();
g2d.setPaint(textures.toTexture(21*12+9, 18));
g2d.fillRect(0,0,1200,800)... | 2 |
public final JSONArray getJSONArray(String key) throws JSONException {
Object o = get(key);
if (o instanceof JSONArray) {
return (JSONArray)o;
}
throw new JSONException("JSONObject[" + quote(key) +
"] is not a JSONArray.");
} | 1 |
public final Writer write(Writer writer) throws JSONException {
try {
boolean b = false;
int len = length();
writer.write('[');
for (int i = 0; i < len; i += 1) {
if (b) {
writer.write(',');
}
... | 5 |
public void updateRoom(Room newRoom) throws IllegalArgumentException {
int oldRoomIndex = -1;
for (int roomIndex = 0; roomIndex < rooms.size(); ++roomIndex) {
if (rooms.get(roomIndex).equals(newRoom) &&
rooms.get(roomIndex).getRoomID() != newRoom.getRoomID()) {
... | 4 |
public PumpingLemma get(int i)
{
return (PumpingLemma)myList.get(i);
} | 0 |
public static List<String> complement(List<String> list_1,
List<String> list_2) {
List<String> result_list = new ArrayList<>();
for (String element : list_1) {
if (list_2.contains(element)) {
result_list.add(element);
}
}
return result_list;
} | 2 |
public void setSize(Dimension size) {
generateUnit(size);
} | 0 |
public static String currencyName2(String c1, String c2){
Connection conn = DBase.dbConnection();
PreparedStatement dbpst;
String curName2 ="";
try{
String query = "Select CurrencyName FROM "+c1+ " where CountryCode = ?";
dbpst=conn.prepareStatement(query);
... | 2 |
static final public String RelationalExpression() throws ParseException {
String tmp1="",tmp3="";Token tmp2=null;
tmp1 = ShiftExpression();
if (jj_2_23(2)) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 97:
tmp2 = jj_consume_token(97);
break;
ca... | 8 |
@Override
public Integer get(int index) {
switch(index) {
case 0: return x;
case 1: return y;
case 2: return z;
default: throw new IndexOutOfBoundsException();
}
} | 3 |
static int getLength(LinkedList list) {
int size = 0;
int n = list.size();
for (int i = 0; i < n; ++i) {
AttributeInfo attr = (AttributeInfo)list.get(i);
size += attr.length();
}
return size;
} | 1 |
public void paintShape(Graphics2D g2)
{
if (color != null)
{
label.setForeground(new java.awt.Color((int) color.getRed(), (int) color.getGreen(), (int) color.getBlue()));
Dimension dim = label.getPreferredSize();
if (dim.width > 0 && dim.height > 0)
{
... | 3 |
Circle addDigit(boolean digit)
{
Circle newCircle = new Circle(digits, hash);
ArrayList<Boolean> newDigits = newCircle.digits;
boolean[] newHash = newCircle.hash;
newDigits.add(digit);
byte middleHash = 0;
for (byte i = N; i > 0; i--)
if (newDigits.get(newDigits.size()-i))
middleHash += (by... | 8 |
void assertConsistent() {
lock.lock();
try {
if (requiresEviction()) {
throw new AssertionError("requires evictions: size=" + mostRecentlyUsedQueries.size()
+ ", maxSize=" + maxSize + ", ramBytesUsed=" + ramBytesUsed() + ", maxRamBytesUsed=" + maxRamBytesUsed);
}
for (LeafC... | 9 |
public Image getImage() {
if ( text != null && image == null ) {
// Create the text image
image = new BufferedImage(pos.width, pos.height, BufferedImage.TYPE_INT_RGB);
Graphics2D g = image.createGraphics();
if ( font != null )
g.setFont(font);
// If the user didn't set the size, then we should re... | 8 |
public TaskListTablePanel(TaskListTableModel taskListTableModel)
{
super();
Objects.requireNonNull(taskListTableModel);
tasksBeingEdited = 0;
ActionListener al = new TaskPanelActionListener(this);
setLayout(new BorderLayout());
JPanel topPanel = new JPanel();
topPanel.setLayout(new BorderLayout());
... | 4 |
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page ... | 6 |
@Override
public MoveResult makeMove(HantoPieceType pieceType, HantoCoordinate from, HantoCoordinate to) throws HantoException {
HantoPlayerColor color;
HantoPiece piece;
MoveResult result;
color = whoseTurnIsIt();
// switch case for adding different types of game pieces
switch(pieceType) {
case... | 4 |
@Override
public void mouseClicked( MouseEvent e ) {
for( MouseListener listener : listeners( MouseListener.class )){
listener.mouseClicked( e );
}
} | 1 |
public static void main(String[] args) {
if (args.length != 3) {
System.out.println(USAGE);
System.exit(0);
}
String name = args[0];
InetAddress addr = null;
int port = 0;
Socket sock = null;
// check args[1] - the IP-adress
try {
addr = InetAddress.getByName(args[1]);
} catch (UnknownHostExc... | 5 |
public ProtocolChatMessage(int type, String content) {
mType = type;
mContent = content;
} | 0 |
public double standardDeviation_as_double() {
boolean hold = Stat.nFactorOptionS;
if (nFactorReset) {
if (nFactorOptionI) {
Stat.nFactorOptionS = true;
} else {
Stat.nFactorOptionS = false;
}
}
double variance = 0.0D;
switch (type) {
case 1:
double[] dd = this.getArray_as_double();
v... | 5 |
public boolean groupSum5(int start, int[] nums, int target) {
if (start >= nums.length) return (target == 0);
if (nums[start] % 5 == 0) {
if (groupSum5(start + 1, nums, target - nums[start])) return true;
} else if (start != 0 && nums[start] == 1 && nums[start - 1] % 5 == 0) {
... | 9 |
public String toString() {
try {
return this.toJSON().toString(4);
} catch (JSONException e) {
return "Error";
}
} | 1 |
public void nextQuestion() {
boolean exit = false;
while (!exit) {
++_currentQuestionNumber;
if (_currentQuestionNumber >= _questionsList.length) {
_currentQuestionNumber = 0;
}
final QuestionsDatabase questionDatabase = new QuestionsDatabase();
int questionNumber = _questionNumbers.get(_questi... | 9 |
public void insertCorporation(int ID, String name, String address, String email) throws SQLException {
if (conn != null) {
Corporation corporation = new Corporation(ID, name, address, email);
corporation.insert(conn);
}
} | 1 |
public Object[][] make_data_file(){
String[][] data= new String[this.tank_count][3];
for(int i=0; i<this.tank_count; i++){
data[i][0]=this.tanks_available[i].get_name();
String errormessage="";
switch (this.errors[i]){
case 0:
errormessage="";
break;
case 1:
errormessage="you can p... | 5 |
public void renderTile(int xp, int yp, Tile tile)
{
xp -= xOffset;
yp -= yOffset;
for(int y = 0; y < tile.sprite.SIZE; y++)
{
int ya = y + yp;
for(int x = 0; x < tile.sprite.SIZE; x++)
{
int xa = x + xp;
if(xa < -tile.sprite.SIZE || xa >= width || ya < 0 || ya >= height) break;
if(xa < 0) ... | 7 |
private void backTrackToCNF()
{
if (myCNFMap==null)
{
backTrackToUnit();
return;
}
// System.out.println("MAP : "+myCNFMap);
int[] visited=new int[myTrace.size()];
for (int i=0; i<myTrace.size(); i++)
{
if (visited[i]==0)
{
Production target=myTrace.get(i);
if (myCNFMap.keySet().co... | 6 |
public MiOSDeployHelper() {
setMacOsFeatures();
MouseHandler mouseHandler = new MouseHandler();
setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 509, 367);
createMenu();
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setConte... | 9 |
@Override
public CreativeMaterialType getTypeByName(final String name) throws WrongTypeNameException {
if (name == null) {
throw new WrongTypeNameException("Type name is empty");
}
switch (name) {
case SLIDES_TYPE_NAME:
case VIDEO_TYPE_NAME:
ca... | 4 |
public void poll() {
if (runningJob != null) {
// check if the job has finished
if (System.currentTimeMillis() - startTime > runningJob.getDuration()) {
// job done
runningJob.setStatus(JobStatus.Done);
// fire event handler
for (INodeEventHandler handler : handlers)
handler.jobDone(runni... | 3 |
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://down... | 6 |
public int score(WordChain word) {
int score = 0;
int size = word.getLetterChain().size;
;
if(size <= 3){
score += size;
}else if(size ==4){
score += 5;
}else if(size ==5){
score += 7;
}else if(size == 6){
score += 10;
}else{
score += 15;
}
return score;
} | 4 |
public void move(int x, int y)
{
int newX = this.GetX() + x;
int newY = this.GetY() + y;
this.SetX(newX);
this.SetY(newY);
} | 0 |
public void setDirectionY(int a){
directionY = a;
} | 0 |
public BinaryNode getSuccessor()
{
if(hasChildren()){
if(getLeft() == null && getRight() != null)
return getRight();
else if(getLeft() != null && getRight() == null)
return getLeft();
else // the two children case
return getRight().getLeftmostNode();
}
return null;
} | 5 |
private void list() {
if (connections.isEmpty()) {
UI.setError("No hay conexiones activas");
} else {
UI.clearError();
Connection connection;
int i;
UI.printHeader();
System.out.println(connections.size() + " conexiones activas:");
System.out.println("");
for (i = 0; i < connections.size()... | 3 |
public boolean CheckForCollisionCustom(String name, int posX, int posY, int width, int height)
{
/* NOTES:
*
* - A string value matching [""] will mean that there
* will be no name checking for the collision.
*
* */
//Creating the variables
boolean checkBoolean = false;
boolean checkName ... | 6 |
public void processHost(int userLevel, String channel, String sender, String hostname, String message, boolean autoRestart, int port) {
logMessage(LOGLEVEL_NORMAL, "Processing the host command for " + Functions.getUserName(hostname) + " with the message \"" + message + "\".");
if (botEnabled || isAccountTypeOf(user... | 5 |
public void serial(List<Matchable> patterns) {
boolean[] flags = new boolean[patterns.size()];
for (int i=0; i<flags.length; i++)
flags[i] = false;
boolean terminate = false;
while (!terminate) {
Map<String, String> map = new HashMap<String, String>();
int index = -1;
String msg = "Generate object... | 7 |
public boolean isPressed() {
if(isDisabled())
return false;
return pressed;
} | 1 |
@Override
public void run() {
boolean connected = false;
do {
connected = connect();
if( connected ) {
log.info("Connected to server "+ serverConnection);
} else {
log.info("Can't find server "+ serverConnection +" ... trying to reconnect");
Util.pause(1);
}
} while( !connected );
Se... | 9 |
protected void moveLabel(MouseEvent e)
{
mxGraph graph = graphComponent.getGraph();
mxGeometry geometry = graph.getModel().getGeometry(state.getCell());
if (geometry != null)
{
double scale = graph.getView().getScale();
mxPoint pt = new mxPoint(e.getPoint());
if (gridEnabledEvent)
{
pt = grap... | 5 |
public int checkTileForWater(int i) {
if (isWater(players.get(i).getPosition()) == true) {
// check for water
System.out.println("Water tile detected");
Position startPos = players.get(i).getTrail().get(0);
players.get(i).ResetTrail();
players.get(i).setPosition(startPos);
System.out
.println(... | 1 |
public void postOrder() {
try {
if (!customerExisting) {
customerFacade.create(customer);
customerFacade.flush();
}
Random random = new Random();
int i = random.nextInt(999999999);
Date date = new Date();
cu... | 8 |
public boolean requestFriendship(Person otherPerson) {
if (this.friends.contains(otherPerson)){
return true;
}
if(this.sendMessage(otherPerson, "/friend")){
this.friends.add(otherPerson);
return true;
}
return false;
} | 2 |
private void mergeFinallyBlock(FlowBlock tryFlow, FlowBlock catchFlow,
StructuredBlock finallyBlock) {
TryBlock tryBlock = (TryBlock) tryFlow.block;
if (tryBlock.getSubBlocks()[0] instanceof TryBlock) {
/*
* A try { try { } catch {} } finally{} is equivalent to a try {}
* catch {} finally {} so remove... | 1 |
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://down... | 6 |
private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
String tmpcod = JOptionPane.showInputDialog(this, "Introdusca su codigo", "Captura de codigo", JOptionPane.QUESTION_MESSAGE);
Usuarios us = new Usuarios(tmpcod, null, null);
Usuari... | 2 |
public void update(){
if(!won && !dead){
if(hasStarted){
elapsedMS = (System.nanoTime() - startTime) / 1000000;
formattedTime = formatTime(elapsedMS);
}
else{
startTime = System.nanoTime();
}
}
checkKeys();
if(score >= highScore){
highScore = score;
}
for(int row = 0; row... | 8 |
public Ability(String name, String trigger) {
this.name = name;
this.trigger = trigger;
} | 0 |
public boolean canHaveAsCreditLimit(BigInteger creditLimit) {
return (creditLimit != null) && (creditLimit.compareTo(BigInteger.ZERO) <= 0);
} | 1 |
public static int maxProfit(int[] prices) {
if(prices.length <= 1) {
return 0;
}
int max = prices[0];
int min = prices[0];
int maxPofit = 0;
for(int i = 0; i < prices.length; i++) {
if(prices[i] < min) {
int tmp = max-min;
if(tmp > maxPofit) {
maxPofit = tmp;... | 6 |
@Override
protected void onWriteContent(XMLStreamWriter toStream, PropertySet toObject, XMLFormatType toFormatType)
{
if (toObject == null || toObject.isEmpty())
{
return;
}
Object[] loKeys = toObject.getPropertyKeys().toArray();
Arrays.sort(loKeys);
... | 9 |
@Override
public boolean equals(Object o)
{
boolean isEqual = false;
if(o != null && o instanceof User)
{
User temp = (User) o;
if(temp.username.equals(this.username) && Arrays.equals(temp.password, this.password))
{
isEqual = true;
... | 4 |
private boolean duplicated(int a, int b, int max) {
int maxLoop = (int) (Math.sqrt(a) + 1);
for (int i = 2; i < maxLoop; i++) {
if (a % i != 0) {
continue;
}
int root = logn(i, a);
if (root == -1) {
continue;
}
int bPlus = b * root;
if (bPlus <= max) {
return true;
} else {
f... | 9 |
public static void stub(String string){
if(developerMode){
System.out.println("STUB: " + getClassName() + ":" + getMethodName() + "():" + getLineNumber() + ": " + string);
}
} | 1 |
private String startToneHunt (CircularDataBuffer circBuf,WaveData waveData) {
String line;
final int HighTONE=1280;
final int LowTONE=520;
final int toneDIFFERENCE=HighTONE-LowTONE;
final int ErrorALLOWANCE=40;
// Look for a low start tone followed by a high start tone
int tone1=do1024FFT(circBuf,waveD... | 7 |
public boolean canHaveAsWall(Wall newW) {
for(Element e: elements) {
if(e instanceof Player) {
for(Position p : newW.getPositions()) {
if(e.getPosition().equals(p)) {
return false;
}
}
}
else if(e instanceof Wall) {
Wall w = (Wall) e;
//if(w.getDirection().equals(Directio... | 9 |
@After
public void tearDown() throws Exception {
this.service = null;
} | 0 |
private void paintPauseScreen(Graphics2D g){
g.setFont(pauseFont);
if (fm == null){
initClickAreas();
}
if (inOptions)
drawOptions(g);
else
drawPauseScreen(g);
} | 2 |
private int jjMoveStringLiteralDfa3_4(long old0, long active0) {
if (((active0 &= old0)) == 0L)
return 3;
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
return 3;
}
switch (curChar) {
case 93:
if ((active0 & 0x100000L) != 0L)
return jjStopAtPos(3, 20);
break;
... | 4 |
public Tile[] getNeighbors() {
return neighbors;
} | 0 |
public static int compare(String s1,String s2) {
if (collator==null)
collator = java.text.Collator.getInstance();
return collator.compare(s1,s2);
}; | 1 |
public boolean equals(Object other) {
if (other instanceof Tuple) {
Tuple otherTuple = (Tuple) other;
return
(( this.first == otherTuple.first ||
( this.first != null && otherTuple.first != null &&
this.first.equals(otherTuple.first))) &&
( this.second == otherTuple.secon... | 8 |
public int getZoomLevel() {
return zoomLevel;
} | 0 |
private void initialize() {
PSOUtil.reset();
Particle bestPreviousIndividual = this.initialIndividual!=null ?
new Particle(this.initialIndividual.getPersonWorkLists()) : null;
Particle initialParticle = null;
if (bestPreviousIndividual != null) {
initialParticle = (Particle) bestPreviousIndiv... | 7 |
public static final int[] adjustXYByDirections(int x, int y, final int direction)
{
switch(direction)
{
case Directions.NORTH:
y--;
break;
case Directions.SOUTH:
y++;
break;
case Directions.EAST:
x++;
break;
case Directions.WEST:
x--;
break;
case Directions.NORTHEAST:
x++;
y... | 8 |
@Override
public float[] getWordEntropies(int[] iids) {
// check to make sure that nodes exist for every id
for(int i = 0; i < iids.length; i++)
if(root.getChild(iids[i]) == null)
iids[i] = this.findUnknownId(vocab.getSymbol(iids[i]));
wordEnts = new float[iids.length-1];
simpleEnts = new float[iids.len... | 9 |
public void continueGame(){
while(continueHit && player.getHandTotal() < 21){
playerPlay();
if(continueHit)
player.printHand();
}
System.out.println("--- Dealer's turn ---");
while(continueDealerHit && dealer.getHandTotal() < 21){
dealerPlay();
}
dealer.printHand();
System.out... | 8 |
private void carregaBairrosAssesoria(String idCidade){
if(comboCidadeAssessoria.getSelectedItem().toString().equals("Selecionar....")){
System.out.println("Nenhuma cidade selecionada");
}else{
System.out.println("Carregando bairros...");
//String cod = String.... | 3 |
public void testAddDurationConverterSecurity() {
if (OLD_JDK) {
return;
}
try {
Policy.setPolicy(RESTRICT);
System.setSecurityManager(new SecurityManager());
ConverterManager.getInstance().addDurationConverter(StringConverter.INSTANCE);
... | 2 |
private void readTokenFromScanner(){
int length = tokenCache.length;
boolean tokenNotFound = true;
while(tokenNotFound) {
try {
int tokenKind = scanner.getNextToken();
if(tokenKind != TokenNameEOF) {
int start = scanner.getCurrentTokenStartPosition();
int end = scanner.getCurrentTokenEndPos... | 9 |
private void hook() {
Thread ct = Thread.currentThread();
if(!(ct instanceof HackThread))
throw(new RuntimeException("Tried to use an HackSocket on a non-hacked thread."));
final HackThread ut = (HackThread)ct;
InterruptAction ia = new InterruptAction();
ut.addil(ia);
this.ia.set(ia);
} | 1 |
private void menuAbrirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuAbrirActionPerformed
// TODO add your handling code here:
FileFilter f = new FileFilter() {
@Override
public boolean accept(File pathname) {
if (pathname.getAbsolutePath()... | 4 |
public void setAnnualBonus(double annualBonus) {
if (annualBonus < 0){
throw new IllegalArgumentException("Bonus must be greater than or equal to zero");
}
this.annualBonus = annualBonus;
} | 1 |
private void handleResponsePacket(DatagramPacket packet) {
try {
String strPacket = new String(packet.getData(), 0, packet.getLength());
Log.d(LOG_TAG, "response=" + strPacket);
String tokens[] = strPacket.trim().split("\\n");
Log.d(LOG_TAG, "tokens.length=" + tokens.length);
String location = null;
... | 8 |
public void testWithField3() {
Partial test = createHourMinPartial();
try {
test.withField(DateTimeFieldType.dayOfMonth(), 6);
fail();
} catch (IllegalArgumentException ex) {}
check(test, 10, 20);
} | 1 |
public void run() {
try {
ObjectOutputStream out = new ObjectOutputStream(server.getOutputStream());
ObjectInputStream in = new ObjectInputStream(server.getInputStream());
// --Mutil User but can't parallel
String [] arr= (String[]) in.readObject();
System.out.println(arr[0]+arr[1]);
switch (arr[0])... | 6 |
private void send(OutputStream outputStream) {
String mime = mimeType;
SimpleDateFormat gmtFrmt = new SimpleDateFormat("E, d MMM yyyy HH:mm:ss 'GMT'", Locale.US);
gmtFrmt.setTimeZone(TimeZone.getTimeZone("GMT"));
try {
if (status == null) {
... | 9 |
void readAssignmentList(CommandSender sender, ResultSet resSet, String queriedPlayer)
{
String aState = "";
boolean assignmentFound = false;
try
{
sender.sendMessage("Auftragsliste von: " + ChatColor.GREEN + queriedPlayer);
sender.sendMessage("---... | 4 |
public static void testArray() {
Array<Comparable<?>> myArray = new Array<Comparable<?>>(0);
// System.out.println("Set " + obj0 + " to " + 0);
// myArray.setElement(0, obj0);
// System.out.println(myArray);
// System.out.println("Last position: " + myArray.getLastPosition());
//
/... | 2 |
public static Keyword scanCachedGoals(ControlFrame frame) {
{ Proposition proposition = frame.proposition;
Iterator iterator = ((Iterator)(KeyValueList.dynamicSlotValue(frame.dynamicSlots, Logic.SYM_STELLA_ITERATOR, null)));
AtomicGoalCache cachedgoal = null;
PatternRecord patternrecord = ((QueryI... | 7 |
private void initPWResetFontMenu(Color bg) {
this.pwResetBtnPanel = new JPanel();
this.pwResetBtnPanel.setBackground(bg);
this.pwResetBtnPanel.setLayout(new VerticalLayout(5, VerticalLayout.LEFT));
String initFontTmp = this.skin.getPWResetFont();
int initFontSizeTmp = this.skin.... | 7 |
public String getRecipient() {
return recipient;
} | 0 |
private void flee() {
if (Utils.getDistance(this, World.getMonsterArray().get(DistList.indexOf(Collections.min(DistList)))) < 50) {
if (x < World.getMonsterArray().get(DistList.indexOf(Collections.min(DistList))).getX()) {
isLPress = true;
} else if (x > World.getMonsterArray().get(DistList.indexOf(Collecti... | 5 |
private Rectangle getDragOverBounds() {
Rectangle bounds = new Rectangle(mDragOverNode.getX(), mDragOverNode.getY(), mDragOverNode.getWidth(), mDragOverNode.getHeight());
switch (mDragOverLocation) {
case NORTH:
bounds.height = Math.max(bounds.height / 2, 1);
break;
case SOUTH:
int halfHeight = Ma... | 4 |
public void handleKeyPress(int value) {
switch (value) {
case MinuetoKeyboard.KEY_UP:
this.keyUp = true;
break;
case MinuetoKeyboard.KEY_LEFT:
this.keyLeft = true;
break;
case MinuetoKeyboard.KEY_RIGHT:
this.keyRight = true;
break;
case MinuetoKeyboard.KEY_DOWN:
this.keyDown... | 5 |
public void populateEnemies(){
sprinters = new ArrayList<Sprinter>();
waiters = new ArrayList<Waiter>();
pacers = new ArrayList<Pacer>();
walkers = new ArrayList<Walker>();
spitters = new ArrayList<Spitter>();
enemies = new ArrayList<Enemy>();
Sprinter s;
Waiter w;
Pacer p;
Walker wa;
Spitter s... | 9 |
public static WordLocation parseWordLocation(String obj) {
WordLocation wl = new WordLocation();
String data[] = obj.split("\n");
if( data.length != 2)
return null;
String tokens[] = data[0].split("[=]|[\\{]|[\\}]|[,]");
try {
if(data[0].indexOf("WordLocat... | 8 |
@Override
public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel)
{
MOB target=this.getTarget(mob,commands,givenTarget);
if(target==null)
return false;
if(target.fetchEffect(ID())!=null)
{
mob.tell(L("You already healed by fire."));
return false;
}
... | 9 |
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.