text
stringlengths
14
410k
label
int32
0
9
private void testCode(String code, int... expectedOutput) { runner.run(code); final String output = baos.toString(); assertEquals(expectedOutput.length, output.length()); for (int i = 0; i < output.length(); i++) { assertEquals(expectedOutput[i], output.charAt(i)); ...
1
public static String stringPattern(String value){ String pattern = ""; for (int i = 1; i < Math.sqrt(value.length());i++){ StringBuilder strFirst = new StringBuilder(""); StringBuilder strSecond = new StringBuilder(""); StringBuilder strThird = new StringBuilder("")...
6
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 Object getRemoteInterface(String nomEJB) throws ServicesLocatorException { // Le nom JNDI pour la récupération du service distant (stub du // composant EJB) est de la forme : // java:global/<nom projet EAR>/<nom sous-projet EJB>/<nom bean session EJB>!<nom complet avec package de l'interface remote du b...
8
@FXML public void action(ActionEvent event) { if(event.getSource().equals(buttonOk)) { String hpass = Hash.md5(editPass.getText()); if(editLogin.getText().equals("Компьютер")) Model.getIntance().getFirstUser().empty(); else Model.getIntance().g...
3
public RandomListNode copyRandomList(RandomListNode head) { if (head ==null){ return null; } RandomListNode temp = head; while (temp!=null){ RandomListNode copy = new RandomListNode(temp.label); RandomListNode nextNode = temp.next; temp.nex...
6
public void wechsleSpieler(Spieler s) { System.out.println("spieler wechseln"); if(s.fraktion.equals(spieler1.fraktion)) aktuellerSpieler = spieler2; else if (s.fraktion.equals(spieler2.fraktion)) aktuellerSpieler = spieler1; frame.getBeendenButton().doClick(); }
2
public void setRoomId(String roomId) { this.roomId.add(roomId); }
0
private void handleNetworkCommand(String[] args) throws IOException { if (pfactory.hasGameNetwork()) { if (args[0].equalsIgnoreCase("start")) { pfactory.sendStartGamePacket(Strategy.Standard, 1); } else if (args[0].equalsIgnoreCase("play")) { handlePlayCom...
4
public List<Utr> findUtrs(Marker marker) { List<Utr> utrs = new LinkedList<Utr>(); // Is it in UTR instead of CDS? for (Utr utr : utrs) if (utr.intersects(marker)) utrs.add(utr); return utrs.isEmpty() ? null : utrs; }
3
public Capabilities getCapabilities() { Capabilities result; Capabilities classes; Iterator iter; Capability capab; if (getFilter() == null) result = super.getCapabilities(); else result = getFilter().getCapabilities(); // only nominal and numeric classes allowed cla...
8
public int addTile(Tile t) { if (t.getId() < 0) t.setId(tiles.size()); if (tileDimensions.width < t.getWidth()) tileDimensions.width = t.getWidth(); if (tileDimensions.height < t.getHeight()) tileDimensions.height = t.getHeight(); tiles.add(t); ...
3
public Reply sendCommand(Command cmd) throws IOException { if (getConnectionStatusLock() == CSL_DIRECT_CALL) setConnectionStatus(BUSY); controlBuffer.clear(); //for the command PASS hide the password in created logfile if (cmd.getCommand().equals(Command.PASS)){ ...
7
public static void question9a() { /* QUESTION PANEL SETUP */ questionLabel.setText("Which of these below do you like the most?"); questionNumberLabel.setText("9a"); /* ANSWERS PANEL SETUP */ //resetting radioButton1.setSelected(false); ...
0
public void pota() { if (padre != null) padre.rimuoviFiglio(posFiglio); }
1
private void addVertices(ArrayList<Vertex> vertices, int i, int j, float offset, boolean y, boolean z, boolean x, float[] texCoords) { if(x && z) { vertices.add(new Vertex(new Vector3f(i * SPOT_WIDTH, offset * SPOT_HEIGHT, j * SPOT_LENGTH), new Vector...
6
private void parseValue(String line, int lineNum) { // skip a comment line if (line.startsWith(COMMENT)) { return; } String[] sp = line.split("\\s+"); // split the fields based on a space int len = 0; // length of a string int index = 0; // the index of an array // che...
5
private void close() throws BITalinoException { try { socket.close(); } catch (Exception e) { throw new BITalinoException(BITalinoErrorTypes.BT_DEVICE_NOT_CONNECTED); } finally { socket = null; } }
1
private void removeFullLines() { int numFullLines = 0; for (int i = BoardHeight - 1; i >= 0; --i) { boolean lineIsFull = true; for (int j = 0; j < BoardWidth; ++j) { if (shapeAt(j, i) == Tetrominoes.NoShape) { lineIsFull = false; ...
7
@Override public void handleGameEvent(GameEvent e) { switch(e.type){ case COLLISION: break; case PLAYER_JUMP: System.out.println("Player jump"); break; case PLAYER_MOVE_DOWN: System.out.println("Player down")...
9
public void updateUI(World w, Gameplay g) { hexgrid.updateGrid(w, g); }
0
public double weightedStandardDeviation_as_double() { boolean hold = Stat.nFactorOptionS; if (nFactorReset) { if (nFactorOptionI) { Stat.nFactorOptionS = true; } else { Stat.nFactorOptionS = false; } } boolean holdW = Stat.weightingOptionS; if (weightingReset) { if (weightingOptionI) { ...
8
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://down...
6
public int linearRegAngleLookback( int optInTimePeriod ) { if( (int)optInTimePeriod == ( Integer.MIN_VALUE ) ) optInTimePeriod = 14; else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) return -1; return optInTimePeriod-1; }
3
public static void decodeFileToFile(String infile, String outfile) throws java.io.IOException { byte[] decoded = Base64.decodeFromFile(infile); java.io.OutputStream out = null; try { out = new java.io.BufferedOutputStream( new java.io.FileOutputStream(outfile)); out.write(decoded); } // end try ...
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 String readChunk() throws IOException { StringWriter writer = new StringWriter(); int ich; int lastich = -1; for (ich = this.nextChar(); ich != -1; ich = this.nextChar()) { char ch = (char)ich; if (ch == ChunkDelimeter && lastich != -1) { ich = this.nextChar(); if (ich == -1 || ...
9
public static void main(String[] args) { int max = 0; //all vertical for (int x = 0; x <= 16; x++) { for (int y = 0; y <= 19; y++) { int[][] coords = {{x,y},{x+1,y},{x+2,y},{x+3,y}}; max = Math.max(max, product(coords)); } } //all horizontal for (int x = 0; x <= 19; x++) { for (int y = 0; ...
8
@Override public void paint(Graphics g) { if (state == GameState.Running) { g.drawImage(background, bg1.getBgX(), bg1.getBgY(), this); g.drawImage(background, bg2.getBgX(), bg2.getBgY(), this); paintTiles(g); ArrayList projectiles = robot.getProjectiles(); for (int i = 0; i < projectiles.size(); i++) ...
4
public synchronized void poll() { // If relative, return only the delta movements, // otherwise return the current position... if (isRelative()) { mousePos = new Point(dx, dy); } else { mousePos = new Point(currentPos); } // Since we have polled, need to reset the delta // so the values do not accum...
4
private File writeDotSourceToFile(String str) throws java.io.IOException { File temp; try { temp = File.createTempFile("graph_", ".dot.tmp", new File(GraphViz.TEMP_DIR)); FileWriter fout = new FileWriter(temp); fout.write(str); fout.close(); } catch (Except...
1
private MBox createBox(int posX, int posY, char c) throws MazeException { MBox retour = new EBox(posX, posY); if (c == 'W') retour = new WBox(posX, posY); else if (c == 'E') { //variable deja initialise } else if (c == 'A') { if (grid.indexOf(new ABox(0, 0)) != -1) throw new MazeException("Deja une ca...
6
public void pickUp(String object, ArrayList<String> inv) { if (object.equalsIgnoreCase("floor")) { System.out.println("You can't pick up the floor...\n"); } else if (object.equalsIgnoreCase("wall") || object.equalsIgnoreCase("walls")) { System.out.println("You can't pick up the w...
7
public String getTelefon2() { return telefon2; }
0
@Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } if (id != null) { return id.equals(((Player) that).id); } return super.equals(that); }
4
private int jjMoveStringLiteralDfa14_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjMoveNfa_0(0, 13); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return jjMoveNfa_0(0, 13); } switch(curChar) { case 49: return jjMoveStringLiter...
3
public Behaviour getNextStep() { if (! configured()) return null ; if (stage == STAGE_GET_SEED) { final Action collects = new Action( actor, nursery, this, "actionCollectSeed", Action.LOOK, "Collecting seed" ) ; return collects ; } if (stage == STAGE_PLANTING) {...
5
public static HashMap<String, Object> parseMap(StringBuffer buf, int[] idx) { idx[0]++; HashMap<String, Object> into = new HashMap<String, Object>(); while (true) { skipSpace(buf, idx); if (idx[0] >= buf.length()) { System.err.println("Unexpected end"); return into; } if (buf.charAt(idx[0]) ==...
4
private boolean placeFire(int x, int y, position pos) { boolean firePlaced = true; ItemList items = field.getItems(x, y); ItemList itCopy = new ItemList(); itCopy.addAll(items); for (Item i : itCopy) { if (i instanceof Player) { Player p = (Player) i; p.die(); firePlaced = true; } else if (...
8
public void draw(GOut og) { GOut g = og.reclip(tlo, wsz); Coord bgc = new Coord(); for (bgc.y = 3; bgc.y < wsz.y - 6; bgc.y += bg.sz().y) { for (bgc.x = 3; bgc.x < wsz.x - 6; bgc.x += bg.sz().x) g.image(bg, bgc, new Coord(3, 3), wsz.add(new Coord(-6, -6))); } cdraw(og.reclip(xlate(Coord.z, true), sz));...
5
public final void parse(String options){ this.reset(); selectorFormat = options.replaceAll("\\s+", ""); String trimmed; if(selectorFormat.charAt(1)==this.bracketsOpen&& selectorFormat.charAt(selectorFormat.length()-1)==this.bracketsClose){ if(selectorFormat.ch...
8
@Override public boolean test(String value) { // TODO Auto-generated method stub if(value == null || value.length() == 0) return false; try { int sal = Integer.parseInt(value); if ((sal >= 500 && sal <= 20500)||sal==0){ return true; } } catch (Exception e) { // TODO: handle exception return ...
6
public void startLocalMultiplayerGame() { if (this.isActive) { if (JOptionPane.showConfirmDialog(null, "Are you sure?", "Restart game", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { this.endGame(); this.startGame(); } } else { this.startGame(); } }
2
@Override public int compareTo(SingleCounter that) { final int BEFORE = -1; final int EQUAL = 0; final int AFTER = 1; // TODO Auto-generated method stub if (this == that) return EQUAL; if (this.value < that.value) return AFTER; if (this.value > that.value) return BEFORE; return EQUAL; }
3
@Test(expected=BusinessException.class) public void partidoSinIniciarNoPuedeGenerarEquipos() { for (int i = 0; i < 3; i++) { inscribir(partidoPocosJugadores, new Jugador()); } partidoPocosJugadores.generarEquipos(); }
1
private static void addFocusArrowListener(JComponent jc) { /** * Check to see if someone already added this kind of listener: */ KeyListener[] listeners = jc.getKeyListeners(); for (KeyListener listener : listeners) { if (listener instanceof FocusArrowListener) { ...
2
@Override public StateModule getState() { return state; }
0
public DbConfig(String dbName) throws IOException { dbProperties = new Properties(); String userHomeProperties = System.getProperty("user.home")+"/."+DB_PROPERTIES; try { if (new File(userHomeProperties).exists()) { dbProperties.load(new FileInputStream(userHomeProper...
9
private synchronized void sendScreenSegment(int x, int y, int w, int h) { if(maxSend != -1) { if(w * h > maxSend) { int totalSent = 0; while(totalSent < h) { int h1 = maxSend / w; if(h1 == 0) h1 = 1; ...
8
public static boolean inBank() { int x = Players.getLocal().getLocation().getX(); int y = Players.getLocal().getLocation().getY(); return x >= 3250 && y >= 3419 && x <= 3257 && y <= 3423; }
3
public int checkBoundary(Vector3f playerPos) { int max = -1; if(playerPos.x > maxX) { if(Math.abs(maxX - playerPos.x) > max) { max = 90; } } if(playerPos.x <= minX) { if(Math.abs(minX - playerPos.x) > max...
8
public void processQueries(String strInputFilePath, String strOutputFilePath) throws IOException { oBufferedReader = new BufferedReader(new FileReader(strInputFilePath)); oBufferedWriter = new BufferedWriter(new FileWriter(strOutputFilePath)); calcuateTFIDF(oBufferedReader); oBufferedReader.close(); oBuff...
8
private JTreeNode<T> getCurrentNode(JTreeNode<T> root, T insertValue) { if (root.getLeftNode() == null && root.getRightNode() == null) return root; if (root.getValue().compareTo(insertValue) > 0 && root.getLeftNode() != null) return getCurrentNode(root.getLeftNode(), insertValue); if ((root.getValue(...
6
@Override public void display() { System.out.print("Forecast: "); if (currentPressure > lastPressure) { System.out.println("Improving weather on the way!"); } else if (currentPressure == lastPressure) { System.out.println("More of the same"); } else if...
3
public static int getDeltaY(int dir) { if(dir == UP || dir == UP_LEFT || dir == UP_RIGHT) return -1; if(dir == DOWN || dir == DOWN_LEFT || dir == DOWN_RIGHT) return 1; return 0; }
6
@SuppressWarnings("serial") private void initGUI() { try { setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); this.setSize(1003, 532); setExtendedState(java.awt.Frame.MAXIMIZED_BOTH); { jMenuBar1 = new JMenuBar(); setJMenuBar(jMenuBar1); { menuFile = new JMenu(); jMenuBar1.a...
5
public void initializeAnnotationComponents(ArrayList<Annotation> annotations){ if (this.annotations == null && annotations != null){ this.annotations = new ArrayList<AnnotationComponent>(annotations.size()); AnnotationComponentImpl comp; for (Annotation annotation : annotati...
5
@Override public List<? extends DefaultModel> getObj(final String campo) { return null; }
1
public void useThreadSleep() { System.out.println("-------------Use Thread.sleep()------------"); System.out.println("Sleep for 5 seconds."); try { Thread.sleep(5000); System.out.println("woke up."); } catch (InterruptedException e) { e.printStackTrace(); } }
1
@Override public void run() { CountDownLatch latch = new CountDownLatch(1); while(autoLog) { try { latch.await(logInterval, TimeUnit.SECONDS); saveLogs(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
2
public Document createDocument(final List<Student> students) { Document doc = null; try { final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setValidating(true); final DocumentBuilder db = dbf.newDocumentBuilder(); doc = db.newDocument(); final Element root = doc.createElem...
6
private void saveAdditionalSeats(JButton[] button, int flightID, int numberOfSeats, int methodChecker, int customerID) { int seats = 0; String nameOfSeats = new String(); for(int i = 0; i<button.length; i++) { //Checks if the button is clicked and also if it wasnt booked to ...
7
private static Patient getPatient(Patient bean, PreparedStatement stmt, ResultSet rs, int numOfObject) throws SQLException{ if(bean.getPid()!=0) stmt.setInt(1, bean.getPid()); else if(bean.getPhone()!=null){ stmt.setString(1, bean.getFirstName()); stmt.setString(2, bean.getLastName()); stmt.setString...
3
public static boolean isPrime(long x){ long max = (long)Math.sqrt(x); if( x == 2){ return true; } if (x % 2 == 0) { return false; } if (x <= 1) { return false; } for( long i = 3L; i <= max; i+=2 ) { if( x % i ==0) { return false; } } return true; }
5
void delete(){ thread=null; try{ if(ss!=null)ss.close(); ss=null; } catch(Exception e){ } }
2
public int getTag(int i) throws ClassFormatException { if (i == 0) throw new ClassFormatException("null tag"); return tags[i]; }
1
public void deleteUnselected() { for (Integer opp : list.keySet()) { if (!list.get(opp).selected()) { list.remove(opp); } } }
2
@EventHandler public void WolfNausea(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.getWolfConfig().getDouble("Wolf.Nausea.DodgeCh...
6
public void bufferSave(GraphNode child){ int i=0; while(!buffer.get(i).equals(child)){ i++; } int k=0; int[] temp = new int[buffer.size() - i]; while(i<buffer.size()){ temp[k] = buffer.get(i).getNodeIndex(); k++; i++; } cycles.add(temp); }
2
private int getMin(int a, int b) { return b < a? b: a; }
1
public String toString() { try { return this.toJSON().toString(4); } catch (JSONException e) { return "Error"; } }
1
private String getPath(String text, int id) { if (text.equals(IN) || text.equals(OUT)) if (id == 0) return LOW_PATH; else return HIGH_PATH; for (int i = 0; i < COMPONENTS.getLength(); i++) { if (COMPONENTS.get(i).equals(text)) ...
6
private void readBlocks(RandomAccessFile data) throws IOException { boolean readNext = true; while (readNext) { int mapX = data.readUnsignedShort(); int mapY = data.readUnsignedShort(); short musicIndex = data.readShort(); short ambienceIndex = data.readShort(); short mapIconIndex = data.readShort()...
9
public void append_blank() { if(isReadOnly()) return; addreccount(); try { fdbf.seek( recordpos() ); } catch (IOException e) {} writeChars(0,1," "); // not deleted for(int i=0;i<fcount;i++) { field y = Field[i]; if(y.ftype=='0') writeNumber(0,y.fsize, 0 ); //write binary 0 if(y.ftype=='I') writ...
9
public synchronized void processOutput(ByteBuffer buffer) throws SSLException { if (buffer.hasRemaining()) { do { SSLEngineResult result = mEngine.wrap(buffer, mOutboundData); switch (result.getHandshakeStatus()) { case NEED_TASK: runSSLTasks(); break; case NEED_UNWRAP: // Shoul...
8
private Item get(final Item key) { Item i = items[key.hashCode % items.length]; while (i != null && (i.type != key.type || !key.isEqualTo(i))) { i = i.next; } return i; }
3
public static void openStaticSWTDemo(IDemo demo) throws Exception{ Settings.getInstance().setHardwareAccelerated(true); Chart chart = demo.getChart(); Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new FillLayout()); Bridge.adapt(shell, (Component) chart.getCanvas()); ...
2
public static void main(String[] args) { try { AppGameContainer app = new AppGameContainer(new Application("The Saga of the Owl King v" + VERSION)); app.setDisplayMode(WIDTH, HEIGHT, false); app.setTargetFrameRate(FPS); app.setShowFPS(true); app.start(...
1
public TuringMachine getInnerTM(){ return myInnerTuringMachine; }
0
public static void test(PersistedQueueManager queueManager) throws Exception { processed.set(0); // create an ArmyAudit that just show to standard output ArmyAudit armyAudit = new SystemOutAudit(); //ArmyAudit armyAudit = new NegligentAuditor(); // create an Army to make machin...
8
public void deleteAllItemToArticle(List<Integer> idAllItemsInArticle) { Session session = HibernateUtil.getSessionFactory().openSession(); try { session.beginTransaction().begin(); for(Integer id:idAllItemsInArticle){ Article itemDelete = (Article) session.get(Art...
3
private void setPath(Point start) { int counter = 0; path.add(start); Point goal = mainPath.get(counter); counter++; int currentXPos = start.getX(); int currentYPos = start.getY(); while(true) { while (goal.getX() != currentXPos || goal.getY() != currentYP...
6
static int [] shift(int arr[]){ int lastElement=arr[(arr.length-1)]; for (int count=(arr.length-1);count>0;count--){ arr[count]=arr[count-1]; } if(arr.length>=1) arr[0]=lastElement; return arr; }
2
public void actionPerformed(ActionEvent evt) { if (evt.getSource() == browseButton) { if (browseFile() && recording) startRecording(); } else if (evt.getSource() == recordButton) { if (!recording) { startRecording(); } else { stopRecording(); fnameField.setText(nextNewFilename(fnam...
8
public boolean hasAttribute(String name) { for (int i = 0; i < attributes.length; i++) if (name.equals(attributes[i].name)) return true; return false; }
2
public static void main(String[] args) { jlap test = new jlap(); if (args.length != 1) { test.showUsage(); System.exit(0); } else { try { test.play(args[0]); } catch (Exception ex) { System.err.println(ex.getMessage()); System.e...
2
public NonRuleBasedDamagerRepairer(TextAttribute defaultTextAttribute) { fDefaultTextAttribute = defaultTextAttribute; }
0
@Override public boolean registerUser(String username, String password, String email, String firstName, String lastName) { // Declare a local boolean to be returned by this method, where false // means that registration has been unsuccessful // (i.e. given username already exists) and true that an user has be...
1
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Date date = (Date) o; return day == date.day && inaccurateTime.equals(date.inaccurateTime); }
4
@Override public void run() { ArrayList<Navire> naviresArrives; int compteur = 0; int sleep = 200; while(Partie._tempsCourant <= Partie._tempsFin) { if(compteur%Partie._tempsTour == 0) { incrementerTemps(compteur); ...
4
public static boolean HasPermission(Player p, String permission) { if(p == null) return true; if(p.hasPermission(permission)) return true; if(PermissionsEx.getPermissionManager().has(p, permission)) return true; return false; }
3
private void buildTree(FAT32Directory rootElement) { DefaultMutableTreeNode top = createNodes(rootElement); jTree = new JTree(top); ImageIcon leafIcon = new ImageIcon(this.getClass().getResource(leafIconPath)); ImageIcon openIcon = new ImageIcon(this.getClass().getResource(openI...
3
public void setSaleId(int saleId) { this.saleId = saleId; }
0
public void setFieldValue(_Fields field, Object value) { switch (field) { case WHAT: if (value == null) { unsetWhat(); } else { setWhat((Integer)value); } break; case WHY: if (value == null) { unsetWhy(); } else { setWhy((String)value); ...
4
public static Geometry newObj(String data) { n_v = n_f = 0; StringTokenizer st = new StringTokenizer(data, "\n"); while (st.hasMoreTokens()) { String s = st.nextToken(); if (s.length() > 1) if (s.charAt(0) == 'v' && s.charAt(1) == ' ') n_v++; e...
9
public static void encounter(ArrayList<Person> Group1,ArrayList<Person> Group2 ) { ///////////////////This is for zombie vs person////////////////////// if(isZombieGroup(Group1) && !isZombieGroup(Group2)) { zombieVsPerson(Group1,Group2); } ///////////////////This is for person vs pe...
8
public static void main(String[] args) { // TODO code application logic here MySQLCli mysqlCli = new MySQLCli("//localhost/smsapp", "root", ""); if (mysqlCli.connect()) { System.out.println("Connected to database smsapp"); Refresh R=new Refresh(mysqlCli); try { int NumberAd...
3
public FileInputAsChar(String pathName){ this.pathName = pathName; int posSlash = pathName.indexOf("//"); int posBackSlash = pathName.indexOf("\\"); if(posSlash!=-1 || posBackSlash!=-1){ File file = new File(this.pathName); ...
4
public void setConstant (double constant) { this.constant = constant; }
0
@Override public void addPosition(Position position) throws SQLException { Connection dbConnection = null; java.sql.Statement statement = null; try { dbConnection = PSQL.getConnection(); statement = dbConnection.createStatement(); String addPosition = "insert into position(id_position, name, sallary) v...
3