text
stringlengths
14
410k
label
int32
0
9
@Override public boolean onCommand(CommandSender cs, Command cmnd, String string, String[] strings) { if(!cs.hasPermission("dynamicmarket.admin")) { cs.sendMessage("You do not have permissions for this command"); return true; } if(strings.length == 0) ...
9
private static String generateResolutionTitle(PrinterResolution res) { StringBuilder buffer = new StringBuilder(); int x = res.getCrossFeedResolution(ResolutionSyntax.DPI); int y = res.getFeedResolution(ResolutionSyntax.DPI); buffer.append(Integer.toString(x)); if (x != y) { buffer.append(" x "); //$NON-N...
1
@Override public final void drawGui() { if (this.tick++ >= 30) { this.tick = 0; if (!GuiScreen.gamQueue.isEmpty()) { GuiScreen.gamList.add(GuiScreen.gamQueue.get(0)); GuiScreen.gamQueue.remove(0); } if (!GuiScreen.gsmQueue.isEmpty()) { GuiScreen.gsmList.add(GuiScreen.gsmQueue.get(0)...
5
public void save() { plugin.getSave().getCustomConfig().set("lottery.jackpot", jackpotCurrent); plugin.getSave().getCustomConfig().set("lottery.drawsSinceLastWin", drawsSinceLastWin); if(range!=-1){ for (int i = 0; i < range; i++) { ArrayList<String> tmp = new ArrayList<String>(); for (String p : ti...
6
protected void fixFillingRoomUnlinkedExits(Room newRoom, Room R, boolean andSave) { boolean changed=false; for(int d=Directions.NUM_DIRECTIONS()-1;d>=0;d--) { final Exit exit=R.getRawExit(d); if((exit!=null)&&(exit.temporaryDoorLink().equalsIgnoreCase(newRoom.roomID()))) { exit.setTemporaryDoorLink(...
7
@Override public String getColumnName(int column) { switch (column) { case 0: return "Nom"; case 1: return "Prénom"; case 2: return "E-Mail"; case 3: return "Contenu"; case 4: ...
5
public Object parseClass() throws ParseException, IOException { int linenr = scanner.getLineNr(); int token = scanner.getToken(); if (token != IDENTIFIER_TOKEN) throw new ParseException(linenr, "Class name expected"); Object instance; try { Class clazz = Class.forName("jode.obfuscator.modules." + s...
6
public Tile(int x, int y, int lookid) { this.x = x; this.y = y; this.lookid = lookid; if(lookid == 0) look = Texture.gras; if(lookid == 1) look = Texture.wasser; if(lookid == 2) look = Texture.sand; if(lookid == 3) look = Texture.mauer; }
4
@Override public void update() { if (isJumping()) { //TODO this is fucking things up!!! //setY(getY() - 10); currentJumpHeight += 10; if (currentJumpHeight > maxJumpHeight) { currentJumpHeight = 0; state = State.falling; ...
4
@Override public void documentRemoved(DocumentRepositoryEvent e) {}
0
private void recursiveFindChanged(List<ClassChangeList> changedList, Node sub, ObjectStack otherStack, ClassChangeList deletedNodes) { List<Node> supers = sub.getSupers(); if (supers.size() == 0) { // no superclasses, this is the end of a chain of deleted // interfaces or superclasses ClassChangeList re...
4
private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { switch (predIndex) { case 3: return 9 >= _localctx._p; case 4: return 8 >= _localctx._p; case 5: return 5 >= _localctx._p; case 6: return 3 >= _localctx._p; case 7: return 2 >= _localctx._p; case 8: return 15 >= _localct...
9
@Override public void executeTask() { System.out.println("Server is listening"); try { receivingSocket = new DatagramSocket(LISTENING_PORT); do { // System.out.println(("Server listening...")); dataGram = new DatagramPacket(new byte[512], 512); /* Blocking receive */ receivingSocket.receive(d...
8
public void removeIndex(int i) { if (locationEnd.length > 1) { Location[] newEnd = new Location[locationEnd.length - 1]; for (int x = 0; x < i; x++) { newEnd[x] = locationEnd[x]; } for (int x = i; x < locationEnd.length - 1;...
3
private void construct() { if (orientation == HORIZONTAL) { int space = dims.width / items.size(); for (int i = 0; i < items.size(); i++) { Dimension itemDims = items.get(i).getDims(); items.get(i).setPosition(new Vector(space/2 + space*i - itemDims.width/2 + position.x,position.y + (dims.height - itemD...
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 Patient)) { return false; } Patient other = (Patient) object; if ((this.ssn == null && other.ssn != null) || (t...
5
public void handle_strarray(String[] nextLine) throws Exception{ //FORMAT: Animal_Native_ID, linger_days, onset_date, (cure_date <default to never/today>, (diagnosis_date <default to today>, (name <no default>, ( notes <no default>)))) String animal_native_id = nextLine[0].trim(); int linger_days =...
8
void initializeSortState (final Tree tree) { /* Reset to known state: 'down' on column 0. */ tree.setSortDirection (SWT.DOWN); TreeColumn [] columns = tree.getColumns(); for (int i = 0; i < columns.length; i++) { TreeColumn column = columns[i]; if (i == 0) tree.setSortColumn(column); SelectionListener ...
5
private boolean containsEnemyWool(TeamPlayer p, CTFTeam team) { Wool w = new Wool(this.GoalTeam.getColor()); //Check for wool for (ItemStack m : p.getPlayer().getInventory()) { //If item in inventory is wool if (m != null && m.getType().equals(Material.WOOL)) { System.out.println("Got...
5
public void resetP2player() { start = false; if (P2character.equals("White")) { whiteKnight.reset(900,450,false); } else if (P2character.equals("Bond")) { jamesBond.reset(900,450,false); } else if (P2character.equals("Ninja")) ...
4
private void broadcastServerInfo() { final Communicator comm = sr.getServerComm(); if (comm != null) { StringBuilder sb = new StringBuilder(); sb.append(DISCOVERY_INFO); sb.append(DELIMITER); InetAddress address = comm.getAddress(); try { ...
5
private void processGridletSubmission(Sim_event ev) { if (trace_flag) { System.out.println(super.get_name() + ": received an SUBMIT_GRIDLET event. Clock: " + GridSim.clock()); } /*********** We have to submit: - the gridlet whose id c...
8
public boolean pikkusuora(){ for(int i=0; i<5; i++){ if(nopat[i].getValue()!=i+1){ return false; } } return true; }
2
public void endContact(Contact c) { Fixture fa = c.getFixtureA(); Fixture fb = c.getFixtureB(); if(fa == null || fb == null) return; if(fa.getUserData() != null && fa.getUserData().equals("foot")) { numFootContacts--; } if(fb.getUserData() != null && fb.getUserData().equals("foot")) { numFoo...
6
@Test(groups = {"forgotpassword"}) @Parameters({"browser"}) @BeforeClass public void beforeClass(String browser) throws IOException, InterruptedException { if (browser.equals("firefox")) { driver=browserFirefox(); } if (browser.equals("chrome")) { driver=br...
9
@SuppressWarnings("unused") @Test public void testTextLineIteratorWithNesting() { //Create a few regions with text lines: tr1, cr2 (tr3,tr4), tr5 (tr6) Page page = new Page(); PageLayout pageLayout = page.getLayout(); TextRegion r1 = (TextRegion)pageLayout.createRegion(RegionType.TextRegion); TextLine t11 =...
9
@Override public void run() { }
0
public static void setEntity (Description description, Entity entity) { if (description instanceof AlternateOf) { ((AlternateOf) description).setAlternateB (entity); } if (description instanceof HadMember) { ((HadMember) description).setMember (entity); } ...
9
@Override public void scan(Particle[] particle) { for (int index = 0; index < particle.length; index++) { int startFrom = index - neighborhoodSize/2; int endAt = index + neighborhoodSize/2; if (startFrom < 0) startFrom = 0; if (endAt >= particle.length) endAt = particle.length - 1; int best...
6
public static ArrayList<ArrayList<String>> createListFromString(String s) { ArrayList<ArrayList<String>> newlists = new ArrayList<ArrayList<String>>(); // special handle, s="aaaa" int length = 1; while (length < s.length()) { if (!s.substring(length - 1, length).equals( s.substring(length, length + 1)))...
8
public int getID() { return this.id; }
0
private boolean r_factive() { int among_var; // (, line 132 // [, line 133 ket = cursor; // substring, line 133 among_var = find_among_b(a_7, 2); if (among_var == 0) { ...
8
private void placeWumpusBloodAndMud(){ Random rand = new Random(); boolean success = false; int x = 0; int y = 0; //Place Wumpus while(!success){ x = rand.nextInt(10); y = rand.nextInt(10); if (grid[x][y]!=RoomState.PIT && grid[x][y]!=RoomState.SLIME){ grid[x][y] = RoomState.WUMPUS; success...
3
private static ClassType parseClassType(String sig, Cursor c) throws BadBytecode { if (sig.charAt(c.position) == 'L') return parseClassType2(sig, c, null); else throw error(sig); }
1
@Override public void mutate() { // Move a game from one week to another week randomly Random random = new Random(); double r = random.nextDouble(); if(r < 0.75) { // Get two random weeks Week w1 = weeks.get(random.nextInt(weeks.size())); Week w2 = weeks.get(random.nextInt(weeks.size())); // G...
9
@Override public ApiResponse executeCommand(final ApiCommand command) throws IOException, InternalApiException { if (command.getHttpMethod() == GET) { return executeGetCommand(command); } else if (command.getHttpMethod() == POST) { return executePostCommand(command); ...
2
@Override public boolean setStackInNextAvailableSlot(ItemStack item) { if(item.getItem().equals(Items.grease)){ setStackInSlot(0, item); return true; } return false; }
1
public void removeplayer(Player p) { p.teleport(playerslocation.get(p)); playerslocation.remove(p); players.remove(p); }
0
@Override public String toString() { return _firstName; }
0
public void visit(ClassOrInterfaceDeclaration classOrInterface, Object object) { List<ClassOrInterfaceType> extendsList = classOrInterface.getExtends(); List<ClassOrInterfaceType> implementsList = classOrInterface .getImplements(); if (extendsList != null) { for (ClassOrInterfaceType extendsName : ext...
5
public ArrayList<String> ParaseXML(String filePath) { ArrayList<String> list = new ArrayList<String>(); try { XMLReader parser = XMLReaderFactory.createXMLReader(); MyHandler myHandler = new MyHandler(); parser.setContentHandler(myHandler); parser.parse(filePath); // System.out.println(myHandler.getNa...
2
private static final void loadFilesizes() { assert FILESIZES == null; FILESIZES = new HashMap<Integer, String>(); BufferedReader reader = TextResource.getBufferedReader("filesizes.txt"); try { try { String line; while ((line = reader.readLine()...
9
@Override public double estimateMiceNumber(int nbOcc){ double comp = 0; for(int i = b; i <= 32 ; i++){ HashMap<String, Integer> t = strTab.get(i); for (String s : t.keySet()) if (t.get(s) == nbOcc) comp++; } return comp * Math.pow(2, b); }
3
public static void v(CanFly x) { x.fly(); }
0
public void actionPerformed(ActionEvent e){ if(e.getSource() == btnSearch){ //DB query to populate doctor names //"Doctor Name", "Phone Number", "Room Number", "Availability", "Average Rating" String spec = (String) boxSpecialty.getSelectedItem(); int count = table.getRowCount(); for(int i=0; i<c...
8
public static GeneralNameValueConfig getGeneralConfigByField(String field) { return Registry.getConfigByField(field,generalFields); }
0
public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; _hashCode += getAccountId(); _hashCode += getBatchId(); if (getBatchStatusId() != null) { _hashCode += getBatchStatusId().hashC...
9
public TilePanel(TileFrame tileFrame, TileSheet tileSheet) { setLayout(null); this.tileFrame = tileFrame; this.tileSheet = tileSheet; tileFrame.addMouseListener(new MouseInputAdapter() { @Override public void mouseClicked(MouseEvent event) { if (Ti...
7
public List findByRecordTime(Object recordTime) { return findByProperty(RECORD_TIME, recordTime); }
0
private static List<Line> getAvailableLines(Mixer mixer, Line.Info[] lineInfos) { List<Line> lines = new ArrayList<Line>(lineInfos.length); for (Line.Info lineInfo : lineInfos) { Line line; line = getLineIfAvailable(mixer, lineInfo); if (line != null) lines.add(line); } return lines; }
2
public PreferenceString getSaveEncoding() { if (useDocumentSettings()) { return this.saveEncoding; } else { return Preferences.getPreferenceString(Preferences.SAVE_ENCODING); } }
1
@Override public PrintService accept(PrintRequestAttributeSet set) { PrintService service = super.accept(set); if (mCopies != null) { PrintUtilities.setCopies(set, ((Integer) mCopies.getValue()).intValue()); } if (mPageRangeAll != null) { if (mPageRangeAll.isSelected()) { PrintUtilities.setPageRanges...
4
public CapabilitiesServlet() { logger.info("Capabilities servlet started."); String filterFileName = System.getProperty(EmbeddedServer.StartupSetting.SEARCH_FILTER_FILE.getKey()); if( filterFileName == null ) { filterKeywords = null; } else { FileInputStream fis = null; try { fis = new FileInput...
7
private void loop() throws Exception { buffer = new FrameBuffer(800, 600, FrameBuffer.SAMPLINGMODE_HARDWARE_ONLY); buffer.disableRenderer(IRenderer.RENDERER_SOFTWARE); buffer.enableRenderer(IRenderer.RENDERER_OPENGL); long time = System.nanoTime() / 1000000L; int fps = 0; while (!org.lwjgl.opengl.Display....
2
public Game(int x, int y) { boolean test = false; if (test || m_test) { System.out.println("Game :: Game() BEGIN"); } setGrid(new Grid(x, y)); if (test || m_test) { System.out.println("Game :: Game() END"); } }
4
public void calculateEnergyConsumptionEP() { int i = 1; System.out.println("EVALUATING SYSTEMS\n"); for (SoftwareSystem system : systemsEP) { System.out.println("\tSystem " + (i++) + "\n\t\t" + system); int j = 0; Calculator calculator = new Calculator(this); for (FunctionalRequirement functionalRequ...
7
protected void genMountText(MOB mob, Modifiable E, int showNumber, int showFlag) throws IOException { if((showFlag>0)&&(showFlag!=showNumber)) return; if(mob.session()==null) return; mob.session().safeRawPrintln(L("@x1. Mount Strings: '@x2'.",""+showNumber,E.getStat("PUTSTR")+"/"+E.getStat("MOUNTSTR")+"...
8
private void calculateMinMax() { double maxX = 0, maxY = 0, minX = 0, minY = 0; boolean initMinMax = true; for (Entry<String, DataPoints> e: this.m_PointsSet.entrySet()) { DataPoints dp = e.getValue(); if (initMinMax) { maxX = dp.getMaxX(); maxY ...
8
public boolean isBalanced(treeNode root, HashMap<treeNode, Integer> nodeDepthes) { if (root == null) return true; int depthLeft = depthOfNode(root.leftLeaf, nodeDepthes); int depthRight = depthOfNode(root.rightLeaf, nodeDepthes); if (!isBalanced(root.leftLeaf, nodeDepthes)) return false; if (!isBal...
5
private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed String name = txtFieldName.getText(); String password = txtPassword.getText(); int staffId = -1; PersonalType st = (PersonalType) cmbBoxPersonalTypes.getSelectedItem(); S...
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 onTick(ArrayList<Thing> toMove, ArrayList<GridSpace> destinations) { // checks if there is a weapon modifier in the grid space, if so, // applies damage for (int i = 0; i < thingsInSpace.size(); i++) { if (thingsInSpace.get(i) instanceof Weapon) { for (int j = 0; j < thingsInSpace.size(); j++) ...
8
public boolean checkToolTips() { boolean result; Class<?> cls; BeanInfo info; PropertyDescriptor[] desc; int i; Vector<String> missing; String suffix; print("Tool tips..."); result = true; suffix = "TipText"; cls = getObject().getClass(); //...
9
private void saveDataToStorage(String artistName, String data) throws IOException { File eventsFile = FileUtil.getEventsFile(artistName); FileUtil.saveDataToFile(eventsFile, data); }
0
public static void insertExtendedNetwork(ExtendedNetwork net, ExtendedNetworkData d){ ExtendedNetworkData extData; if (net!=null) //call from the Rest Interface extData = net.getNetwork(); else //call from createMultiple extData=d; //Recover the network object (from the Rest Interface) attribute...
4
public static Drug searchDrug(String drugName){ Drug sDrug = new Drug(); sDrug.setDrugName(drugName); sDrug=(Drug)DatabaseProcess.getRow(sDrug); if(sDrug!=null) return sDrug; else return null; }
1
@Override public void updateIcon() { if(isProperty()) { if (isPropertyInherited()) { setIcon(ICON_IS_PROPERTY_INHERITED); } else { setIcon(ICON_IS_PROPERTY); } } else { if (isPropertyInherited()) { setIcon(ICON_IS_NOT_PROPERTY_INHERITED); } else { setIcon(ICON_IS_NOT_PROPERTY); } ...
3
public BMPcontainer(File file) throws IOException { DataInputStream dataInputStream = new DataInputStream(new FileInputStream(file)); id[0] = (char) dataInputStream.readByte(); id[1] = (char) dataInputStream.readByte(); if ('B' != id[0] && 'M' != id[1]) { throw new Invali...
4
public void setEmail(String email) { Email = email; }
0
@Override public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) { if (args.length == 1) { List<String> matches = new ArrayList<String>(); for (String subcommand : subcommands) { if (StringUtil.startsWithIgnor...
6
public void mousePressed(int button,int x,int y){ if (xpos >= Button.GAME_WIDTH/2-76 && xpos <= Button.GAME_WIDTH/2 + 76 && ypos >= 600 && ypos <= 647){ mousePress = 1; } else if (xpos >= Button.GAME_WIDTH/2-creditWidth/2 && xpos <= Button.GAME_WIDTH/2 + creditWidth/2 && ypos >= Button.GAME_HEIGHT/2+100 && ...
8
public static String makeSkinFile(MD3_File md3_file){ if( md3_file == null ) return ""; StringBuilder sb = new StringBuilder(); String md3_file_name = md3_file.file.getName(); String skin_file_name = md3_file_name.split("[.]")[0] + ".skin"; sb.append("//.................... skin file .....
9
public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException { Expression select2 = visitor.typeCheck(select, contextItemType); if (select2 != select) { adoptChildExpression(select2); select = select2; } ItemType sortedIte...
9
public static HashMap<String,List<String>> toElementParser( HashMap<String,List<String>> pDictionary, String elementType) { if (elementType.equals("pathway")) {ElementParser.parseMapInfo(pathway, pDictionary);} else if (elementType.equals("datanode")) {ElementParser.parseDataNode(pathway, pDictionary);} el...
5
@Before public void setUp() { simpleObject = new Simple(); }
0
public boolean onkoPoytaTaynna() { int ristitJaNollat = 0; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { if (poyta[i][j] != 0) { ristitJaNollat++; } } } if (ristitJaNollat == 9) { try { ...
5
public Color getColor(float[] f) { if (true) { return new java.awt.Color(f[2], f[1], f[0]); } /* float A = (float)Math.exp(gamma[0]*Math.log(f[2])); float B = (float)Math.exp(gamma[1]*Math.log(f[1])); float C = (float)Math.exp(gamma[2]*Math.log(f[0]));*/ ...
7
private void setatime(int atime) { int am; String unit; if (atime > (604800 * 2)) { am = atime / 604800; unit = "week"; } else if (atime > 86400) { am = atime / 86400; unit = "day"; } else if (ati...
5
public void drawChat(Graphics2D g) { GameState state = ((GameState) Engine.getInstance().getGState()); List<Message> cbText = Chat.getCbText(); if (cbText.size() > 15) getInnerPanel().setCurrentHeight(cbText.size() * getLineHeight()); int inputTextHeight = (int) (getBounds(...
3
public long update(){ if(!pause){ if (Timer.duration(this.turnSnapshot, this.currentSnapshot)>=TURN_DURATION) this.startTurn(); // If more than 1s has elapsed Timer.updateSnapshot(this.currentSnapshot); // for(Event ev: eventList){ for(int i=0; i < eventList.size...
5
public void visit_iload(final Instruction inst) { final int index = ((LocalVariable) inst.operand()).index(); if (index + 1 > maxLocals) { maxLocals = index + 1; } if (inst.useSlow()) { if (index < 256) { addOpcode(Opcode.opc_iload); addByte(index); } else { addOpcode(Opcode.opc_wide); ...
8
@Override public void run() { int poblacionNumero = 1; Poblacion poblacionActual, poblacionNueva; //Generar primer población ALEATORIA poblacionActual = new Poblacion(operacion, cantIndividuos, restricciones); y[poblacionNumero] = poblacionActual.apt...
4
private void setVBusMode() { if (m_voltageMode) { if(m_robotDrive!= null) { m_robotDrive.setMaxOutput(1); } try { if (_leftFrontMotor != null) { _leftFrontMotor.changeControlMode(CANJaguar.ControlMo...
7
public int adOscLookback( int optInFastPeriod, int optInSlowPeriod ) { int slowestPeriod; if( (int)optInFastPeriod == ( Integer.MIN_VALUE ) ) optInFastPeriod = 3; else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) return -1; if( (int)optInSlowPeri...
7
public void setEmail(String email) { Email = email; }
0
void readData() { String str; try { while ((str = reader.readLine()) != null) { int n = Integer.parseInt(str); System.out.println(n); } } catch (NumberFormatException | IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
2
public void makeMovieQuotes(String cat, String url) { String content = ""; try { content = Request.Get(url).execute().returnContent().asString(); } catch (ClientProtocolException e) { System.err.println("Protocol error: " + e.getMessage()); e.printStackTrace(); } catch (IOException e) { System.err.p...
6
public boolean execute() { final int cycle=CDState.getCycle(); if( shuffle ) rperm.reset( Network.size() ); for(int j=0; j<Network.size(); ++j) { Node node = null; if( getpair_rand ) node = Network.get(CDState.r.nextInt(Network.size())); else if( shuffle ) node = Network.get(rperm.next()); else no...
9
@Override public void run() { if (Updater.this.url != null) { // Obtain the results of the project's file feed if (Updater.this.read()) { if (Updater.this.versionCheck(Updater.this.versionName)) { if ((Updater.this.versionLi...
6
private ZeroLink getLinkObjectInternal(byte[] data, int outputformat) { ZeroLink link; switch(outputformat) { case Constants.JSON_FORMAT: link= Utils.parseJSON(getStringResponseInternal(data)); break; case Constants.PLAIN_TEXT_FORMAT: link = new ZeroLink(); link.setShortLinkUrl(getStringRespon...
6
public void visit_fastore(final Instruction inst) { stackHeight -= 3; if (stackHeight < minStackHeight) { minStackHeight = stackHeight; } }
1
public void method2() { System.out.println("执行方法!"); }
0
private static int computeFreqHelper(int freq, long startTime) { switch (freq) { case Frequency.ONCE: return 0; case Frequency.DAILY: return 0; case Frequency.WEEKLY: Date startD = new Date(startTime); return startD.getDay(); case Frequency.MONTHLY: startD = new Date(startTime); return sta...
4
public HospitalPart getSpecialist(){ double t = nextRand(); if ( t < 0.15 ) return HospitalPart.CARDIO; else if ( t < 0.3 ) return HospitalPart.NEURO; else if ( t < 0.5 ) return HospitalPart.INTERNAL; else if ( t < 0.63 ) return HospitalPart.ORTHOPED; else if ( t < 0.75 ) return HospitalPart....
6
static Object get(Map<String, Object> inst, String key) { Object val = inst.get(key); if (val == null) { throw new IllegalArgumentException("No such component name '" + key + "'"); } return val; }
1
public void setCurrentThreadClassLoader() { ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader instanceof ExtendableClassLoader) return; else { currentLoader = loader; Thread.currentThread().setContextClassLoader(this); } }
1
public boolean execute(String sql){ try { Statement statement = mc.getConnection().createStatement(); statement.executeUpdate(sql); return true; } catch (SQLException ex) { Logger.getLogger(Crud.class.getName()).log(Level.SEVERE, null, ex); ret...
1
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final Parameter that = (Parameter) obj; i...
9
public static String getMapfile() { String mapfile = ""; try { BufferedReader r = new BufferedReader(new FileReader("config.txt")); String line = r.readLine(); while (line != null) { if (line.startsWith("Mapfile=")) ...
3
@Override public void setTmp(String value) {this.tmp = value;}
0