text
stringlengths
14
410k
label
int32
0
9
public void leftClick(Tile tile, boolean shift){ if(shift) { } else { select(tile); } }
1
@Test public void test_Divide() throws DivideByZeroException { assertEquals("FAILED: test_Divide", simpleObject.divide(4,2), 2); }
0
public int hashCode() { return myCurrentState.hashCode() ^ (parent == null ? 0 : parent.primitiveHashCode()); }
1
public static void main(String[] args) throws IOException, ExecutionException, InterruptedException { log.info("Loading data."); final Map<String, Repository> repositories = DataLoader.loadRepositories(); final DataSet data_set = DataLoader.loadWatchings(); if (args.length > 0) { // Perform...
9
protected Object readObject() throws IOException { Field[] objTable = readObjectTable(); Object[] newTable = new Object[objTable.length]; Object obj; for (int i = 0; i < newTable.length; i++) { obj = createObject(objTable[i].id, objTable[i].fields); if (obj == null) { newTable[i] = objTable[i...
6
public void generateCode ( ) { // generate the output code for the menus StringBuilder sb = new StringBuilder( 8192 ); StringBuilder sbCode = new StringBuilder( 4096 ); String sLabels = ""; //$NON-NLS-1$ String sMenus = "PROGMEM const char *menu_items[] = {\r\n"; //$NON-NLS-1$ String s; sb.append( "#inclu...
7
static final boolean method2496(int i, int i_9_, boolean bool) { if (bool != true) method2497(null, (byte) -29, null, 73); anInt6396++; if (i >= 1000 && (i_9_ ^ 0xffffffff) > -1001) return true; if ((i ^ 0xffffffff) > -1001 && i_9_ < 1000) { if (NativeLibTracker.method2308((byte) 26, i_9_)) return ...
9
private static void test_itostrx(TestCase t) { // Print the name of the function to the log pw.printf("\nTesting %s:\n", t.name); // Run each test for this test case int score = 0; for (int i = 0; i < t.tests.length; i += 2) { String exp = (String) t.tests[i]; int arg1 = (Integer) t.tests[i + 1]; S...
2
@Override public void startSetup(Attributes atts) { // Add this menuItem to the parent menu. Preference pref = (Preference) GUITreeLoader.elementStack.get(GUITreeLoader.elementStack.size() - 2); pref.setValidator(this); }
0
@Override public String intern(String s) { int h = s.hashCode(); // In the future, it may be worth augmenting the string hash // if the lower bits need better distribution. int slot = h & (cache.length-1); Entry first = this.cache[slot]; Entry nextToLast = null; int chainLength = 0; ...
6
public String getTypeString(Type type) { if (type instanceof ArrayType) return getTypeString(((ArrayType) type).getElementType()) + "[]"; else if (type instanceof ClassInterfacesType) return getClassString(((ClassInterfacesType) type).getClassInfo()); else if (type instanceof NullType) return "Object"; ...
3
private void resetOders() { this.orderTotal = BigDecimal.valueOf(0); this.order=null; this.order=""; this.lastErrors.clear(); }
0
public static void offset(int x, int y) { xOff = x >= 0 && x <= map.width - fieldWidth ? x : xOff; yOff = y >= 0 && y <= map.height - fieldHeight ? y : yOff; }
4
public void setRole(Role role) { this.role = role; }
0
public boolean coalesceText(boolean recursively) { final Iterator<Content> it = recursively ? getDescendants() : content.iterator(); Text tfirst = null; boolean changed = false; while (it.hasNext()) { final Content c = it.next(); if (c.getCType() == CType.Text) { // Text, and no CDATA! final T...
6
public static boolean isTerminalInProduction(String terminal, Production production) { String[] terminals = production.getTerminals(); for (int k = 0; k < terminals.length; k++) { if (terminals[k].equals(terminal)) return true; } return false; }
2
protected String buildQualifyingClassList(MOB mob, List<CharClass> classes, String finalConnector) { final StringBuilder list = new StringBuilder(""); int highestAttribute=-1; for(final int attrib : CharStats.CODES.BASECODES()) { if((highestAttribute<0) ||(mob.baseCharStats().getStat(attrib)>mob.baseChar...
7
public List<AsciiPoint> getPointList(char color) { List<AsciiPoint> points = new LinkedList<AsciiPoint>(); for (int x = 0; x < getWidth(); ++x) for (int y = 0; y < getHeight(); ++y) if (getPixel(x, y) == color) points.add(new AsciiPoint(x, y)); ret...
3
public static WavFile newWavFile(File file, int numChannels, long numFrames, int validBits, long sampleRate) throws IOException, WavFileException { // Instantiate new Wavfile and initialise WavFile wavFile = new WavFile(); wavFile.file = file; wavFile.numChannels = numChannels; wavFile.numFrames = numFrames;...
8
private String getCacheDescription(CacheDefinition cache) { String desc = "@Cache(key=[" + cache.getKey() + "],pool=[" + cache.getPool() + "],expire=[" + cache.getExpire() + "(毫秒)]"; if (StringUtils.isNotBlank(cache.getVkey())) { desc = desc + ",vkey=[" + cache.getVkey() + "]"; } desc = desc + ")"; ...
1
public BufferedImage scaleBufferedImage(BufferedImage image, Dimension size){ int imageWidth = image.getWidth(); double scalingFactorWidth = (double)size.getWidth() / imageWidth; int imageHeight = image.getHeight(); double scalingFactorHeight = (double)size.getHeight() / imageHeight; if(scalingFactorHeight ==...
2
public void initDependancies() { if (!setupEconomy() ) { logger.severe(String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName())); getServer().getPluginManager().disablePlugin(this); return; } setupPermissions(); ...
5
public Smoothie createSmoothie(String s){ Smoothie smoothie = null; SmoothieIngredientFactory sif = new StoreIngredientFactory(); if(s.equals("Banana")) { smoothie = new BananaSmoothie(sif); smoothie = new Milk(smoothie); return s...
4
@SuppressWarnings("unchecked") public <T extends Event> void registerEvent(T event , EventHandler<T> handler){ String eventType = event.getEventType(); List<EventHandler<? super Event>> handles = handleStore.get(eventType); if(handles == null){ handles = new ArrayList<EventHandler<? super Event>>(); handle...
4
public void print() { switch(ordinal()){ case 0: System.out.println("KKMMM"); break; case 1: System.out.println("HHMMM"); break; case 2: System.out.println("MMMKM"); break; case 3: System.out.println("MMMHH"); break; case 4: System.out.println("MMKHH"); break; case 5: System.out.println("MMKHM"); b...
8
private static String calc(String s) { Stack<String> num = new Stack<String>(); Stack<Character> op = new Stack<Character>(); char[] cs = (s + "#").toCharArray(); StringBuilder numV = new StringBuilder(); boolean inputNum = false; op.push('#'); int i = 0; ...
9
private long getSlot(int i) { return this.startOfDay + i * Appointment.TIME_UNIT; }
0
private static void computeSplitMap(int[] splitMBs, Configuration fConf, String jobNameDir, Boolean hasSplitFile) { if(hasSplitFile) { try { BufferedReader reader = new BufferedReader(new FileReader(jobNameDir + File.separator + "splits.txt")); String line; int splitMB; long splitByte; whi...
7
private void resetButtons(){ startStrategyButton.setEnabled(true); pauseButton.setEnabled(false); continueButton.setEnabled(false); cancelButton.setEnabled(false); }
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
public String toString() { String result; /* catch any internal errors */ try { result = "production [" + index() + "]: "; result += ((lhs() != null) ? lhs().toString() : "$$NULL-LHS$$"); result += " :: = "; for (int i = 0; i<rhs_length(); i++) result +=...
7
public boolean checkForPlayer(int x, int y) { for (Player p : PlayerHandler.players) { if (p != null) { if (p.getX() == x && p.getY() == y) return true; } } return false; }
4
private Integer[] determineWinnerTaIds() { BufferedReader reader = null; ArrayList<Integer> winnerTas = new ArrayList<Integer>(); try { reader = new BufferedReader(new FileReader("TransactionLog")); String line = reader.readLine(); String[] values; while (line != null) { values = line.spl...
7
public void draw(Graphics g) { int cid = id > 8 ? id - 8 : id; Color c = COLORS[cid]; if (id <= 8) { g.setColor(c); } else { g.setColor(Color.WHITE); } g.fillArc((int)pos.x - SIZE, (int)pos.y - SIZE, SIZE * 2, SIZE * 2, 0, 360); if (id > 8) { g.setColor(c); g.fillArc((int)pos.x - SIZE, (int)po...
6
public List<String> getErrors() { return errors; }
0
public boolean isSymmetric(TreeNode root) { if(root == null) return true; return isSymmetricLevel(root.left,root.right); }
1
private void executeReadRequestOnReadQuorum( HashMap<Machine, String> responseMap, HashSet<Machine> successfulServers, HashSet<Machine> failedServers, int articleReadFrom) { if (failedServers != null) { if (failedServers.contains(myInfo)) { /* * as we have already implemented local read in the f...
8
private boolean message_ready() { // Message is completely read. Push it further and start reading // new message. (in_progress is a 0-byte message after this point.) if (msg_sink == null) return false; boolean rc = msg_sink.push_msg (in_progress); ...
3
public static AuthenticationInfo extractAuthenticationInfo(String login, String encodedPassword) { try { char[] clearPwd; if (encodedPassword != null && !encodedPassword.isEmpty()) { clearPwd = decodePassword(encodedPassword); } else { clearPwd = null; } if (clearPwd ==...
5
private void addNewCounterEvidence() { String titleValue = titleNAJtxt.getText() , descriptionValue = descriptionNAJtxa.getText() , parentClaimTitle = null; Object parentClaimO = listOfClaimsNAJcbx.getSelectedItem(); Claim parentClaim = null; if (parentClaimO != null) { parentClaimTitle = parentClaim...
9
public static void main(String[] args){ for(int iloscWatkow=10; iloscWatkow<51; iloscWatkow+=10) { watki++; for(int czasMetody=0; czasMetody<101; czasMetody+=20) { Main.ile=0; System.out.println("WATKI "+ iloscWatkow + " CZAS " + czasMetody); czasy++; sleep=czasMetody; int ilos...
8
private void analyseInstructionFormat(String line) throws AssemblerException { if (line.trim().length() == 0) return; foundInsFormat = true; line = line.trim(); // Legit instruction format: // (!(space|colon))+ space* colon space* (letters|numbers)+ openBracket // 0-9+ closeBracket // (space* (lette...
6
@Override public Page next() { boolean insidePage = false; Page page = new Page(); try { pageCount++; loop: while (true) { xmlr.next(); switch (xmlr.getEventType()) { case XMLStreamConstants.START_ELEMEN...
9
public void do_ls(ParamHolder myParamHolder) { Connection dbConnection = null; PreparedStatement pstatement = null; String SelectTabSQL = "select File_Name\n" + " ," + myParamHolder.keyFieldName.toUpperCase() + "\n" + " ,round(dbms_lob.getlength(" + my...
8
public static List<String> getAllTablesNames() { List<String> allTables = new ArrayList<String>(); try { DatabaseMetaData md = connection.getMetaData(); ResultSet rs = md.getTables(null, null, "%", null); while (rs.next()) { allTables.add(rs.getString(3)); } } catch (SQLException e) { while (e...
3
public static void main(String[] args) { // Diamond types are awesome. They let us create a container of explicit type without actually // specifying the needed type, as it can be inferred from the declaration. // This was introduced in Java 7. // ... // An example of this is the...
8
public JSONWriter object() throws JSONException { if (this.mode == 'i') { this.mode = 'o'; } if (this.mode == 'o' || this.mode == 'a') { this.append("{"); this.push(new JSONObject()); this.comma = false; return this; } t...
3
public static ArrayList<String> restoreIpAddresses(String s) { ArrayList<ArrayList<String>> resultLists = new ArrayList<ArrayList<String>>(); ArrayList<String> result = new ArrayList<String>(); if (s.length() == 0) return result; ArrayList<String> list = new ArrayList<String>(); restoreIpAddressesHelper(s...
5
public void load(String fileName) { boolean header = true; for (String line : Gpr.readFile(fileName).split("\n")) { if (header) { header = false; continue; } // Split line and parse data String recs[] = line.split("\t"); String mtype = recs[0]; countBases.inc(mtype, Gpr.parseIntSafe(re...
2
@Override public void execute(Joueur jou) { Joueur proprio = this.getProprietaire(); if(proprio == null){ Scanner sc = new Scanner(System.in); if(this.getLoyerBase() <= jou.getCash()){ System.out.println("Voulez-vous acheter cette gare : y/n Ce...
4
private void drawFields(Graphics g){ for (int[][] a : Position.time){ for (int []b : a){ //System.out.println(" x: " + b[0] + " y: " + b[1]); Position.drawEmptyCircle(g, b[0], b[1]); } } }
2
public String TitikHanya2(String strQty){ char [] data = strQty.toCharArray(); String newStrQty = ""; int JmlTitik = 0, PosTitik=0; int Pencacah=0; for (char c : data){ if (c != getTheSeparator().charAt(0)) { newStrQty = newStrQty + String.valueOf(c);...
8
public Task getTask() { return new Task(); }
0
private static void whichTrack(String track, String dir, int[] startingPoint, LinkedList<int[]> locations) { switch (track) { case "strR": case "strL": case "statR": case "statL": straightTrack(dir, startingPoint, locations); break;...
5
public void paintComponent(Graphics g){ switch(dice){ case 1: g.setColor(Color.DARK_GRAY); g.fillRect(0, 0, 81, 81); g.setColor(Color.WHITE); g.fillRect(v2, v2, 9, 9); break; case 2: g.setColor(Color.DARK_GRAY); g.fillRect(0, 0, 81, 81); g.setColor(Color.WHITE); g.fillRect(v1, v1, ...
6
public void bounceOffWalls() { if (y > FRAME_HEIGHT - FONT_SIZE || y < 0) { vy = -vy; } if (x + FONT_SIZE/2 > FRAME_WIDTH || x < 0) { vx = -vx; } }
4
@Override public int compare(Creature o1, Creature o2) { float distance1 = o1.getTarget2().getDistance(o1.getPos()); float distance2 = o2.getTarget2().getDistance(o2.getPos()); float dif = distance1 - distance2; if (dif < 0) return -1; else if (dif > 0) return 1; return 0; }
2
public static ScoreManager getInstance() { return instance; }
0
protected Transition initTransition(State from, State to) { return new FSATransition(from, to, ""); }
0
private int findLeftRight(String program, Character symbol) { int leftCount = 0, rightCount = 0; int maxLeft = 0, maxRight = 0; for (int i = 0; i < program.length(); i++) { if (program.charAt(i) == symbol) { if (rightCount > 0) { rightCount--; ...
7
@Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); }
0
public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { JFrame frame = new BounceFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } ...
0
@Override public void setEnabled( boolean enabled ) { if( !enabled ){ moving = false; mousePressedPoint = null; items.clear(); } }
1
@Override public final void mouseDragged(MouseEvent me) { if (slider.inUse) if (orientation == VERTICAL) { slider.y = me.getY() - 12.5f; if (slider.y < y) slider.y = y; else if (slider.y > y + length - 25) slider.y = y + length - 25; sendTScrollEvent(new T...
7
public void printSymbol(Integer type) { String string = program.getMainPanel().getTextField().getText(); string = string.substring(0, program.getMainPanel().getTextField() .getCaretPosition()); switch (type) { case 0: string = string + "*"; break; case 1: string = string + "+"; break; case 2...
6
final Entry<V> removeEntryForKey(long key) { int hash = hash(key); int i = indexFor(hash, this.table.length); Entry prev = this.table[i]; Entry e = prev; while (e != null) { Entry next = e.next; if (e.key == key) { this.modCount += 1; this.size -= 1; if (prev == ...
3
public String getTypeFrench() { String res = ""; switch(this.type) { case "calculation": res = "Calcul arithmétique"; break; case "fraction": res = "Calcul fractionnaire"; break; case "equation": ...
5
public void importTriples ( List<Triple> listOfTriples ) { Node subject_obj; Predicate predicate_obj; Node object_obj; String subject; String predicate; String object; String triple; // go through the list of triples to populate KnowledgeGraph with input data for ( Triple element : listOfTriple...
7
@Override public void add(int id_task, int id_user) { try { connection = getConnection(); ptmt = connection.prepareStatement("INSERT INTO Task_executors(id_task, id_user) VALUES(?,?);"); ptmt.setInt(1, id_task); ptmt.setInt(2, id_user); ptmt.execut...
5
@Override public void mouseExited(MouseEvent e) { if(!czyRozmieszczonoLosowo) { if(widokRozmiesc.cb_RodzajStatku.getItemCount() > 0) for(int i = 0;i < 10; i++) for(int j = 0;j < 10; j++) if(e.getSource() == lb_polaGry[j][i]) if(widokRozmiesc.uzytkownik.plansza.sprawdzWspolrzedneUstawianego...
6
static public Double[][] readFile(String fileName) { // default initializations int nbDim = 0; int nbPoints = 0; boolean textOnFirstLine = false; // count lines (points = rows) and dimensions (columns) try { BufferedReader countR...
9
@Override public SourceValue unaryOperation(final AbstractInsnNode insn, final SourceValue value) { int size; switch (insn.getOpcode()) { case LNEG: case DNEG: case I2L: case I2D: case L2D: case F2L: case F2D: case D2L: ...
9
public void renderTile(int xp, int yp, Tile tile) { for (int y = 0; y < 32; y++) { int ya = yp + y; for (int x = 0; x < 32; x++) { int xa = xp + x; if (xa < -32 || xa >= WIDTH || ya < 0 || ya >= HEIGHT) { break; } ...
6
public String esp(String entree){ String str = new String(); int nbCar = 0; int taille = getTailleLigne(); if(taille % 2 == 1){ nbCar = (taille / 2)+1; } else{ nbCar = taille / 2; } for(int i=0; i < nbCar; i++){ ...
2
public int findMOOLAH(){ int index=-1; for(int q=0;q<objects.size();q++) { if ((objects.get(q).kind!=0)) continue; int searchRadius = h/2+10; //radius of whether the object will be findable boolean search = collisionCircle(getX(),getY(),searchRadius,ob...
6
public ArrayList<ArrayList<Integer>> fourSum(int[] num, int target) { // similar to 3 sum; keep two pointers, start and end; // then keep two middle pointers and compare with the target // so as to decide to move which middle pointer ArrayList<ArrayList<Integer>> res = new ArrayList<Arr...
8
public void deleteMin() { if (isEmpty()) throw new RuntimeException("Symbol table underflow error"); delete(min()); }
1
public void testLoadInEurope() { Game game = ServerTestHelper.startServerGame(getTestMap()); InGameController igc = ServerTestHelper.getInGameController(); ServerPlayer dutch = (ServerPlayer) game.getPlayer("model.nation.dutch"); Goods cotton = new Goods(game, null, cottonType, 75); ...
9
public String getArea() { return Area; }
0
@Override public void actionPerformed(ActionEvent e) { Object actionObject = e.getSource(); if (actionObject instanceof JComboBox) { JComboBox selected = (JComboBox)actionObject; if (selected.equals(this.instrumentOptions)) { this.cont...
4
void applyTorque() { if (torque == null) return; if (Math.abs(torque.getForce()) < Particle.ZERO) return; computeCenter(); int[] exclusion = torque.getExclusion(); double k, sinx, cosx; outerloop2: for (Atom a : atoms) { if (exclusion != null && exclusion.length > 0) { for (int i : exclusion) {...
8
public boolean loadSign(World world, ProtectedRegion region) { ConfigurationSection sign = datacfg.getConfigurationSection("SellSigns." + world.getName() + "." + region); if (sign == null) { sign = datacfg.getConfigurationSection("RentSigns." + world.getName() + "." + region); } Block block = world.getBlockA...
8
static private short atos(byte[] in, int fromIndex, int byteLen) { int i = fromIndex; int endIndex = i + byteLen; int sign = 1; int r = 0; while (i < endIndex && Character.isWhitespace((char)in[i])) { i++; } if (i < endIndex && in[i] == '...
9
public boolean commit(){ synchronized (fatherTable){ for(Map.Entry<Column, ValueWithTimestamp> entry:localData.entrySet()){ Column col=entry.getKey(); ValueWithTimestamp data=entry.getValue(); Long oldNow=fatherTable.getLatestTimestamp(row, col); if(prevData==null) System.out.println(null+"");...
5
public void mutate(double prob, double variance) { Random rnd = new Random(); for (int i = 0; i < genes.size(); i++) { if (rnd.nextDouble() < prob) { double orig = genes.get(i); orig += randGaussian(variance, rnd); genes.set(i, orig); } } }
2
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; LocationSQL other = (LocationSQL) obj; if (worldName == null) { if (other.worldName != null) return false; } else if (!worldName.equals(...
9
public void readMessage() { try { String statement = new String("UPDATE " + DBTable + " SET " + "isRead = true" + " WHERE mid=?"); PreparedStatement stmt = DBConnection.con.prepareStatement(statement); stmt.setInt(1, messageID); stmt.executeUpdate(); } catch (SQLException e) { e.printStackT...
1
public void setLevelString(String newLevel) { level = newLevel; }
0
private int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(6, old0, old1); try { curChar = input_stream.readChar(); } catch (IOException e) { jjStopStringLiteralDfa_0(7, ...
9
public void testStations() throws Exception { File climateInput = new File("c:/tmp/clim_data_test.csv"); int staid; String staname; String state; double lng; double lat; int elev; CSTable table = DataIO.table(climateInput, "Data for met test"); I...
1
private void loadParameters() { if (loaded.get()) { return; } loaded.set(true); parameters = new LinkedHashMap<Parameter, Object>(); for (Parameter parameter : Parameter.values()) { if (clientScriptData.containsKey(parameter.value())) { parameters.put(parameter, clientScriptData.get(parameter.valu...
4
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; CompiledAutomaton other = (CompiledAutomaton) obj; if (type != other.type) return false; if (type == AUTOMATON_TYPE.SINGLE) { if (!te...
8
private boolean Transferencia(Cuenta cuentaReceptora, float importe) { float interes = importe*this.tipoInteres/100; if (this.Recargo(importe+interes)) { if (cuentaReceptora.Ingreso(importe)) { this.registerMovement(new Recargo("Intereses transferencia "+this.tipoInteres+"% "+...
2
protected int findTagByCategory (HashMap<String,TagCategory> tcHM, String strCategory, String strText) { int pos = -1; if (tcHM.containsKey(strCategory)) { TreeSet<TagCategory.Pair> pairSet = tcHM.get(strCategory).getTaggedText(strText.toString(), true); if (!pairSet.isEm...
2
public void windowClosing(WindowEvent e) { if (Game.getThis() == null) { System.exit(0); } else if (confirmQuit("Exit")) { System.exit(0); } }
2
@SuppressWarnings("deprecation") public static PacketPlayOutSpawnEntityLiving getMobPacket(String text, Location loc) { PacketPlayOutSpawnEntityLiving mobPacket = new PacketPlayOutSpawnEntityLiving(); try { Field a = ReflectionUtil.getDeclaredField(mobPacket.getClass(), "a"); ...
3
public Edge getEdge(Tile t1, Tile t2, Direction d1) { Edge newEdge=null; if (type.endsWith("Door")) { String keyName = getDatumValue("Key Name"); Item key = new Item(keyName, 1); newEdge = new Exit(t1, t2, true, d1, d1.getOppositeDirection(), key); } if (type.endsWith("Wall")) { newEdge =...
2
public void reshuffle(CardArray p1cards, CardArray p2cards) { Deck newdeck = new Deck(); CardArray shouldRemoved = new CardArray(); cards = (CardArray) newdeck.cards.clone(); shouldRemoved.add(downcard); for (Card i : p1cards) { shouldRemoved.add(i); } for (Card i : p2cards) { shouldRemoved.add(i)...
6
@Override public void doPromote(ScriptRunner pScriptRunner, PromotionFile pFile) throws ExPromote { long lStart = System.currentTimeMillis(); Logger.logInfo("\nPromote DatabaseSource " + pFile.getFilePath()); //Read the DBSource file in String lFileContents; try { lFileContents = File...
6
public static User getUser(int id) { String url = "jdbc:mysql://ouaamou.com.mysql:3306/ouaamou_com"; String username = "ouaamou_com"; String password = "7ttrBnUR"; try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException e) { e.printStackTrace(); } User user = new Us...
9