text stringlengths 14 410k | label int32 0 9 |
|---|---|
public static Inventory deserialize(String s) {
String size = s.substring(0,s.indexOf("!")-1);
Inventory inv = Bukkit.getServer().createInventory(null, Integer.parseInt(size));
String[] istacks = s.split("&");
for(int i=0;i<istacks.length;i++) {
ItemStack is = deserializeBasicSection(istacks[i]);
if(istac... | 4 |
private Comparison comparison() {
ArrayList<Expr> exprlist = new ArrayList<Expr>();
ArrayList<CompOp> compopList = new ArrayList<CompOp>();
Expr fisrtExpr = expr();
while (lexer.token == Symbol.EQ
|| lexer.token == Symbol.NEQ || lexer.token == Symbol.NOT
|... | 9 |
public int[] render(int xOffset, int yOffset, int w, int h)
{
if(isBlankTiles)
{
return null;
}
if(!APIMain.getAPI().renderMapOnce || pix == null || update)
{
pix = new int[w * h];
MapManager mm = MapManager.instance;
Tile tilevoid = mm.getTileFromID(0);
Tile currentTile = tilevoid;
int[] c... | 9 |
@Override
public void run(CommandArgs arg0) {
CommandLine c = arg0.getCommandline();
String[] args = arg0.getRawArgs().split(" ");
if (args.length > 1 && args[0].equals("site")) {
Integer id = Integer.parseInt(args[1]);
// Get the site
Site site = WebSe... | 3 |
public static void main(String[] args) {
// TODO Auto-generated method stub
double gallons, liters;
int counter;
counter = 0;
for(gallons = 1; gallons <= 100; gallons++)
{
liters = gallons * 3.7854;
System.out.println(gallons + " gallons is " +
liters + " liters.");
counter++;
if (c... | 2 |
public void setTableName(String tableName) {
this.tableName = tableName;
} | 0 |
private String calc(String input) {
String reversed = "";
for(int i = input.length(); i > 0; i --){
reversed = reversed + input.charAt(i-1);
}
return reversed;
} | 1 |
public static void main(String[] args) {
Jsaper jsaper = new Jsaper();
Path file = null;
Path targetDirectory = null;
Map<String, Object[]> map = jsaper.getParamList(args);
if(map.get("one")[0].equals(true)) {
file = initAchiveFile(map.get("other")[0].toString());
UnZipper zipper;
try {
zipper ... | 5 |
public Connection getConnection()
{
if (_connection == null)
{
try
{
_connection = ConnectionContext.getConnection();
if (!_connection.isConnected())
{
_connection.connect("USER","_SYSTEM","DATA");
... | 4 |
public void init() {
String serverConnectStr = "Enter server: ";
while (true) {
String hostStr = JOptionPane.showInputDialog(serverConnectStr, Connection.DEFAULT_HOST + ":" + String.valueOf(Connection.DEFAULT_PORT));
if (hostStr == null) {
return;
}
try {
this.conn = new Connection(hostStr);
... | 7 |
public void traverseRayTopDown(OctreeHitResult hit_result){
if( hit_result == null ){
return ;
}
IDX_SHFT = 0;
DwRay3D ray_mod = hit_result.ray.copy(); // copy ray
if( mirrorComponent(root.aabb, ray_mod, 0) ) IDX_SHFT |= 4;
if( mirrorComponent(root.aabb, ray_mod, 1) ) IDX_SHFT |= 2;... | 7 |
@Override
public HashMap<String,ClassNode> refactor(){
//if (!Updater.useOutput)
// Deob.deobOutput.add("* Starting Arithmetic Deob*"+System.getProperty("line.separator"));
System.out.println("* Starting Arithmetic Deob*");
List<InsnWrapper> replace = getInstructions();
... | 8 |
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Hospedagem other = (Hospedagem) obj;
if (this.IdHospedagem != other.IdHospedagem && (this.IdHospedagem ==... | 5 |
public static String getFormattedTime(int time) { // throws Exception{
if (time < 10 && time >= 0) {
return String.format("0%d00", time);
} else if (time <= 24 && time >= 0) {
return String.format("%d00", time);
} else if (time >= 100 && time <= 2400) {
if (time % 100 < 60 && time % 100 >= 0) {
if (t... | 9 |
public DefaultTempFile(String tempdir) throws IOException {
file = File.createTempFile("NanoHTTPD-", "", new File(tempdir));
fstream = new FileOutputStream(file);
} | 0 |
void shutdown() {
if (preferences != null && owner != null) {
Rectangle bounds = owner.getBounds();
preferences.putInt("Upper-left x", bounds.x);
preferences.putInt("Upper-left y", bounds.y);
MenuBar menuBar = (MenuBar) owner.getJMenuBar();
preferences.put("Latest E2D Path", menuBar.getLatestPath("e2d"... | 8 |
public void handle(String target, Request serverRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
if (!target.equals("/shutdown") || !request.getMethod().equals("POST") || !secret.equals(request.getParameter("secret")))
return;
try {
... | 7 |
void createColorAndFontGroup () {
super.createColorAndFontGroup();
TableItem item = new TableItem(colorAndFontTable, SWT.None);
item.setText(ControlExample.getResourceString ("Item_Foreground_Color"));
item = new TableItem(colorAndFontTable, SWT.None);
item.setText(ControlExample.getResourceString ("Item_B... | 6 |
public synchronized boolean remover(int i)
{
try
{
new PesquisaDAO().remover(list.get(i));
list = new PesquisaDAO().listar("");
preencherTabela();
}
catch (Exception e)
{
return false;
}
return true;
} | 1 |
private void calculateSimilarities() {
for (Integer user1 : userRatedMovies.keySet()) {
for (Integer user2 : userRatedMovies.keySet()) {
if (user1 > user2) {
double sim = computeSimilarity(user1, user2);
if (similarities.containsKey(user1)) {
similarities.get(user1).put(user2, sim);
} el... | 5 |
public ParseTree optimise(ParseTree root) {
//This is the root that will replace the unoptimised root
ParseTree optimisedTree = new ParseTree();
//Copy the root's data into the optimised tree
optimisedTree.value = root.value;
optimisedTree.attribute = root.attribute;
//Optimise all children
if (root... | 3 |
private void guardarNuevo(){
if(partida.getInvasores() != null){
final String nombre = JOptionPane.showInputDialog( this,
"El nombre del juego debe estar\ncomprendido entre 3 y 15 caracteres "
,"¿Con qué nombre quieres guardar el juego?",
... | 4 |
public int getItemRankLevel(String rank){
String r = rank;
if(r.equalsIgnoreCase("*")){
return 1;
}else if(r.equalsIgnoreCase("**")){
return 2;
}else if(r.equalsIgnoreCase("***")){
return 3;
}else if(r.equalsIgnoreCase("****")){
return 4;
}else{
return 0;
}
} | 4 |
private boolean formulaOK(Stock stock, ArrayList<EconomicIndicator> indicatorsTest,
ArrayList<Double> formula) {
//Will all indicators very high result in an unusable price?
double calcPrice = 0;
for (int i = 0; i < indicators.size(); i++){
calcPrice += indicatorsMin.get(i) * fo... | 9 |
private Map<Integer, Integer> dijkstra(Integer start, Integer stop) {
for (Integer inte : graph.getEdges()) {
PonderatePoint pp;
if(inte.equals(start)) {
pp = new PonderatePoint(inte,0);
}
else{
pp = new PonderatePoint(inte,INFINITE);
}
predecessors.put(inte, -1);
vertex.add(pp);
dis... | 8 |
public AnimExplosion(float width, float height) {
SpriteSheet explosion = null;
try {
explosion = new SpriteSheet("resources/explosion.png", 256, 256);
} catch (SlickException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
explode = new Animation();
for (int i... | 3 |
public static void evalPrecision(Dataset dataset)
{
double trainTotal = 0, trainCorrect = 0;
double testTotal = 0, testCorrect = 0;
double quizTotal = 0, quizCorrect = 0;
for(Instance inst : dataset.data)
{
if(inst.type == InstanceType.Train)
{
trainTotal++;
if(inst.target == inst.predict)
... | 9 |
private void writeEscaped(final char[] buffer, final int offset, final int len) throws IOException {
final int maxi = offset + len;
for (int i = offset; i < maxi; i++) {
final char c = buffer[i];
if (c == '\n') {
this.writer.write("<br />");
... | 9 |
public void updateLatestWrite(ReadIncOperation riop)
{
ReadIncOperation riop_var_wriop = null;
for (String var : GlobalData.VARSET) // variable by variable
{
riop_var_wriop = riop.getLatestWriteMap().getLatestWrite(var);
if (riop_var_wriop != null)
if (this.getLatestWrite(var) == null || this.getLatest... | 8 |
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 final void setMeso(final int meso) {
if (locked || partner == null || meso <= 0 || this.meso + meso <= 0) {
return;
}
if (chr.getMeso() >= meso) {
chr.gainMeso(-meso, false, true, false);
this.meso += meso;
chr.getClient().getSession().write(MaplePacketCreator.getTradeMesoSet((byte) 0, thi... | 6 |
public ServerListen(Socket connection) {
try {
ObjectInputStream oInputStream;
ObjectOutputStream oOutputStream;
this.connection = connection;
oInputStream = new ObjectInputStream(connection.getInputStream());
client = (Player) oInputStream.readObject();
clientIp = connection.getInetAddress().g... | 4 |
int getOrderIndex () {
CTableColumn[] orderedColumns = parent.orderedColumns;
if (orderedColumns == null) return getIndex ();
for (int i = 0; i < orderedColumns.length; i++) {
if (orderedColumns [i] == this) return i;
}
return -1;
} | 3 |
public void edit(Employee employee) throws NonexistentEntityException, Exception {
EntityManager em = null;
try {
em = getEntityManager();
em.getTransaction().begin();
employee = em.merge(employee);
em.getTransaction().commit();
} catch (Exception ... | 5 |
protected int Seek(long offset)
{
int rc;
try
{
file.seek(offset);
rc = DDC_SUCCESS;
} catch (IOException ioe)
{
rc = DDC_FILE_ERROR;
}
return rc;
} | 1 |
private int getFirstIdenticalVertexId(Model model, int vertex) {
int vertexId = -1;
int x = model.verticesX[vertex];
int y = model.verticesY[vertex];
int z = model.verticesZ[vertex];
for (int v = 0; v < vertexCount; v++) {
if (x != verticesX[v] || y != verticesY[v] || z != verticesZ[v])
continue;
ve... | 6 |
public void expandNode(final Node n) {
new Thread() {
public void run() {
synchronized (LocalityUtils.this) {
if (!locality.getCompleteEltSet().contains(n)) return;
tgPanel.stopDamper();
for(int... | 7 |
@Override
public boolean checkCanPlace() {
boolean canPlace = super.checkCanPlace();
String group = registry.getBlockManager().getBlockGroup(mapX, mapY);
if(group.equals("Town")) {
canPlace = false;
}
return canPlace;
} | 1 |
protected void _reallocate(int newCapacity) {
buf = Arrays.copyOf(buf, newCapacity);
} | 0 |
@Override
public void mouseMoved(MouseEvent event) {
JFrame frame = Game.get().display.getFrame();
float zoomX = (frame.getWidth()-frame.getInsets().left-frame.getInsets().right)/800f;
float zoomY = (frame.getHeight()-frame.getInsets().top-frame.getInsets().bottom)/800f;
int mouseX = (int) (event.getX()/zoo... | 6 |
public void testConstructor_int_int_Chronology() throws Throwable {
TimeOfDay test = new TimeOfDay(10, 20, JulianChronology.getInstance());
assertEquals(JulianChronology.getInstanceUTC(), test.getChronology());
assertEquals(10, test.getHourOfDay());
assertEquals(20, test.getMinuteOfHour(... | 4 |
private void actionListener(){
mntmClientes.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
new AddCliente();
}
});
mntmFuncionarios.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
new Add... | 6 |
private String getFileChecksum()
throws IOException, NoSuchAlgorithmException
{ InputStream in = new FileInputStream(file.getAbsolutePath());
byte[] buffer = new byte[1024];
int bytes_read;
MessageDigest complete = MessageDigest.getInstance("MD5");
do
{ bytes_read = in.read(buffer);
if(bytes_rea... | 3 |
private void addButtonSet(JPanel panel, String[] buttons, int rows, int leftPadding) {
int row = 0;
int column = 1;
for (String numButton : buttons) {
String[] sizeText = numButton.split(",");
int width = SMALL_BUTTON_WIDTH;
int sep = SMALL_BUTTON_SEP;
... | 9 |
@Override
public BigDecimal getPrice(String sku) throws SkuNotFoundException {
final BigDecimal price = this.dataAccess.getPriceBySku(sku);
if (price == null) {
throw new SkuNotFoundException();
}
return price.add(price);
} | 1 |
private boolean jj_3R_74() {
if (jj_3R_72()) return true;
return false;
} | 1 |
public void keyReleased(KeyEvent e) {
int keyCode = e.getKeyCode();
//System.out.println("Release: " + e.getKeyText(e.getKeyCode()));
KeyBoard mInstance = KeyBoard.getInstance();
switch (keyCode) {
case KeyEvent.VK_UP :
mInstance.Release(KeyBoard.KEY_CODE.KEY_UP);
break;
case KeyEvent.VK... | 8 |
@Override
public boolean equals(final Object obj) {
final ComparableNumber num;
try {
num = (ComparableNumber) obj;
} catch (ClassCastException c) {
return false;
}
return number.equals(num.getNumber());
} | 1 |
static final public void sum() throws ParseException {
term();
label_1:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case PLUS:
case MINUS:
;
break;
default:
jj_la1[1] = jj_gen;
break label_1;
}
switch ((jj_ntk==-1)?jj_ntk():jj_nt... | 7 |
public void generateHardwareSetAlternatives() {
generateDummyHardwareAlternatives();
for (HardwareAlternative cpuAlternative : cpuAlternatives)
for (HardwareAlternative hddAlternative : hddAlternatives)
for (HardwareAlternative memoryAlternative : memoryAlternatives)
for (HardwareAlternative networkAlte... | 6 |
@Override
public void collides(Entity... en) {
for (Bullet B : b) {
if (B == null || B.getBounds() == null || B == null || B.cull()) {
continue;
}
for (Entity e : en) {
if (e == B)
continue;
Polygon p = e.getBounds();
if (B.shape.intersects(e.getBounds())) {
B.takeDamage(e.doDamage... | 8 |
@Override
protected boolean isSubTypeOf(final BasicValue value,
final BasicValue expected) {
Type expectedType = expected.getType();
Type type = value.getType();
switch (expectedType.getSort()) {
case Type.INT:
case Type.FLOAT:
case Type.LONG:
case... | 9 |
@Override
public Choice getChoice(List<Choice> choices) {
while (true) {
for (int i = 0; i < choices.size(); i++) {
Choice mc = choices.get(i);
System.out.print((i+1) + ". ");
System.out.println(mc.getDescription());
}
// ask for input
String input = console.nextLine();
try {
i... | 6 |
static void initiateParameters() throws IOException {
InputParams inputParams = new InputParams();
while (!inputParams.isFinised) {
sikuli.wait(1);
}
rowNum = inputParams.getRowNum();
cowNum = inputParams.getCowNum();
cards = new Card[rowNum + 2][cowNum + 2];
isScaned = new boolean[rowNum + 2][cowNum ... | 9 |
@Override
public String toString() {
return this.value;
} | 0 |
public static void save(double[] input, String filename) {
// assumes 44,100 samples per second
// use 16-bit audio, mono, signed PCM, little Endian
AudioFormat format = new AudioFormat(SAMPLE_RATE, 16, 1, true, false);
byte[] data = new byte[2 * input.length];
for (int i = 0; i... | 6 |
@Override
public void preUpdate() {
if(destruction) destroy();
if(x<=16 || x>=map.getMapWidth()-16 ) hspeed=-hspeed;
if( y<=16 || y>=map.getMapHeight()-16) vspeed=-vspeed;
if(!activated && placeFree() ) {
activated=true;
}
// TODO Auto-gene rated method stub
} | 7 |
public void render(GameObject object)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
forwardAmbient.bind();
object.renderAll(forwardAmbient, this);
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
glDepthMask(false);
glDepthFunc(GL_EQUAL);
for(BaseLight light : lights)
{
act... | 4 |
public CheckResultMessage checkF08(int day) {
int r1 = get(20, 5);
int c1 = get(21, 5);
int r2 = get(47, 5);
int c2 = get(48, 5);
if (checkVersion(file).equals("2003")) {
try {
in = new FileInputStream(file);
hWorkbook = new HSSFWorkbook(in);
if (0 != getValue(r1 + 8, c1 + day, 5).compareTo(
... | 5 |
public String getName() {
return this._name;
} | 0 |
public static void keyDown(long delta, int key) {
switch (key) {
case Keyboard.KEY_UP:
Game.player.jump(delta);
break;
case Keyboard.KEY_LEFT:
Game.player.move(delta, "left");
break;
case Keyboard.KEY_RIGHT:
Game.player.move(delta, "right");
break;
default:
System.err.println(Keyboard.get... | 3 |
private PreparedStatement statement(Object[] args, Sql annotation, Connection c) throws SQLException {
logger.info("Start prepare statement");
Map<String, Object> queryParams = new HashMap<String, Object>();
int argNr = 1;
if (args != null) {
for (Object arg: args) {
... | 4 |
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int l = Integer.parseInt(br.readLine());
String[] in = br.readLine().split(" ");
int[] r = new int[l];
int max_all = 0;
for (int i = 0; i < l; i++) {
int max = Integer.MIN... | 6 |
public void setSkillName(String skillName) {
this.skillName = skillName;
} | 0 |
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 |
@Override
public void mouseExited(MouseEvent e) {
Virucide.moving = true;
try {
Robot r = new Robot();
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
if (game && !Virucide.menu && !Virucide.pause && !clickedAgain && !Virucide.loose && !Virucide.win) ... | 7 |
private void toggleSpareElement(boolean direction) {
final String SPARE_FILE = baseTestNoteRepository + SPARE_TESTFILE_UUID;
File spareFile = new File(SPARE_FILE + ".spare");
File jsonFile = new File(SPARE_FILE + ".json");
if (direction == SPARE2JSON) {
assertTrue(spareFile.... | 1 |
@Override
public char getIndicator() {
final int len = source.length();
char ind = (len > 0) ? source.charAt(0) : ' ';
switch (ind) {
case '*':
case '/':
case '$': break;
case 'D': // Debugging line is marked by a 'D'/'d' followed
... | 8 |
public final synchronized void disconnect() {
this.quitServer();
} | 0 |
public void inactivaItem(PosListaPrecio itemOracle,
int idPos){
// PREGUNTO SI EL ID DEL ITEM VIENE EN NULO
if (itemOracle.getPcaIdElemento() != null) {
//TRAIGO EL ITEM POS SEGUN EL PCIDELEMENTO DE ORACLE
PhpposItemsEntity itemPos = getItemPos(itemOr... | 5 |
private int isNextSequenceCard(Card prev_card, Card this_card, int jokers_inbetween)
{
int ret = -1;
if ((prev_card == null) || (this_card == null))
return ret;
if (prev_card.getSuite().compareTo(this_card.getSuite()) != 0)
return ret;
int pval = Rummy.this.cardValue(prev_card, false);
int tva... | 8 |
public StatusModel(String ipaddress) {
ip = ipaddress;
try {
a = (Inet4Address) InetAddress.getByName(ip);
} catch (UnknownHostException e) {
}
} | 1 |
public static void testValidity(Object o) throws JSONException {
if (o != null) {
if (o instanceof Double) {
if (((Double)o).isInfinite() || ((Double)o).isNaN()) {
throw new JSONException(
"JSON does not allow non-finite numbers.");
... | 7 |
public void Checkwhile(String cond){
if(new_flag==2){
current_register--;
}
new_flag=0;
current_label++;
TypeTable.put(current_register,current_element.E_type);
if(cond.equals("TRUE")){
AddOperation("STOR... | 9 |
*
* @throws IOException if a communications error occurs
* @throws UnknownHostException if the Cyc server cannot be found
* @throws CycApiException if the Cyc server returns an error
*/
public CycList getApplicableBinaryPredicates(CycList kbSubsetCollections)
throws UnknownHostException, IOExcep... | 1 |
public int comparer(NextTickListEntry var1) {
return this.scheduledTime < var1.scheduledTime?-1:(this.scheduledTime > var1.scheduledTime?1:(this.tickEntryID < var1.tickEntryID?-1:(this.tickEntryID > var1.tickEntryID?1:0)));
} | 4 |
@Override
public boolean tableExists(String table) {
ResultSet res = null;
table = table.replace("#__", prefix);
try {
DatabaseMetaData data = this.con.getMetaData();
res = data.getTables(null, null, table, null);
return res.next();
} catch (SQLException e) {
if (this.dbg) {
e.printStackTra... | 5 |
public void removeTime(Node v, int t) {
ArrayList<Edge> toRemove = new ArrayList<Edge>();
for (Edge edge : adj){
Schedule s = edge.getSchedule();
if (edge.getV() == v)
s.remove(t, t+1);
else
s.remove(t-1,t+2);
if (s.isEmpty())
toRemove.add(edge);
Edge inv = edge.getInv();
if (inv ... | 6 |
public static ParticleEffect fromName(String name) {
for (Entry<String, ParticleEffect> entry : NAME_MAP.entrySet()) {
if (!entry.getKey().equalsIgnoreCase(name)) {
continue;
}
return entry.getValue();
}
return null;
} | 2 |
@EventHandler
public void handleBlockPlacements(BlockPlaceEvent event) {
Player player = event.getPlayer();
User user = EdgeCoreAPI.userAPI().getUser(player.getName());
if (user != null) {
Cuboid cuboid = Cuboid.getCuboid(player.getLocation());
if (cuboid == null) {
if (!WorldManager... | 8 |
public void adicionarAula(Aula aula) {
if(aula == null){
throw new IllegalStateException("Aula inválida.");
}
if(grade.contains(aula)){
throw new IllegalStateException("Professor já contem esta aula em sua grade");
}
grade.add(aula);
... | 2 |
@Override
public void fill(Parameter parameter, Type type, Annotation[] annotations)
{
for (Annotation annotation : annotations)
{
if (annotation instanceof Default)
{
Class value = ((Default)annotation).value();
if (value == DefaultValue.c... | 3 |
public static String[] removeEmptyStrings(String[] data)
{
ArrayList<String> result = new ArrayList<String>();
for (int i = 0; i < data.length; i++)
{
if (!data[i].equals(""))
{
result.add(data[i]);
}
}
String[] res = new ... | 2 |
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 static boolean isAlNum(int c) {
return isAlpha(c) || isDigit(c);
} | 1 |
public void play()
{
finishedExecuting = false;
Thread t = new Thread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
result = engine.setUpGame();
finishedExecuting = true;
}
});
t.start();
try {
t.join(3600000);
if(finishedExecuting = false)
... | 4 |
public boolean add(List<String> args) throws InvalidTableRowException {
if (args.size() != columnNames.size()) {
throw new InvalidTableRowException("args massive size doesn't map table column size");
}
String key = args.get(0);
Row row = new Row(args);
rows.put(key,... | 1 |
@SuppressWarnings("unchecked")
private void fridayCheckActionPerformed(java.awt.event.ActionEvent evt) {
if(this.dayChecks[5].isSelected()) {
this.numSelected++;
if(this.firstSelection) {
stretch();
}
thi... | 4 |
public String toString() {
StringBuilder sb = new StringBuilder();
List<String> ruleStrings = new ArrayList<String>();
for (String parent : binaryRulesByParent.keySet()) {
for (BinaryRule binaryRule : getBinaryRulesByParent(parent)) {
ruleStrings.add(binaryRule.toString());
}... | 5 |
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
if(this.SceneManager.getMapBuffer() != null)
{
// declare the selected scene
Scene SelectedScene = this.SceneManager.getCurrentScene();
// create the game image and get the gr... | 9 |
public FileNameTooLongException(Exception ex, String name)
{
super(ex, name);
} | 0 |
public HistoricoResponse validaIngresoParametros(CriterioRequest criterio) {
HistoricoResponse historicoResponse = new HistoricoResponse();
if (criterio.getAgencia().equalsIgnoreCase("") && criterio.getCanal().equalsIgnoreCase("") && criterio.getCodigoVendedor() == 0
&& criterio.getEsta... | 6 |
@Override
public boolean visitTree(VisitContext context,
VisitCallback callback) {
// First check to see whether we are visitable. If not
// short-circuit out of this subtree, though allow the
// visit to proceed through to other subtrees.
if (!isVisit... | 9 |
public void save()
{
if (isConfirmPassword())
{
user.setPassword(DigestUtils.md5Hex(getPassword()));
IndexedEntityService.save(getUser());
goToLogin();
}
} | 1 |
@Override
public void mouseExited( MouseEvent e ) {
for( MouseListener listener : listeners( MouseListener.class )){
listener.mouseExited( e );
}
} | 1 |
private static boolean interpretLine(DatabaseUtil databaseUtil, String line) {
boolean result;
String command;
List<?> objects;
int affected;
result = false;
try {
command = StringUtils.substringBefore(line, " ");
switch (command) {
case "quit":
result = true;
break;
... | 9 |
public static boolean isValid(List<TableEntity> tables) {
if (tables == null || tables.size() == 0) {
logger.error("input table information is empty");
return false;
}
for (TableEntity table : tables) {
if (!(Argument.isDeleteAction() && table.isOfCheckSheet()... | 9 |
@Test(expected = DAIllegalArgumentException.class)
public void testInfixToPostfix14() throws DAIllegalArgumentException,
DAIndexOutOfBoundsException, ShouldNotBeHereException,
BadNextValueException, UnmatchingParenthesisException {
try {
infix.addLast("/");
infix.addLast("0");
QueueInterface<String> p... | 5 |
@Override
public String skip_spaces(String str){
String[] split = str.split(" ");
if(split.length > 0){
String output = split[0];
for(int index = 1; index < split.length; index++){
if(split[index].length() > 0) output += " " + split[index];
}
return output;
}
else return "";
} | 3 |
@Override
public String solve(Cube cube){
String movements = "";
for (int f = 1; f < 6; f = f == 2 ? f + 2 : f + 1) {
TileColor c1 = TileColor.get(f);
if (c1.getInt() != 0 && c1.getInt() != 3) {
TileColor c2 = c1.getInt() == 2 ? TileColor.get(4) : c1.getInt() == 5 ? TileColor.get(1) : TileColor.get(c1.ge... | 6 |
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.