text stringlengths 14 410k | label int32 0 9 |
|---|---|
public void initialize() {
// the next line is for Raspberry Pi and
// gets us into the while loop and was suggested here was suggested http://www.raspberrypi.org/phpBB3/viewtopic.php?f=81&t=32186
System.setProperty("gnu.io.rxtx.SerialPorts", "/dev/ttyACM0");
CommPort... | 5 |
public CommandParams(Object value) {
params = new ArrayList();
params.add(value);
} | 0 |
public void CheckArrows()
{
for(int k = 880; k < 893; k++){
if(playerEquipment[playerArrows] == k){
HasArrows = true;
}
else if(playerEquipment[playerWeapon] == 4214){
HasArrows = true;
}
else {
HasArrows = false;
}
}
} | 3 |
public FileMetadata(PayloadContainer source, String filename, String mimeType, String description,
Id3PictureType picType, byte[] fileData) {
super();
this.source = source;
this.filename = filename;
this.mimeType = mimeType;
this.description = description;
// if file contents are supplied, store size/cr... | 7 |
Key[] resize(Key[] a, int n)
{
Key[] b = (Key[]) new Comparable[n];
System.arraycopy(a, 0, b, 0, (a.length < b.length) ? a.length
: b.length);
return b;
} | 1 |
@SuppressWarnings({ "rawtypes" })
public void run() {
threadPool = ThreadPool.create("Trap", 2);
dispatcher = new MultiThreadedMessageDispatcher(threadPool,
new MessageDispatcherImpl());
listenAddress = GenericAddress.parse(System.getProperty(
"snmp4j.listenAddress", "udp:0.0.0.0/20162"));
TransportMap... | 2 |
public static boolean isQualified(){
//*** should check the size of shopList, if (shopList.length = 0) return false;
if (isSorted) return true;
else if (shopListArr.length <= maxShopListSize) return true;
return false;
} | 2 |
private String prepareAnswer(Question question)
{
String answerString = "<html>" + "<b>Ответ: </b>" + question.getAnswer();
if (question.getComments() != null)
answerString += "<br/><br/>" + "<b>Комментарий: </b>" + question.getComments();
return answerString;
} | 1 |
protected JavaSoundAudioDevice createAudioDeviceImpl()
throws JavaLayerException
{
ClassLoader loader = getClass().getClassLoader();
try
{
JavaSoundAudioDevice dev = new JavaSoundAudioDevice();// (JavaSoundAudioDevice)instantiate(loader, DEVICE_CLASS_NAME);
return dev;
}
catch (Exception ex)
{
t... | 2 |
public void printStack(){
int line = 0;
System.out.println("Going to print the Stack\n!");
if(top == -1)
System.out.println("Nothing to print here!");
else if (top == 0){
System.out.println("---------\n");
System.out.printf("|%3d.%3d|\n",st[0].get_MazeCellrow(),st[0].get_MazeCellcol());
System.o... | 3 |
public void menuFileSym() {
int choice;
do {
System.out.println("\n");
System.out.println("File Cryption Menu");
System.out.println("Select Symmetric Cryption Methode");
System.out.println("---------------------------------\n");
System.out.pri... | 5 |
public void setMarker(AbstractPlay play) {
board[play.getDestination().getY()][play.getDestination().getX()] = new Marker (play);
} | 0 |
@Override
public boolean equals(Object foo) {
if (foo instanceof SearchNode) {
return getAsLocation().equals(((SearchNode) foo).getAsLocation());
}
return super.equals(foo);
} | 1 |
private void method81(Sprite sprite, int y, int x) {
int bounds = x * x + y * y;
if (bounds > 4225 && bounds < 90000) {
int i1 = cameraX + minimapInt2 & 0x7ff;
int j1 = Model.modelIntArray1[i1];
int k1 = Model.modelIntArray2[i1];
j1 = j1 * 256 / (minimapIn... | 2 |
private boolean isMethodAvailable(SootMethod newMethod, SootClass c) {
// TODO Auto-generated method stub
for(SootMethod m : c.getMethods()){
if(m.getSubSignature().equals(newMethod.getSubSignature()))
return true;
}
return false;
} | 2 |
private void btnGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarActionPerformed
Pasajero pasajero;
if(txtNombre.getText().trim().equals("")){
JOptionPane.showMessageDialog(rootPane, "Debe ingresar datos");
txtNombre.requestFoc... | 7 |
@Override
public String toString() {
return "SaleRoleEntity ["
+ (id != null ? "id=" + id + ", " : "")
+ (role != null ? "role=" + role + ", " : "")
+ (getId() != null ? "getId()=" + getId() + ", " : "")
+ (getRole() != null ? "getRole()=" + getRole() + ", " : "")
+ (getClass() != null ? "getClas... | 6 |
public SimulatedECG2(SimulatedPatient patient, Spawner spawn, InitialJFrame app)
{
super("Simulated ECG");
this.patient = patient;
this.application = app;
spawner = spawn;
title = new JLabel(" Simulated ECG");
title.setFont(new Font("Arial", Font.PLAIN, 38));
title.setForeground(Color.WHITE);
titl... | 2 |
public void deleteUser(User user) {
try {
beginTransaction();
session.delete(user);
session.getTransaction().commit();
} catch (Exception e) {
e.printStackTrace();
} finally {
closeSession();
}
} | 1 |
private void leerProperties() {
FileReader fr = null;
Properties p;
try {
p = new Properties();
fr = new FileReader(Constantes.properties);
p.load(fr);
rutaBD = p.getProperty(Constantes.rutaFicheros);
} catch (FileNotFoundException ex) {
... | 4 |
protected List<Item> getSiegeWeapons(Physical P)
{
final List<Item> items=new ArrayList<Item>();
if(P instanceof BoardableShip)
{
BoardableShip myShip=(BoardableShip)P;
for(Enumeration<Room> r=myShip.getShipArea().getProperMap();r.hasMoreElements();)
{
final Room R2=r.nextElement();
if((R2!=null... | 8 |
@Override
public String getText() {
if (isAction())
return "";
else
return div.getText();
} | 1 |
@Override
protected PlayerStartPosition getPlayerStartPosition(Grid grid, Player player) {
if (grid == null || player == null)
throw new IllegalArgumentException("The given arguments are invalid!");
return new PlayerStartPositionCTF(grid, player);
} | 2 |
public void setFiledType(String filedType) {
this.filedType = filedType;
} | 0 |
private void postPlugin(final boolean isPing) throws IOException {
// The plugin's description file containg all of the plugin data such as name, version, author, etc
final PluginDescriptionFile description = plugin.getDescription();
// Construct the post data
final StringBuilder data =... | 9 |
public static void resetSettings() {
int n = JOptionPane
.showConfirmDialog(
null,
"Are you sure you would like to reset? This will delete all the configurations and will need to be reconfigured again. The application will close on confirmation.",
"Reset Configuration", JOptionPane.YES_NO_OPTION... | 1 |
private int getThresholdCounter(int niveau) {
switch (niveau) {
case 1:
return 14;
case 2:
return 12;
case 3:
return 10;
case 4:
return 10;
case 5:
return 8;
... | 9 |
public void writeDocType(String name, String pubId, String sysId)
throws IOException, XMLWriterException {
if (!bDocumentOpen) {
throw new XMLWriterException(
"Can't write DocType, no open document.");
} else if (!openElements.isEmpty()) {
throw ne... | 5 |
private static ListItem binarySearchArray(ListItem[] items, String target) {
ListItem retVal = null;
System.out.println("Binary Searching for " + target + ".");
ListItem currentItem = new ListItem();
boolean isFound = false;
int counter = 0;
int low = 0;
int high... | 5 |
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 void showAll() {
String sSql = "Select kisiAdiSoyadi,mekanID,soruID,cevapID from hareketler order by kisiAdiSoyadi";
ResultSet rs = DataAccess.Select(sSql);
if (kisi == null) {
kisi = new ArrayList();
}
if (mekan == null) {
mekan = new ArrayList()... | 7 |
public void findBishopMovesAlongDiagonal(ArrayList<Move> legalMoves,int row, int col,
int rowDirection, int colDirection) {
Piece piece = boardController.getPieceByCoords(row, col);
boolean isBlocked = false;
Move move;
int i = 1;
int newRow = row + (rowDirection * i);
int newCol = col + (colDirectio... | 9 |
public void setShutdownmenuButtonMargin(int[] margin) {
if ((margin == null) || (margin.length != 4)) {
this.buttonShutdownmenu_Margin = UIMarginInits.SHDMENU_BTN.getMargin();
} else {
this.buttonShutdownmenu_Margin = margin;
}
somethingChanged();
} | 2 |
private void pathTextEnterPressed() {
clearOldData();
//Processing string from text field
String source = pathText.getText();
text.append(String.format("Processing: %s.%s", source, newline));
if (source.contains("http://") || source.contains("http://"))
{
//... | 3 |
public void calculateFunctionStatistics() {
if (functionCount == 0 && functions != null) {
for (int i = 0; i < functions.size(); i++) {
functionCount++;
if (functions.get(i) > 0)
functionsCoveredCount++;
}
}
} | 4 |
protected boolean decodeFrame() throws JavaLayerException
{
try
{
AudioDevice out = audio;
if (out==null)
return false;
Header h = bitstream.readFrame();
if (h==null)
return false;
// sample buffer set when decoder constructed
SampleBuffer output = (SampleBuffer)decoder.decod... | 4 |
public static void main(String[] args) {
w = new Worker();
} | 0 |
public int getCountErrors(final String callName) {
int nbErrors = 0;
final List<CallData> data = getCallData(callName);
for (final CallData callData : data) {
if(Status.ERROR.equals(callData.getStatus())) {
nbErrors++;
}
}
return nbErrors;
} | 2 |
public void writeArithmetic(String command) {
if(command.equals("add")) {
writeAdd();
return;
}
if(command.equals("sub")) {
writeSub();
return;
}
if(command.equals("neg")) {
writeNeg();
retu... | 9 |
@Override
//Esta metodo permite dar de alta un producto en BBDD comprobando que este no exista ya en ella
public int altaProducto(TProducto producto)
{
int id_producto;
TransactionManager.obtenerInstanacia().nuevaTransaccion();
try
{
TransactionManager.o... | 4 |
private void login(MailAccount account) {
sTrace.debug("login for Account " + account.userName);
try {
// send username
writeToServer("USER " + account.userName);
if (readFromServer().startsWith("-ERR")) {
// Server returned -ERR -> abort
throw new Exception("Username refused");
} else {
sT... | 4 |
protected static Map<String, String> getColumns() {
HashMap<String, String> columns = new HashMap<String, String>();
columns.put("permissions", "TEXT");
columns.put("name", "VARCHAR(255)");
columns.put("options", "TEXT");
return columns;
} | 0 |
@Override
public void focusLost(FocusEvent fe) {
//System.out.println("Focus lost!");
JTextField thisField = (JTextField) fe.getSource();
try {
int inputNumber = Integer.parseInt(thisField.getText());
//System.out.print("Parsed: ");
//System.out.println(in... | 4 |
@Override
public T loadOneBySpecification(final Specification<T> specification) throws UnexpectedResultatSizeException {
T satisfied = null;
for (final T aggregate : aggregates.values()) {
if (specification.isSatisfiedBy(aggregate)) {
if (satisfied == nu... | 3 |
protected boolean validateMove(Coordinate move) {
boolean test = false;
if (test || m_test) {
System.out.println("Game :: validateMove() BEGIN");
}
if (isValidMove(move)) {
getWindow().displayInvalidMove(false);
if (test || m_test) {
System.out.pr... | 7 |
public void link() {
for (MethodDef method : staticMethods)
method.link();
for (MethodDef method : instanceMethods)
method.link();
// Unless this is an abstract type, populate the virtual method table.
if (virtualMethodDescTable != null)
for (RawMetho... | 7 |
public void setMovingState(EMovingStates stateName)
{
switch(stateName){
case NORMAL:
currentMovingState = normalMovingState;
currentMovingStateName =EMovingStates.NORMAL;
break;
case OPPOSITE:
currentMovingState = op... | 5 |
private void releaseLockHoldbyTransaction(Transaction transaction) {
for(int i: sites.keySet()) {
Site site = sites.get(i);
if(!site.isFailed()) {
site.releaseTransactionLock(transaction);
}
}
} | 2 |
public Square (final Grid grid, final int x, final int y) {
this.grid = grid;
this.x = x;
this.y = y;
imageView.setOnMouseClicked(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent me) {
if (me.getButton() == MouseButton.PRIMA... | 2 |
public void run() {
this.done = false;
int i = 0;
Random r = new Random();
while (!this.done) {
if (maxEvents > 0 && i >= maxEvents) { this.done = true; }
int rand = r.nextInt();
if (rand % 2 == 0) {
ObjectatEvent event = new ObjectatEvent(logger);
event.setKey(this.baseKey + i);
... | 7 |
public double standardDeviation_of_ComplexModuli() {
boolean hold = Stat.nFactorOptionS;
if (nFactorReset) {
if (nFactorOptionI) {
Stat.nFactorOptionS = true;
} else {
Stat.nFactorOptionS = false;
}
}
double[] re = this.array_as_modulus_of_Complex();
double standardDeviation = Stat.standardDe... | 2 |
public static <T extends Enum<?>> T lookup(Map<String, T> lookup, String name, boolean fuzzy) {
String testName = name.replaceAll("[ _]", "").toLowerCase();
T type = lookup.get(testName);
if (type != null) {
return type;
}
if (!fuzzy) {
return null;
}
int minDist = Integer.MAX_VALUE;
for (Map.... | 7 |
public String toString(){
return "("+start+","+end+")";
} | 0 |
private boolean r_mark_suffix_with_optional_s_consonant() {
int v_1;
int v_2;
int v_3;
int v_4;
int v_5;
int v_6;
int v_7;
// (, line 143
// or, line 145
lab0: do {
... | 9 |
public void popularCbProjeto() {
ArrayList<String> Projetos = new ArrayList<>();
ProjetoBO projetoBO = new ProjetoBO();
try {
Projetos = projetoBO.CMBProjeto(UserLogado.getDepartamento().getCodigo());
} catch (SQLException ex) {
JOptionPane.showMessageDialog(nul... | 2 |
public boolean hasCycle(ListNode head) {
if (head == null || head.next == null) {
return false;
}
ListNode second = head;
while (head != null && second != null) {
head = head.next;
second = second.next;
if (second != null) {
... | 6 |
public boolean checkPhaseOne(int row, int col) {
boolean worked = false;
if (board[row][col].empty()) {
for (int i = 1; i < 10; i++) {
if (!conflict(row,col,i)) {
board[row][col].setPot(i);
worked = true;
}
... | 7 |
public CheckResultMessage check28(int day) {
int r = get(39, 5);
int c = get(40, 5);
int r2 = get(41, 5);
BigDecimal b = new BigDecimal(0);
if (checkVersion(file).equals("2003")) {
try {
in = new FileInputStream(file);
hWorkbook = new HSSFWorkbook(in);
b = getValue(r + 2, c + day, 10)
.su... | 5 |
public boolean existSubForum(String subForumid) {
for (int i = 0; i < subForums.size(); i++) {
if(subForums.get(i).getId().equals(subForumid)) return true;
}
return false;
} | 2 |
public boolean getBoolean(int index) throws JSONException {
Object object = this.get(index);
if (object.equals(Boolean.FALSE)
|| (object instanceof String && ((String) object)
.equalsIgnoreCase("false"))) {
return false;
} else if (object.equal... | 6 |
public void print() {
// print value
if (this.value == 1) {
this.output.print("A");
} else if (this.value <= 10) {
this.output.print(this.value);
} else if (this.value == 11) {
this.output.print("J");
} else if (this.value == 12) {
this.output.print("Q");
} else if (this.value == 13) {
this.... | 9 |
public char read () throws IOException
{ while (true)
{ byte c=In.readByte();
if (c==-1) // Telnet ??
{ c=In.readByte();
Dump.println("Telnet received!"+(int)(256+c));
if (c==-3)
{ c=In.readByte();
CF.Outstream.write(255);
CF.Outstream.write(252);
CF.Outstream.write(c);
continu... | 8 |
private static void gaussian(float a[][],
int index[]) {
int n = index.length;
float c[] = new float[n];
// Initialize the index
for (int i = 0; i < n; ++i) {
index[i] = i;
}
// Find the rescaling factors, one from each row
for (int i = 0; i < n; ++i){
float c1 = 0;
... | 9 |
static double det(double[][] A){
double det = 0;
if(A.length == 1){
det = A[0][0];
}else{
for(int i = 0; i < A.length; i++){
det += Math.pow(-1,i)*det(minor(A,i,0))*A[i][0];
}
}
return det;
} | 2 |
public static void vhd(int bits,int n,int k) throws IOException{
int error=n-k;
int gfextend=(int) (Math.pow(2, bits)-1);
String library = new String("library IEEE;"+nl+"use IEEE.STD_LOGIC_1164.ALL;"+nl+"use IEEE.STD_LOGIC_ARITH.ALL;"+nl+"use IEEE.STD_LOGIC_UNSIGNED.ALL;"+nl+nl);
String entity=new String("entit... | 9 |
public static Picture loadPicture(String locationString) {
final BufferedImage img;
final BufferedImage origImage;
URL locationURL = null;
File locationFile = null;
try {
locationURL = new URL(locationString);
} catch (MalformedURLException e) {
File tmpFile = new File(locationStri... | 7 |
public void addDamagedRegion(FigureDrawContext fdc, Region region) {
int xmin = Integer.MAX_VALUE, ymin = Integer.MAX_VALUE;
int xmax = Integer.MIN_VALUE, ymax = Integer.MIN_VALUE;
for (int i = 0; i < points.length; i += 2) {
if (points[i] < xmin) xmin = points[i];
if (points[i] > xmax) xmax = points[i];
... | 5 |
@Override
public Object push(Object object) {
//If the stack is too big, remove elements until it's the right size.
while (this.size() > maxSize) {
this.remove(0);
}
return super.push((T) object);
} | 1 |
private int alpha_beta(BoardNode root,int a, int b, int d) {
int i,var;
BoardNode tmp;
if(d==0){/*if reach the max depth, return the static value */
var = this.evaluator.Evaluate(root, this.myClr);
return var;
}
if (root.isMAX){/*for max node*/
for(i=0;i<7;i++)
{
if((tmp=root.NewNode(i... | 9 |
@Override
public boolean equals(Object x) {
if (!(x instanceof Tuple))
return false;
Tuple t = (Tuple) x;
if (t.size != size)
return false;
for (int i = 0; i < size; i++) {
if (!items[i].equals(t.getItem(i)))
return false;
}
return true;
} | 4 |
public String getText() {
if (content.size() == 0) {
return "";
}
// If we hold only a Text or CDATA, return it directly
if (content.size() == 1) {
final Object obj = content.get(0);
if (obj instanceof Text) {
return ((Text) obj).getText();
}
return "";
}
// Else build String up
final... | 6 |
public void setName(String name) {
this.name = name;
} | 0 |
@Override
public void actionPerformed(ActionEvent arg0) {
/* Denne blir trigga av knappen. Den prøvar altså å sjekke svar.
* Men vi tek først ein sjekk på om brukar har skrive noko, ellers er det vel greit å anta at svaret er feil...
*/
String actionCommand = arg0.getActionCommand();
if(actionCommand.... | 4 |
@SuppressWarnings("unused")
private ArrayList<String> getOrderedResultsByNGramsFlexible(String first, int ngramLength) {
ArrayList<String> ret = new ArrayList<String>();
ArrayList<GeolocationString> toSort = new ArrayList<GeolocationString>();
GeolocationString ngramFirst = new GeolocationString(first.toLowerCa... | 8 |
public void nextStep(Context ctx) {
ctx.setState(new SecondState());
} | 0 |
protected void randomlyRareFillWithBlocks(World par1World, StructureBoundingBox par2StructureBoundingBox, int par3, int par4, int par5, int par6, int par7, int par8, int par9, boolean par10)
{
float var11 = (float)(par6 - par3 + 1);
float var12 = (float)(par7 - par4 + 1);
float var13 = (floa... | 6 |
@Override
public void run() {
if (bot.hasPrivateMessage()) {
message = bot.getPrivateMessage();
}
if (message.startsWith("~register")) {
tokenize(false, 9, message);
try {
encryptor = MD5.getInstance();
register = new Pro... | 7 |
protected void makeSets() {
people = new HashSet<Person>();
families = new HashSet<Family>();
notes = new HashSet<Note>();
sources = new HashSet<Source>();
for (Iterator iter = xrefTable.values().iterator(); iter.hasNext();) {
Core o = (Core) iter.next();
if (o instanceof Person)
people.add((Perso... | 5 |
private void getAll(TreeNode node) {
int l = 0;
int r = 0;
int p = 0;
if (node.left != null) {
l = node.left.key;
}
if (node.right != null) {
r = node.right.key;
}
if (node.parent != null) {
p = node.parent.key;
}
System.out.println("Left: " + l + " Key: " + node.key + " Right: " + r + " P... | 5 |
public static void stopAll(){
for(String id : staticClips.keySet()){
stop(id);
}
for(String id : cacheClips.keySet()){
stop(id);
}
} | 2 |
public static Key readKeyFromFile(String dir){
FileInputStream fileInputStream=null;
File file = new File(dir);
byte[] keyBytes = new byte[(int) file.length()];
try {
fileInputStream = new FileInputStream(file);
fileInputStream.read(keyBytes);
fileInputStream... | 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 fe... | 6 |
@Override
public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException {
Input input = gc.getInput();
if(input.isKeyPressed(Input.KEY_SPACE)){
sbg.enterState(0);
}
} | 1 |
public void keyPressed(KeyEvent e) {
System.out.println("Usuwam znacznik");
switch (e.getKeyCode())
{
case KeyEvent.VK_DELETE:
MapGetter.deleteMarker();
MapGetter.getMapImage(MapGetter.createUrl(0, 0));
repaint();
break;
case KeyEv... | 3 |
int getMaximum(int[] cookies, int P1, int P2)
{
Comparator<Integer> co = new Comparator<Integer>(){
@Override
public int compare(Integer o1, Integer o2) {
if(o1 > o2)
return -1;
return 0;
}
};
boolean b = true;
int count = 0;
Integer[] pI = {P1, P2};
Integer[] cI = new Integer[c... | 6 |
final void method3684(Class98 class98) {
Class167 class167 = method3724(Thread.currentThread());
Class318_Sub9 class318_sub9
= (((Class88) ((Class98) class98).aClass88_1569)
.aClass318_Sub9_1503);
for (Class318_Sub9 class318_sub9_208_
= ((Class318_Sub9) class318_sub9).aClass318_Sub9_6469;
class... | 8 |
private Integer parent(int pos) {
return pos == 0 ? null: pos / 2;
} | 1 |
public void saveCoffers(){
File cofferFile = new File(getDataFolder(),cofferFileName);
if(cofferFile.exists())
cofferFile.delete();
if(coffers.size()==0)
return;
try {
cofferFile.createNewFile();
} catch (IOException e) {
logWarning("Unable to create coffers file!");
return;
}
FileConfi... | 5 |
private static char getMenuOption() {
do {
System.out.println("Enter option (A, R, T, L, U, S, C): ");
String inputString = keyboard.next().toUpperCase();
switch (inputString) {
case "A":
case "R":
case "T":
case "L":
case "U":
case "S":
case "C":
return (inputString.charAt(0));
... | 8 |
public static void main(String[] args) {
System.out.println("\nThis program asks the user for a line of text " +
"then displays the text as separate word in different lines.");
// Allow multiple operations
while (true){
System.out.print("\nGive me a... | 7 |
private static void findTheBiggest() {
// The first numbers of the Fibonacci sequence are 1 and 2
BigInteger FirstInteger = BigInteger.valueOf(1);
BigInteger SecondInteger = BigInteger.valueOf(2);
BigInteger TemporaryInteger = BigInteger.valueOf(0);
int i = 3;
// Using compareTo to check if SecondInteger is n... | 1 |
@Override
public boolean execute(Player player) {
if(this.hasSecondWord()) {
GameEngine.gui.println("Back what?");
return false;
}
if (player.hasPreviousRoom())
GameEngine.gui.println("You can't go back!");
else {
Room vRoom = player.getPreviou... | 4 |
private String getExtendsPresenter(TypeElement classDeclaration) {
Collection<? extends AnnotationMirror> annotations = classDeclaration.getAnnotationMirrors();
for (AnnotationMirror a : annotations) {
Element decl = a.getAnnotationType().asElement();
if (decl == null) {
continue;
}
... | 8 |
final boolean method1555(byte i, boolean bool) {
anInt2828++;
int i_5_ = anInt2792;
int i_6_ = -15 / ((28 - i) / 55);
int i_7_ = anInt2767;
if (bool) {
i_5_ = anInt2822;
i_7_ = anInt2775;
}
if ((i_5_ ^ 0xffffffff) == 0)
return true;
boolean bool_8_ = true;
if (!((ItemLoader) ((ItemDefinition) th... | 5 |
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof CustomXYToolTipGenerator) {
CustomXYToolTipGenerator generator = (CustomXYToolTipGenerator) obj;
boolean result = true;
for (int series = 0; series < getList... | 7 |
@Override
protected MultiLevelCache getCurrentLevelCache(String pool) {
initialize();
net.sf.ehcache.Cache cache;
try {
cache = doGetCache(pool.toUpperCase());
} catch (Exception e) {
throw new CacheUnreachableException("创建Ehcache实例失败");
}
Ehcache ehcache = new Ehcache();
ehcache.setCache(cache);
... | 1 |
public static long encodeBase37(String name)
{
long encode = 0;
for (int i = 0; i < name.length(); i++)
{
char character = name.charAt(i);
encode *= 37;
if (character >= 'A' && character <= 'Z')
{
encode += 1 + character - 65;
}
else if (character >= 'a' && character <= 'z')
{
encode... | 9 |
/** @return the minimum distance between the 1/2 of VDW surface of the selected and that of the unselected. */
public float getMinimumDistance(BitSet bs) {
float min = Float.MAX_VALUE;
boolean bi = false;
boolean bj = false;
float xij, yij, zij, rij;
int imin = -1, jmin = -1;
for (int i = 0; i < iAtom; i++... | 9 |
public getActiveUser() {
this.info = "who am I?";
this.addRtnCode(201, "no active user");
} | 0 |
public void update() {
// Moves Character or Scrolls Background accordingly.
if (speedX < 0) {
centerX += speedX;
}
if (speedX == 0 || speedX < 0) {
bg1.setSpeedX(0);
bg2.setSpeedX(0);
}
if (centerX <= 200 && speedX > 0) {
centerX += speedX;
}
if (speedX > 0 && centerX > 200) {
bg1.setS... | 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.