text stringlengths 14 410k | label int32 0 9 |
|---|---|
public int findIndexLetter(char ch)
{
if(Character.toLowerCase(ch)=='a') {return 0;}
if(Character.toLowerCase(ch)=='b') {return 1;}
if(Character.toLowerCase(ch)=='c') {return 2;}
if(Character.toLowerCase(ch)=='d') {return 3;}
if(Character.toLowerCase(ch)=='e') {return 4;}
if(Character.toLowe... | 8 |
public static void setQtCaddie (String idr, char signe) throws BDException {
String requete = null;
if (signe != 'd')
requete = "update lecaddie set qt = (select qt from lecaddie where idr="+idr+")"+signe+"1 where idr="+idr;
else
requete = "delete from lecaddie where idr="+idr;
Statement stmt = null;
C... | 3 |
public int GetRecentBus()
{
return recentBus;
} | 0 |
public void tick() {
int xa = 0;
int ya = 0;
if (input.isMovingWithKey) {
if (input.up) ya--;
if (input.down) ya++;
if (input.left) xa--;
if (input.right) xa++;
} else {
xa = input.mouseX;
ya = input.mouseY;
}
if (xa != 0 || ya != 0) {
move(xa, ya);
}
} | 7 |
@Override
public int getYearsExperience() {
return super.getYearsExperience();
} | 0 |
public void run() {
timeUntilStart = 120;
while (Status.isStatus(Status.IN_LOBBY)) {
for (; timeUntilStart >= 0; timeUntilStart--) {
if (timeUntilStart == 0) {
// Hier begint de game
break;
}// Dit zorgt ervoor dat er om... | 6 |
@Override
public void addCategory(Category category) {
PreparedStatement pStmt = null;
try {
pStmt = conn.prepareStatement("INSERT INTO CATEGORY (description) VALUES (?);");
pStmt.setString(1, category.getDescription());
pStmt.executeUpdate();
} catch (SQLException e) {
e.printStack... | 1 |
private void key(byte key[]) {
int i;
int koffp[] = { 0 };
int lr[] = { 0, 0 };
int plen = P.length, slen = S.length;
for (i = 0; i < plen; i++)
P[i] = P[i] ^ streamtoword(key, koffp);
for (i = 0; i < plen; i += 2) {
encipher(lr, 0);
P[i] = lr[0];
P[i + 1] = lr[1];
}
for (i = 0; i < slen;... | 3 |
@BeforeTest
@Test(groups = { "BST", "Insertion" })
public void testBSTInsertion() throws DuplicateKeyException {
Integer count = 0;
Reporter.log("[ ** BST Insertion ** ]\n");
try {
timeKeeper = System.currentTimeMillis();
for (int i = 0; i < seed; i++) {
bTree.put(randomArray[i], randomCharArray[i]);... | 5 |
public List<String> getQueryNames() {
List<String> names = new ArrayList<String>();
try {
NodeList nodes = Utilities.selectNodes(this.doc, "/c:settings/c:queries/c:query", this.namespaces);
if(nodes != null) {
for(int i = 0; i < nodes.getLength(); ++i) {
Node node = nodes.item(i);
Attr attr =... | 3 |
@EventHandler
public void ZombiePoison(EntityDamageByEntityEvent event) {
Entity e = event.getEntity();
Entity damager = event.getDamager();
String world = e.getWorld().getName();
boolean dodged = false;
Random random = new Random();
double randomChance = plugin.getZombieConfig().getDouble("Zombie.Poison.D... | 6 |
public static void testOrchestrator(int maxIterations) {
int climateControlErrorCounter = 0;
int climateControlEventCounter = 0;
int dailyWakeupErrorCounter = 0;
int dailyWakeupEventCounter = 0;
int luminanceManagementErrorCounter = 0;
int luminanceManagementEventCounter = 0;
for (int i=0; i<m... | 9 |
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
TypeRef other = (TypeRef) obj;
if (isList != other.isList) {
return false;
}
if (isMap ... | 8 |
private void checkExpiryTime() {
double referenceTime = Double.MAX_VALUE;
LinkedList<ScheduleItem> removedRes = new LinkedList<ScheduleItem>();
Iterator<ServerReservation> iterRes = reservTable.values().iterator();
while(iterRes.hasNext()) {
ServerReservation sRes = iterRes.next... | 4 |
public static boolean truePropositionsIteratorDnextP(TruePropositionsIterator self) {
{ Iterator cursor = self.propositionCursor;
Proposition proposition = null;
if (cursor == null) {
return (false);
}
loop000 : for (;;) {
if (cursor.nextP()) {
proposition = ((Prop... | 8 |
@Override
public boolean onKeyDown(int key) {
if(super.onKeyDown(key)) {
return true;
}
if(key == Keyboard.KEY_TAB) {
Application.get().getHumanView().addScreen(ConsoleFactory.create());
return true;
}
else if(key == Keyboard.KEY_E... | 3 |
@Override
public JobTrackerACK heartBeat(TaskTrackerReport report) {
report.printReport();
JobTrackerACK rst = new JobTrackerACK(null, null);
rst.newAddedTasks = new ArrayList<Task>();
rst.rcvTasks = new ArrayList<TaskStatus>();
while (this.taskList.size() > 0) {
synchronized (this.taskList) {
... | 8 |
public void changeState(int option){
switch(option){
case 0:
this.isOkay = true;
break;
case 1:
this.isInjured = true;
this.isOkay = false;
break;
case 2:
this.isInjured =false;
this.isDead = true;
break;
}
} | 3 |
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String submitButton = (String) request.getParameter("submit_btn");
int adminUserID = Integer.parseInt(request.getParameter("admin_userid"));
int targetUserID = Integer.parseInt(request.getParamet... | 8 |
private int readString(boolean verbatim) {
read();
prepareString();
do {
// check escapes
switch (_val) {
case (char) -1:
throw new ScoreException("Unfinished string");
case '\n':
case '\r':
if (!verbatim)
throw new ScoreException("Cannot have a line break in a single-line string... | 6 |
public void cadastrar(Consulta consulta) throws Exception{
if(consulta.getCodMedico() == null){
throw new Exception("Medico não foi selecionado !");
}
if(consulta.getCodPaciente() == null){
throw new Exception("Paciente não foi selecionado !");
}
if(consu... | 5 |
private Solution recursiveDLS(Node node, int limit) {
closed.add(node.getState());
boolean cutoffOccured = false;
if (goalTest(node.getState())) return new Solution(node);
if (node.getDepth() == limit) return new Cutoff();
for (Node child: node.expand())
if (!closed.contains(child.getState())) {
Soluti... | 7 |
public InetAddress getInetAddress() {
return addr;
} | 0 |
@SuppressWarnings("unchecked")
private void updateShadow(Point2D mousePosition) {
if (mousePosition == null) {
getCanvas().setShadow(null);
return;
}
Board board = getBoard();
if (board.isGameOver()) {
return;
}
List<Move> moves = new LinkedList<Move>();
// Are we trying to jump?
int x = (... | 8 |
public static ArrayList<MeetingRoom> searchRoomByName(String name) {
try {
if(conn == null || conn.isClosed()){
conn = DatabaseConnection.getConnection();
}
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
ArrayList<MeetingR... | 5 |
public static void main(String[] args) throws InterruptedException {
if (args.length != 4) {
exitWithError();
}
String dataStructure = args[0];
int nrThreads = Integer.parseInt(args[1]);
if (nrThreads < 1) {
exitWithError();
}
int nrItems = Integer.parseInt(args[2]);
if (nrItems < 1) {
exitWi... | 5 |
public void run() {
try {
while (true) {
TimeUnit.MILLISECONDS.sleep(100);
System.out.println(Thread.currentThread() + " " + this);
}
} catch (InterruptedException e) {
System.out.println("sleep() interrupted");
}
} | 2 |
private boolean handleTraverseHandle(KeyEvent e) {
EditPart focus = getCurrentViewer().getFocusEditPart();
if (focus.getSelected() == EditPart.SELECTED_NONE)
return false;
getCurrentViewer().reveal(focus);
AccessibleHandleProvider provider;
provider = (AccessibleHandleProvider) focus
.getAdapter(Acces... | 8 |
private void buildMapActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buildMapActionPerformed
int x,y;
try{
x = Integer.valueOf(this.xField.getText());
y = Integer.valueOf(this.yField.getText());
} catch (Exception e){
this.warningsLabel.setText("Must enter... | 5 |
public static Cons cppGetConstructorDefinitions(Stella_Class renamed_Class) {
{ Cons constructordefs = Stella.NIL;
{ Slot slot = null;
Iterator iter000 = renamed_Class.classSlots();
Cons collect000 = null;
while (iter000.nextP()) {
slot = ((Slot)(iter000.value));
... | 7 |
public void checkStock(){
if (this.stock<this.minS){
this.inOrderCost(hitungOrderCost(this.maxS-this.stock));
this.reCountCost();
this.stock=this.maxS;
}
} | 1 |
public <T> int updateDB(String query, ArrayList<T> sqlParam){
PreparedStatement ps = null;
int rs = 0;
try{
ps = conn.prepareStatement(query);
int i = 1;
for (T a : sqlParam){
//System.out.println(a.getClass());
if (a.getClass() == String.class){
ps.setString(i, (String)a);
//System.ou... | 7 |
private String readResource(String filename) {
StringBuilder builder = new StringBuilder();
try {
FileInputStream stream = new FileInputStream(new File(resPath + filename));
try {
Reader reader = new BufferedReader(new InputStreamReader(stream));
char[] buffer = new char[8192];
int read;
whi... | 2 |
public boolean isInReferrerString(String referrerString) {
for (String alias : aliases) {
if (referrerString.toLowerCase().indexOf(alias.toLowerCase()) != -1)
return true;
}
return false;
} | 2 |
public boolean stem() {
int v_1;
int v_2;
int v_3;
int v_4;
// (, line 133
// do, line 134
v_1 = cursor;
lab0: do {
// call prelude, line 134
if... | 8 |
void setPreferences(Preferences pref) {
cacheCheckBox.setSelected(ConnectionManager.sharedInstance().isCachingAllowed());
dayField.setValue(HistoryManager.sharedInstance().getDays());
if (pref == null)
return;
connectTimeoutField.setValue(pref.getInt("Connect Timeout", 5));
readTimeoutField.setValue(pre... | 7 |
public Field getField()
{
return field;
} | 0 |
private int getNameIDFromUser(String prompt){
while(true){
try {
String Name = getUserInput(prompt);
if (Name.equals("NONE")) return 0;
return RunFileGame.getPlayerIDFromName(Name);
} catch (WrongNameException e) {
System.out.println("FUCK OFF THATS NOT A NAME");
}
}
} | 3 |
public void send(Object data)
{
if(!connection.isConnected())
return;
connection.sendTCP(data);
} | 1 |
private void jj_rescan_token() {
jj_rescan = true;
for (int i = 0; i < 3; i++) {
try {
JJCalls p = jj_2_rtns[i];
do {
if (p.gen > jj_gen) {
jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
switch (i) {
case 0: jj_3_1(); break;
case 1: jj_3_2()... | 7 |
private void applyVocation(Background v, Actor actor) {
///I.say("Applying vocation: "+v) ;
for (Skill s : v.baseSkills.keySet()) {
final int level = v.baseSkills.get(s) ;
actor.traits.raiseLevel(s, level + (Rand.num() * 5)) ;
}
for (Trait t : v.traitChances.keySet()) {
float... | 4 |
@Override
protected void setPanelPerson(Contestant c, boolean newContestant) {
super.setPanelPerson(c, newContestant);
btnSetStatus.setEnabled(GameData.getCurrentGame().isSeasonStarted());
if (newContestant || c == null) {
// we don't want any rows selected
ListSelectionModel m = table.getSelectionMod... | 2 |
public boolean containsValue( Object val ) {
byte[] states = _states;
V[] vals = _values;
// special case null values so that we don't have to
// perform null checks before every call to equals()
if ( null == val ) {
for ( int i = vals.length; i-- > 0; ) {
... | 8 |
@SuppressWarnings("unused")
@Override
/** When you click on a specific button it goes to a specific tutorial
* @param arg0 the action event which triggers actionPerformed and contains the information
*/
public void actionPerformed(ActionEvent arg0)
{
String id = "";
if (arg0.getSource() == rules)
{
id... | 7 |
public void getWarden() {
r = random.nextInt(y);
warden = derp.get(r);
locwar = new Location(warden.getPlayer().getWorld(), -140, 69, -110);
cell1 = new Location(warden.getPlayer().getWorld(), -114, 68, -109);
cell2 = new Location(warden.getPlayer().getWorld(), -116, 68, -109);
Bukkit.broadcastMessage(Cha... | 8 |
public String getEvento()
{
return tipoEvento.getText();
} | 0 |
private void modifySuperclass(CtClass orgclass)
throws CannotCompileException, NotFoundException
{
CtClass superclazz;
for (;; orgclass = superclazz) {
superclazz = orgclass.getSuperclass();
if (superclazz == null)
break;
try {
... | 3 |
private void validate() throws RrdException {
if(!isValidConsolFun(consolFun)) {
throw new RrdException("Invalid consolidation function specified: " + consolFun);
}
if(Double.isNaN(xff) || xff < 0.0 || xff >= 1.0) {
throw new RrdException("Invalid xff, must be >= 0 and < 1: " + xff);
}
if(steps <= 0 || ... | 6 |
public final double grad(int par1, double par2, double par4, double par6)
{
int var8 = par1 & 15;
double var9 = var8 < 8 ? par2 : par4;
double var11 = var8 < 4 ? par4 : (var8 != 12 && var8 != 14 ? par6 : par2);
return ((var8 & 1) == 0 ? var9 : -var9) + ((var8 & 2) == 0 ? var11 : -var... | 6 |
public void deletarLista(List<T> ts) throws org.hibernate.exception.ConstraintViolationException, ValidacaoException {
try {
transacao = session.beginTransaction();
session.clear();
session.flush();
for (T t : ts) {
session.delete(t);
}... | 3 |
public List<HipchatUser> getStandupUsers()
{
List<HipchatUser> remaining_users = new ArrayList<HipchatUser>();
List<String> user_names = current_room.getConnectedUsers();
List<HipchatUser> users = new ArrayList<HipchatUser>();
for ( String user_name : user_names )
{
HipchatUser user = hippy_bot.findUser(u... | 7 |
public void visitInitStmt(final InitStmt stmt) {
print("INIT");
final LocalExpr[] t = stmt.targets();
if (t != null) {
for (int i = 0; i < t.length; i++) {
if (t[i] != null) {
print(" ");
t[i].visit(this);
}
}
}
println();
} | 3 |
public void DeleteVulnerabilityFiles(DatabaseAccess JavaDBAccess, String TargetPHPFileSelectedComboBox) {
int TARGET_PHP_FILES_ID = 0;
PreparedStatement ps = null;
Connection conn = null;
try {
if ((conn = JavaDBAccess.setConn()) != null) {
System.out.printl... | 6 |
@Override
public void actionPerformed(ActionEvent e) {
//System.out.println("PasteAction");
OutlinerCellRendererImpl textArea = null;
boolean isIconFocused = true;
Component c = (Component) e.getSource();
if (c instanceof OutlineButton) {
textArea = ((OutlineButton) c).renderer;
} else if (c instanc... | 6 |
int insertKeyRehash(float val, int index, int hash, byte state) {
// compute the double hash
final int length = _set.length;
int probe = 1 + (hash % (length - 2));
final int loopIndex = index;
int firstRemoved = -1;
/**
* Look ... | 9 |
@Override
public void actionPerformed(ActionEvent e) {
importOutlinerDocument(getProtocol());
} | 0 |
public static ArrayList<ChatPlayer> getPlayersListeningToChannel(String channel) {
ArrayList<ChatPlayer> plays = new ArrayList<ChatPlayer>();
for (ChatPlayer play : players) {
boolean forced = Bukkit.getPlayer(play.name) != null && MCNSAChat3.permissions.has(Bukkit.getPlayer(play.name), "mcnsachat3.forcelisten."... | 5 |
public synchronized void terminate() {
enabled = false;
active = false;
} | 0 |
protected AttrTypes testsPerClassType(int classType, EstTypes estTypes) {
// in none of the estimators yet is the estimation depending on the class type
// since this could change the basic structure taken from checkclassifiers is kept here
// test A: simple test - if can estimate
AttrTypes at... | 7 |
public static Vector3f parseDirection(String data) {
String[] lines = data.split("\n");
for (String line : lines) {
String[] parts = line.split(":", 2);
if (parts[0].equals("d")) {
return ParseVector3f(parts[1]);
}
}
return null;
} | 2 |
@Override
public void stopService() {
try {
deregisterFromServer();
} catch (ConnectionException ex) {
LOG.warning("Server could not be reached for deregistration.");
}
disconnectFromServer();
try {
if (serverSocket != null) {
... | 5 |
public void doPost (HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
String name = req.getParameter("name");
User user;
try {
// First try to find if the user exists
user = UserDAO.find(name);
if (user != null) {
HttpSession session = req.getSession(true); ... | 2 |
public String [] getDestTermid() {
return DestTermid;
} | 0 |
public ArrayList<ClientContact> getClientContacts() {
return mClientContacts;
} | 0 |
@Test
public void testGetDictionary() {
assertTrue(_dictionary.getDictionary().size() > 0);
} | 0 |
public void deleteByPerformer(String sPerformer, Long epochTime) {
EntityManager em = PersistenceManager.createEntityManager();
try {
em.getTransaction().begin();
List<Openchatroomsmessage> ochrms = em.createNamedQuery("Openchatroomsmessage.GetByUserAndTime", Openchatroomsmessage.class)
.setParameter... | 2 |
@Override
public boolean writeOperation(SocketChannel s, ByteBuffer buffer) throws IOException {
buffer.clear();
Main.state = ServerState.SYNCHRONIZING;
if(ido != null){
buffer.put(HexConverter.toByte(Main.ID));
buffer.putInt(514);
buffer.put(HexConverter.... | 9 |
public static boolean inModalState() {
for (Window window : Window.getWindows()) {
if (window instanceof Dialog) {
Dialog dialog = (Dialog) window;
if (dialog.isShowing()) {
ModalityType type = dialog.getModalityType();
if (type == ModalityType.APPLICATION_MODAL || type == ModalityType.TOOLKIT_MO... | 5 |
private void executeAction(String action){
switch(action.toLowerCase()){
case "turnleft":
turnLeft();
break;
case "turnright":
turnRight();
break;
case "moveforward":
moveForward();
... | 6 |
public void run() {
threadStarted();
while (!isInterrupted()) {
Runnable task = null;
try {
task = getTask();
}
catch (InterruptedException ex) { }
if (task == null) {
brea... | 4 |
public void setAltitude(double altitude)
{
this.altitude = altitude;
} | 0 |
public void setWindowTitle() {
int s = this.playersTurn.time;
String time = String.format("%02d:%02d:%02d", s/3600, (s%3600)/60, (s%60));
this.window.setTitle(this.isActive ? "Chess: " + this.playersTurn.getName() + "'s turn (" + time + ")" : "Game ended");
} | 1 |
public static void main(String[] args)
{
if (args.length > 0)
{
if (args[0].equals("read"))
{
try{
map = MMStore.readMap(mapFile);
//System.out.println("Read in map of size: " + map.totalSize());
System.out.println("Read in map of size: " + map.size());
Iterator iter = map.keySet().it... | 9 |
@Override
public String getDescription(Hero hero) {
long duration = (Integer) SkillConfigManager.getSetting(hero.getHeroClass(), this, Setting.DURATION.node(), 60000);
boolean cancels = (boolean) SkillConfigManager.getSetting(hero.getHeroClass(), this, "AttackCancels", true);
String base = Stri... | 7 |
@Override
public void updateAudioObject(int objectId, double volume, double pitch,
boolean shouldLoop) {
if (objectId == 0) {
return;
}
AudioObject object = objects.get(objectId);
object.volume = volume;
object.pitch = pitch;
object.loop = shouldLoop;
} | 1 |
public static ArrayList<String> load(String filename)
{
Scanner file_scanner = null;
ArrayList<String> stringArray = new ArrayList<String>();
try {
file_scanner = new Scanner(new File(filename)); //Connection to the file using the Scanner object
} catch (FileNotFoundExc... | 2 |
public static void main(String args[]) {
FopsDB db = new FopsDB();
Gson gson = db.getGson();
GsonBuilder builder = new GsonBuilder();
List<Rule> rules = new ArrayList<Rule>();
List<Staff> faculty = new ArrayList<Staff>();
/* Construct Rules */
status("Constructin... | 8 |
public static void copyFolder(File src, File dest)
{
try
{
if(src.isDirectory())
{
if(!dest.exists())
{
dest.mkdir();
System.out.println("Directory copied from " + src + " to " + dest);
}
String files[] = src.list();
for(String file : files)
{
File srcFile = new Fi... | 6 |
private static void loadOptions() {
File inputFile = new File("haven.conf");
if (!inputFile.exists()) {
return;
}
try {
options.load(new FileInputStream("haven.conf"));
} catch (IOException e) {
System.out.println(e);
}
String h... | 7 |
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof CategoryLineAnnotation)) {
return false;
}
CategoryLineAnnotation that = (CategoryLineAnnotation) obj;
if (!this.category1.equals(that.getCategory1())) {
... | 8 |
public static void main(String[] args) throws Exception {
String env = null;
if (args != null && args.length > 0) {
env = args[0];
}
if (! "dev".equals(env))
if (! "prod".equals(env)) {
System.out.println("Usage: $0 (dev|prod)\n");
... | 8 |
public void setKey(String key) {
byte[] keybyte = key.getBytes();
if (keybyte == null) {
throw new RuntimeException("No key");
} else if (keybyte.length < 16) {
throw new RuntimeException("Key too short");
}
// Change bytes for ints
IntBuffer intBuf = ByteBuffer.wrap(keybyte).order(ByteOrder.BIG_ENDI... | 3 |
public PageInfo parse_stream_page(RandomAccessFile s, long offset) throws IOException {
long[] result = new long[3]; // [header_size, payload_size]
byte[] p_header = new byte[OGG_PAGE_SIZE]; // buffer for the page header
byte[] scratch;
int bread = 0; // number o... | 7 |
private Command TestSteps2() {
// TODO Auto-generated method stub
getDriver().get("http://www.google.com/webhp?complete=1&hl=en");
return null;
} | 0 |
private Boolean checkForCommas (File dataFile) {
m_delimiter="";
try {
m_fileScan = new Scanner(dataFile);
} catch (FileNotFoundException e) {
return false;
}
m_fileScan.useDelimiter(m_delimiter);
while(m_fileScan.hasNext()){
... | 3 |
protected void processEndSimulation()
{
resList_.clear();
arList_.clear();
if (regionalList_ != null) {
regionalList_.clear();
}
if (globalResList_ != null) {
globalResList_.clear();
}
if (globalResARList_ != null) {
glob... | 5 |
public int largestRectangleArea(int[] height) {
if (height.length == 0)
return 0;
int maxArea = height[0];
Stack<Integer> stack = new Stack<Integer>();
int[] h = Arrays.copyOf(height, height.length + 1);
int i = 0;
while (i < h.length) {
if (stack.isEmpty() || h[i] >= h[stack.peek()]) {
stack.pus... | 5 |
public double getDiffuseLayerCapPerSquareMetre(){
if(this.psi0set && this.sigmaSet){
return this.diffCap;
}
else{
if(this.sigmaSet){
this.getSurfacePotential();
return this.diffCap;
}
else{
if(this.ps... | 4 |
@Override
public void setVisible(boolean visibility) {
super.setVisible(visibility);
button.setVisible(visibility);
lineNumber.setVisible(visibility);
if (pShowIndicators) {
iComment.setVisible(visibility);
iEditable.setVisible(visibility);
iMoveable.setVisible(visibility);
} else {
iComment.setV... | 1 |
public boolean doTransformations() {
StructuredBlock last = flowBlock.lastModified;
return CreateCheckNull.transformJikes(this, last)
|| CreateClassField.transform(this, last);
} | 1 |
private static void parseFrameworkConfig(Element framework) {
List<?> children = framework.getChildren();
Iterator<?> iterator = children.iterator();
while(iterator.hasNext()){
Element child = (Element)iterator.next();
String fieldName = child.getName();
// test whether this child has attributes
... | 5 |
int skipTo(int target) throws IOException {
if (!haveSkipped) {
// first time, load skip levels
loadSkipLevels();
haveSkipped = true;
}
// walk up the levels until highest level is found that has a skip
// for this target
int level = 0;
while (level < numberOfSkipLevels - 1 ... | 8 |
private Set<String> extractFillColors(Document document) throws XPathExpressionException {
Set<String> colors = new HashSet<String>();
Element root = document.getDocumentElement();
XPathExpression xPathExpression = xml.compileXPath("descendant::*[@fill]/@fill");
NodeList nodeList = (Nod... | 1 |
public Grille setBooleans(boolean[][] grid) {
this.grid = grid;
return this;
} | 0 |
protected void btnCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelarActionPerformed
if(JOptionPane.showConfirmDialog(rootPane, "Você tem certeza que deseja cancelar?")== 0){
this.dispose();
}
}//GEN-LAST:event_btnCancelarActionPerformed | 1 |
public static Skolem insertElementComputation(Skolem list, IntegerWrapper narg, Stella_Object element) {
if (!(Logic.enumeratedListP(list))) {
return (null);
}
{ int n = narg.wrapperValue;
Vector elements = list.definingProposition.arguments;
int nelements = elements.length() - 1;
Li... | 8 |
public Object nextValue() throws JSONException {
char c = nextClean();
String s;
switch (c) {
case '"':
case '\'':
return nextString(c);
case '{':
back();
return new JSONObject(this);
case '[':
... | 8 |
public void run()
{
while(running)
{
while(Log.hasNewEntry())
{
textArea.append(Log.getNextEntry() + "\n");
}
try {
sleep(10);
} catch (InterruptedException e) {
yield();
}
}
} | 3 |
public void onDraw(Graphics g, int viewX, int viewY)
{
if ((status&World.ST_INVISIBLE)!=0)
{
return;
}
int offs = x % 8;
if (!done)
{
//x+=move;
g.drawArc(((x-2)-viewX)*3, ((y-10)-viewY)*3, 4, 4, 0, 360);
g.drawLine(((x... | 7 |
public static void send(Socket socket, Vector<String> vector){
System.out.println("Sending " + vector.size() + " files");
try {
PrintWriter server = new PrintWriter(socket.getOutputStream());
// Tell them how many files
server.println(vector.size());
for(S... | 7 |
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.