text stringlengths 14 410k | label int32 0 9 |
|---|---|
public void run() {
lastLoopTime = System.currentTimeMillis();
while(true)
{
try { Thread.sleep(10); } catch (Exception e) {}
if(!game.isPaused()){
update();
lastLoopTime = System.currentTimeMillis();
}
}
} | 3 |
ParsedStatement(List<ScriptSegment> pSegmentList){
mSegmentList = pSegmentList;
//Check statement delimiter is only at the end of the list, if at all
int i = 0;
for(ScriptSegment lSegment : mSegmentList){
if(lSegment instanceof StatementDelimiterSegment && i < pSegmentList.size()-1){
... | 3 |
public void actionPerformed( ActionEvent e ) {
Object src = e.getSource() ;
/*
* Action pour l'item 'sauver' du menu 'Fichier'.
*/
if ( src == this.win.getItemSauver() ) {
this.win.getAnnuaire().sauver() ;
}
/*
* Action pour l'item 'charger' du menu 'Fichier'.
*/
else if ( src == this.win.get... | 9 |
public int characterAt(int at) throws JSONException {
int c = get(at);
if ((c & 0x80) == 0) {
return c;
}
int character;
int c1 = get(at + 1);
if ((c1 & 0x80) == 0) {
character = ((c & 0x7F) << 7) | c1;
if (character > 0x7F) {
... | 8 |
public static boolean isRegularGrammar(List<Production> productions, Set<String> nonTerminals, Set<String> terminals) {
for (int i = 0; i < productions.size(); i++) {
Production p = productions.get(i);
if (nonTerminals.contains(p.getNonTerminal())) {
String temp[] = p.get... | 8 |
public static String addBinary(String a, String b) {
String result="";
int newBit=0;
int addBit=0;
if(a.length() < b.length()){
result=b;
b=a;
a=result;
}
result="";
for(int i=0;i<a.length();i++){
if(i<b.length()){
new... | 7 |
private void createAndManageRequest() {
if (mPeerPiecesAvailable == null) return;
Piece piece = mPieceManager.getNeededAndAvailablePiece( mPeerPiecesAvailable );
if (piece != null) { // The peer doesn't have any interesting piece.
if (!mAmIInterested) {
synchronized (mMessagesToSendQueue) {
mM... | 6 |
public static void main(String[] args){
window = new ConverterGUI();
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
window.getFrame().setVisible(true);
window.setVersion("alpha 2.0");
} catch (Exception e) {
e.printStackTrace();
}
}
});
while(true)
... | 9 |
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 aloitaHyppy() {
/**
* Testataan onko hahmon alla maata. Aloitetaan hahmon vasemmasta
* laidasta
*/
Piste p0 = new Piste(this.getX() - 12, this.getY() + 1);
if (testaaVaakarivi(p0)) {
/**
* isoHyppy mahdollistaa hypyn korkeuden säät... | 3 |
private static void updateItems(ArrayList<InventoryPackages> packagesDB){
Scanner updateItemScanner = new Scanner(System.in);
System.out.println("---------------------------------------------------------------------------------------------------------------------------------------------");
System.out.println(... | 7 |
private <T> void exchangeWithLast(T[] array, final int index) {
if (currentSize > 1) {
// Bubble
T kt = array[index];
array[index] = array[currentSize - 1];
array[currentSize - 1] = kt;
}
checkEnoughCapacity(0);
} | 1 |
public AxisState draw(Graphics2D g2, double cursor, Rectangle2D plotArea,
Rectangle2D dataArea, RectangleEdge edge,
PlotRenderingInfo plotState) {
// if the axis is not visible, don't draw it...
if (!isVisible()) {
AxisState state = new AxisState(cursor);
... | 7 |
public Action(String proto) throws Exception {
this.prototype = proto;
this.modelBuilder = new ModelBuilder(proto);
this.actionNumMap = new HashMap<String, Double>();
// We don't really need the dataset for prediction,
// just use it to get the connection between
// action and their values.
DatasetBui... | 4 |
private boolean validarFecha(int d, int m, int a){
int diasDelMes[]={31,29,31,30,31,30,31,31,30,31,30,31};
if(a<=0) {
return false;
}
if(d<=0 || d>31) {
return false;
}
if(m<=0 || m>12) {
return false;
}
if(d>di... | 9 |
public static void main(String args[]) {
if (args.length != 1 && args.length != 2
|| (args.length == 2 && !args[0].equals("-d"))) {
System.out.println(
"Incorrect usage, try: java interpreter.Interpreter [-d] <file>");
System.exit(1);
}
Str... | 5 |
public Run(){} | 0 |
public void paintComponent(Graphics g) {
//clears graph.
g.setColor(Color.gray);
g.fillRect(0,0,width,height);
//draws grid.
g.setColor(new Color(230, 230, 230));//greyish
if (restrictedRange) {
yStart = (int)(yAxisLoc-(scale*range1));
yEnd = (int)(yAxisLoc+(scale*range2));
} else {
yStart = y... | 5 |
public int getDaysInMonth()
{
return daysInMonth;
} | 0 |
public MinuetoFont(String fontName, int fontSize, boolean bold, boolean italic) {
int style;
if ( fontSize < 1 ) new MinuetoZeroNegativeException("Cannot create a font of size " + fontSize);
if ( fontName == null ) new NullPointerException();
style = 0;
this.fontSize = fontSize;
... | 5 |
private void placeAsteroids () {
//if initial large asteroid speed is 3, for round 2 is 4, and round 3 and 4 it is 5
int speed = 3;
if (asteroids < 134)
speed = 4;
if (asteroids < 99)
speed = 5;
Participant a = new Asteroid(0, 2, EDGE_OFFSET, EDGE_OFFSET);
a.setVelocity(speed, random.nextDouble()*2... | 5 |
public void setNames(String leftName, String rightName)
{
this.leftName = leftName;
this.rightName = rightName;
notifyListeners();
} | 0 |
public boolean myWalk(final org.powerbot.script.Tile tile) {
final double currentDistance = tile.distanceTo(ctx.players.local());
if (currentDistance <= 4) {
return true;
}
if (!ctx.players.local().inMotion() || ctx.movement.distance(ctx.movement.destination(), ctx.players.local()) < Random.nextInt(2, 5)) {... | 7 |
public static void main(String[] args) throws IOException, ParseException {
int classNumber = 5; //Define the number of classes in this Naive Bayes.
int Ngram = 1; //The default value is unigram.
String featureValue = "TF"; //The way of calculating the feature value, which can also be "TFIDF", "BM25"
int norm... | 7 |
public static void callCommand(Command command, Object data) throws Exception
{
try {
command.execute(data);
} catch (Exception e) {
TakesScreenshot(getDriver(),"ABCD");
e.printStackTrace();
}
getDriver().close();
} | 1 |
private Board2048 moveBoard(Board2048 board, int x, int y, int dx, int dy) {
int origx = x, origy = y;
// Change the board values
while ((0 <= x && x <= (N - 1)) && (0 <= y && y <= (N - 1))) {
board.setBoard(elimiZero(board.getBoard(), origy, origx, dy, dx));
if (y + dy >= 0 && y + dy <= (N - 1) && x + dx >... | 9 |
public AppTest( String testName )
{
super( testName );
} | 0 |
public String getName(){
return this.name;
} | 0 |
public static void main(String[] args) throws XMLStreamException, FactoryConfigurationError, IOException {
String eadfile = args[0];
String identifier;
String attrName=null;
String attrValue=null;
if (args.length >= 2) {
if (args[1].equals(DID)) {
id... | 6 |
public BufferedImage loadBufferedImage(String image){
try {
return ImageIO.read(new File(image));
} catch (Exception e) {
e.printStackTrace();
}
return null;
} | 1 |
public File getImage() {
return image;
} | 0 |
public static void sort (Long[] array){
System.out.println("Sorting sorted[] ...");
for(int i = 0; i <array.length-1; i++)
for(int j = i+1; j<array.length; j++)
if(array[i] > array[j])
{
Long t = array[i];
array[i] = array[j];
array[j] = t;
}
} | 3 |
int open_seekable() throws JOrbisException{
Info initial_i=new Info();
Comment initial_c=new Comment();
int serialno;
long end;
int ret;
int dataoffset;
Page og=new Page();
// is this even vorbis...?
int[] foo=new int[1];
ret=fetch_headers(initial_i, initial_c, foo, null);
se... | 5 |
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Controleur other = (Controleur) obj;
if (ruleset == null) {
if (other.ruleset != null)
return false;
} else if (!ruleset.equals(other.ru... | 6 |
public ArrayList<String> getOutofStockBooks() throws Exception{
Connection connect = null;
Statement statement = null;
ResultSet resultSet = null;
ArrayList<String> outOfStockBooks = new ArrayList<String>();
try {
// First connect to the database
connect = DriverManager.getConnection("jdbc:... | 6 |
public int FantasmaY(int n){
Query q2;
Variable a = new Variable("X");
Variable b = new Variable("Y");
switch(n){
case 0:
q2 = new Query("blinky", new Term[]{a,b});
return java.lang.Integer.parseInt(q2.oneSolution().get("Y").toString());
... | 4 |
private List<List<Gate>> getSortedGates(List<Gate> gates) {
List<List<Gate>> res = new ArrayList<List<Gate>>();
GateTypes current = null;
int index = 0;
Gate trial = gates.get(0);
if (trial.isXOR()) {
current = GateTypes.XOR;
} else if (trial.isAND()) {
current = GateTypes.AND;
} else if (trial.isI... | 6 |
public static void main(String[] args)
{
if (args.length > 1)
{
try
{
int arraySize = Integer.parseInt(args[0]),
maxValue = Integer.parseInt(args[1]);
if (arraySize > 0)
{
int array[] = new int[arraySize];
fillWithRandomValues(array, maxVa... | 5 |
public static Reminder[] getRimindersByUserMail(String userMail) {
XStream xstream = new XStream(new DomDriver());
Reminder[] allReminders = new Reminder[0];
try {
File file = new File((String) Server.prop.get("reminderFilePath"));
allReminders = (Reminder[]) xstream.fromXML(file);
} catch (Exception e... | 3 |
public ArrayList<Cell> getDefaultSeatingOrder(DefaultSeatingMethod seatingMethod) {
if (this.planeDimension.getNormalSeats().length == 0) {
return this.randomisedPrioritySeats;
}
switch (seatingMethod) {
case BACK_TO_FRONT:
return this.calculateBackToFro... | 8 |
public String getBackground() {
if (styles == null) {
return null;
}
else {
return styles.get("bg");
}
} | 1 |
public void serialize(String roll, String name) {
Properties prop = new Properties();
InputStream istream = getClass().getClassLoader().getResourceAsStream("com/file/resources/searchtree.properties");
try {
prop.load(istream);
String pathLocation =prop.getProperty("path");
File file = new File(... | 3 |
public static void sendMail(Mail mail) {
if(mail.sentTo().equals("__ALL_USERS__")) {
for(String entry : dataDir.list()) {
if(entry.equals("__ALL_USERS__"))
continue;
File box = new File(dataDir, entry);
if(!box.isDirectory())
continue;
int mailIndex = getBoxSize(box);
File location... | 5 |
public void setTool(int tool) {
tp.setTool(tool);
if(tool == 0) {
pencil.setSelected(true);
} else if(tool == 1) {
fill.setSelected(true);
} else if(tool == 2) {
chooser.setSelected(true);
} else if(tool == 3) {
line.setSelected(true);
}
curTool = tool;
} | 4 |
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException, SQLException {
HttpSession sesionOk = request.getSession();
if (sesionOk.getAttribute("usuario") != null) {
response.setContentType("text/html;charset=UTF... | 3 |
public static String removeDelimiters(String string) {
int length = string.length();
if (length < 3)
throw new RuntimeException("Cannot remove delimters from " + string);
return string.substring(1, length - 1);
} | 1 |
@Override
public Success<Expression[]> parse(String s, int p) {
// Parse the '('.
if (s.charAt(p++) != '(')
return null;
p = optWS(s, p);
// Handle empty argument lists.
if (s.charAt(p) == ')')
return new Success<Expression[]>(Expression.NONE, p + 1);... | 7 |
@Override
public void animate( long timeProgress ) {
int nextX = targetBounds.x;
int nextY = targetBounds.y;
int nextWidth = targetBounds.width;
int nextHeight = targetBounds.height;
if( targetBounds.x != -1 ) {
int deltaX = targetBounds.x - initialBounds.x;
... | 8 |
String getCallbackFunctionCall(FunctionTrace ft) {
// Ensure ft is of type ASYNC_CALL
String type = getLineType(ft);
if (!type.equals("ASYNC_CALL")) {
System.out
.println("Error: Cannot get callback function call from non-ASYNC_CALL trace");
System.exit(-1);
}
// Find which index contains the vari... | 7 |
public boolean sameEnd(Temporal temporal) {
if (endTime != temporal.endTime) return false;
boolean ins = isTimeInstance();
boolean tins = temporal.isTimeInstance();
if ((ins && tins) || (!ins && !tins)) return true;
return false;
// return sameEndTime(temporal.endTime);
// return endTime == temporal.endTi... | 5 |
public static void sort(Comparable[] a)
{
// Sort a[] into increasing order.
int N = a.length;
int h = 1;
while (h < N / 3)
h = 3 * h + 1; // 1, 4, 13, 40, 121, 364, 1093, ...
// h-sort the array.
while (h >= 1)
{
// Insert a[i] among a[i-h], a[i-2*h], a[i-3*h]... .
for (int i = h; i < N; i++)
... | 5 |
public static int[] CountElmt(ArrayList<Integer> newScores1,
ArrayList<Integer> scores) {
int a[] = new int[scores.size()];
for (int i = 0; i < scores.size(); i++) {
a[i] = 0;
}
for (int i = 0; i < newScores1.size(); i++) {
int value = newScores1.get(i);
int pos = scores.indexOf(value);
a[pos]++;... | 2 |
public int addNum(int numA, int numB){
System.out.println("A: " + numA + ", B: " + numB);
if(numA > 15 || numB > 15){
System.out.println("Sorry, we can't use the numbers length longer than 4bits.");
return -1;
}
boolean[] binaryA = getBinaryFromDecimal(numA, 4);
boolean[] binaryB = getBinaryFromDec... | 6 |
@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 DatasetKeyword)) {
return false;
}
DatasetKeyword other = (DatasetKeyword) object;
if ((this.datasetKeywordPK =... | 5 |
public PageDescriptor()
{
super();
xmlName = "Page";
elementDefinition = true;
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
org.exolab.castor.mapping.FieldHandler handler = null;
org.exolab.castor.xml.FieldValidator ... | 6 |
public boolean hiddenSingle(GameGrid g){
for(GameStructures gs : g.getStructures()){
for(int i = 0; i < gs.getMembers().size(); i++){
Stack<Cell> candidateStack = new Stack<Cell>();
for(Cell c : gs.getMembers()){
if(c.getCandidates().contains(Int... | 5 |
@Override
public void doAction(Player player, Grid grid) throws InvalidActionException {
if (player.getRemainingTurns() <= 0)
throw new InvalidActionException("The player has no turns left!");
Position currentPos = player.getPosition();
Position newPos = new Position(currentPos.getxCoordinate() - 1, curren... | 2 |
protected static final int codePointAt(CharSequence seq, int index, int end) {
if (index < end) {
char c1 = seq.charAt(index++);
if (c1 < Character.MIN_HIGH_SURROGATE ||
c1 > Character.MAX_LOW_SURROGATE) {
// Fast path (first test is probably all we need t... | 6 |
void setOrder( HashMap < Integer, Integer > checkForMultipleResult )
{
ArrayList < PlayingCard > tempUsedCards = new ArrayList < PlayingCard >();
ArrayList < PlayingCard > tempUnusedCards = new ArrayList < PlayingCard >();
ArrayList < Integer > keySet = new ArrayList < Integer >();
keySet.addAll( checkForMulti... | 6 |
@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 VendaItem)) {
return false;
}
VendaItem other = (VendaItem) object;
if ((this.id == null && other.id != null) |... | 6 |
public WorldGrid(int x, int y, int width, int height) {
tiles = new ArrayList<ArrayList<GridTile>>();
heldPeople = new ArrayList<Being>();
this.x = x;
this.y = y;
this.width = width;
this.height = height;
for(int i = 0; i < width/32; i++) {
tiles.add(n... | 3 |
@Override
public void addObserver(Observer o)
{
plateau1.addObserver(o);
plateau2.addObserver(o);
} | 0 |
public boolean esColor(boolean comprobado) {
boolean hayColor = false;
for (int i = 0; i < arrayPalos.length; i++) {
if (arrayPalos[i] >= 5) {
arrayNums = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
arrayPalos = new int[]{0, 0, 0, 0};
fo... | 7 |
public static void disconect() {
if (isMultiplayer && hasStarted) {
Packet01Disconnect packet = new Packet01Disconnect(Page.getClientName());
packet.writeData(page.socketClient);
if (page.socketClient != null) page.socketClient.stopClient();
if (page.socketServer != null) page.socketServer.stopServer();
... | 4 |
@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 Vehicle)) {
return false;
}
Vehicle other = (Vehicle) object;
if ((this.id == null && other.id != null) || (thi... | 5 |
public boolean mightBeManagedBy(int firewallId) {
return firewallId == firewallId1 || firewallId == firewallId2;
} | 1 |
public Attraction[] askHeadToHead(){
Attraction[] temp = new Attraction[2];
if(tagCount < tags.size()){
currentTag = tags.get(tagCount++);
//System.out.println(currentTag);
if((hhCounter < algorithmParam.numHH) && !currentTag.equals("DONE")){
System.out.println(currentTag);
if((hhCounter < algori... | 7 |
public static String getWebRoot() {
return getClassPath().split("WEB-INF")[0];
} | 0 |
public void updateHousehold(Household hh) throws InstanceNotFoundException {
boolean found = false;
Iterator<Household> iter;
iter = households.iterator();
while (iter.hasNext() && !found) {
Household h = iter.next();
if (h.equals(hh)) {
found = true;
h.setMentored(hh.getMentored());
h.setBill... | 4 |
public void updateProduct() {
try {
Database db = dbconnect();
String query = "UPDATE product SET name = ?, "
+ "description = ? "
+ "WHERE PID = ?";
db.prepare(query);
db.bind_param(1, t... | 1 |
void stopJob() {
if (is != null)
try {
is.close();
} catch (IOException e) {
}
if (fos != null)
try {
fos.close();
} catch (IOException e) {
}
if (fis != null)
try {
fis.close();
} catch (IOException e) {
}
if (in != null)
in.close();
blockView(false... | 7 |
private Direction getNewDirectionFromPosition(Position primaryPos, Position secondaryPos) {
int dirInt = getDirectionInt();
if (rotation == Rotation.CLOCKWISE) {
dirInt++;
if (dirInt >= Direction.values().length)
dirInt = 0;
} else if (rotation == Rotation.COUNTER_CLOCKWISE) {
dirInt--;
if (d... | 4 |
@Override
public boolean equals(Object object) {
if (this == object)
return true;
if (object == null || getClass() != object.getClass())
return false;
if (!super.equals(object))
return false;
BaseTemplateTap that = (BaseTemplateTap) object;
if (parent != null ? !parent.equals(t... | 8 |
@Override
public void run() {
// TODO Auto-generated method stub
try {
while((message = reader.readLine()) != null && !message.equals(".")) {
System.out.println("Server received message: " + message);
handler.MessageReceived(message);
}
} catch (IOException e) {
// TODO Auto-generated c... | 3 |
void parseAttribute(String name) throws java.lang.Exception
{
String aname;
int type;
String value;
// Read the attribute name.
aname = readNmtoken(true).intern();
type = getAttributeDefaultValueType(name, aname);
// Parse '='
parseEq();
// ... | 4 |
public static void findCombosSort(int[] ar) {
// sort the array
Arrays.sort(ar);
// go from left to right and find pairs of numbers to the right that combine for form the sum
for(int i=0; i<ar.length; i++) {
int lowInd = i+1;
int highInd = ar.length-1;
... | 8 |
public Monster zoekMonster(int teZoekenIdmonster)
{
Monster monster = null;
try (Connection conn = DriverManager.getConnection(JDBC_URL)) {
PreparedStatement queryZoekMonster = conn.prepareStatement("SELECT FROM MONSTER WHERE IDMONSTER = ?");
queryZoekMonster.setInt(1, teZoe... | 3 |
@Override
public Group parse() {
if(!this.prepared) {
this.prepared = true;
StringBuilder sB = new StringBuilder();
sB.append("(");
Iterator<Object> elemIterator = this.elems.iterator();
while(elemIterator.hasNext()) {
Object eRaw = elemIterator.next();
if(eRaw instanceof Elem) {
... | 6 |
public Retangulo(double x, double y, double l, double a) {
super(x, y);
largura = l;
altura = a;
} | 0 |
public void move(int row, int column){
switch(row){
case 0:
RowA.move(column);
break;
case 1:
RowB.move(column);
break;
case 2:
RowC.move(column);
break;
}
} | 3 |
public static Environment getEnvironment(byte e) {
switch (e) {
case 'W':
case 'w':
return WINDOWS;
case 'L':
case 'l':
return LINUX;
case 'M':
case 'm':
case 'O':
case 'o':
return MAC;
default:
throw new IllegalArgumentException();
}
} | 8 |
@Override
public String toString(){
Node toReturnString = root;
while(!(toReturnString instanceof LeafNode)){
toReturnString = toReturnString.getChild(0);
}
if(toReturnString instanceof LeafNode){
return toReturnString.toString();
}
return "FAIL";
} | 2 |
public void add(String data, Flyweight fw) {
flies.put(data, fw);
} | 0 |
public final int compare(Object a, Object b){
if (a==null || b==null) return -1;
java.util.Date d1 = null;
java.util.Date d2 = null;
if (a instanceof java.util.Date) d1 = ((java.util.Date) a);
else if (a instanceof javaxt.utils.Date) d1 = ((javaxt.utils.Dat... | 8 |
public boolean spam() {
synchronized (this) {
if (!canUse() || !start())
return false;
final TimedCondition tc = new TimedCondition(1000) {
@Override
public boolean isDone() {
return !canUse() || BarNode.this.isDone();
}
};
do {
send();
Task.sleep(300, 400);
} while (tc.isR... | 4 |
public void setOnSaleDatetime(Date onSaleDatetime) {
this.onSaleDatetime = onSaleDatetime;
} | 0 |
public Iterable<WeightedDirectedEdge> edges()
{
List<WeightedDirectedEdge> b = new LinkedList<WeightedDirectedEdge>();
for (int v = 0; v < V; v++)
for (WeightedDirectedEdge e : adj[v])
b.add(e);
return b;
} | 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 boolean hasCommand(Command _command) {
if(this.commands.contains(_command)) {
return true;
} else {
return false;
}
} | 1 |
@Override
public void doCharacterCollision(ArrayList<Collision> collisions, StageObject stageObject)
{
/**
* @todo remove tempory fix
*/
Collision collision = collisions.get(0);
if (stageObject instanceof mario.Stages.StageMario)
{
if (hadCollision)
... | 3 |
public void affiche () {
if ( this.numero() < 10 ) {
System.out.print(' ');
}
System.out.print(numero());
System.out.print(' ');
System.out.print(status);
System.out.print(' ');
if ( estRapide ) {
System.out.print('R');
} else {
System.out.print('-');... | 3 |
public String CambiarFilas ()
{
String Impresion="";
String Impresion2="";
for (int i = 0; i < Matriz2.length; i++) {
for (int j = 0; j < Matriz2.length; j++) {
if(j==0){
Impresion+=Matriz2[i][j]+" ";
}
if(j==1){... | 4 |
public static DiagramComponent createOpenFromBoundaryCells(
final TextGrid grid,
final CellSet boundaryCells,
final int cellWidth,
final int cellHeight,
boolean allRound) {
if(boundaryCells.getType(grid) != CellSet.TYPE_OPEN) throw new IllegalArgumentException("This shape is closed and cannot be han... | 9 |
@EventHandler
public void onVehicleDamage(VehicleDamageEvent event)
{
if(plugin.boats && event.getVehicle() instanceof Boat)
{
Boat b = (Boat)event.getVehicle();
if(!MorePhysics.sinking.contains(b) && !b.isDead() && (event.getDamage() >= 2))
{
MorePhysics.sinking.add(b);
... | 5 |
public void mousePressed(MouseEvent e){
if (tipoObjeto==CONST.PUNTERO){
Figura figura ;
boolean b=false;
if (listaFigura != null){
for ( int i=0 ; i<listaFigura.size() ; i++ ) {
figura = listaFigura.get(i);
if ( figura.... | 7 |
protected void createSubbands()
{
int i;
if (mode == Header.SINGLE_CHANNEL)
for (i = 0; i < num_subbands; ++i)
subbands[i] = new SubbandLayer2(i);
else if (mode == Header.JOINT_STEREO)
{
for (i = 0; i < header.intensity_stereo_bound(); ++i)
subbands[i] = new SubbandLayer2S... | 6 |
@Override
public void setServerPort(Integer port) {
this.serverport = port;
} | 0 |
@Override
public String toString() {
return "[lineNumber=" + lineNumber + ", value=" + value + ", dataType="
+ dataType + "]";
} | 0 |
protected static String processRegister(String text) {
StringBuilder output = new StringBuilder("");
text = RegEx.removeAll(text, Patterns.REGISTER);
String[] arr = text.split("\\|");
output.append("<span class=\"linguisticRegister\">[");
for (String string : arr) {
... | 1 |
public void generateValue()
{
if(parent == null)
currentScore = 0;
else
currentScore = parent.getCurrentScore();
localScore = IntervalEvalutation.getScore(this, song);
currentScore += localScore;
} | 1 |
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.