text
stringlengths
14
410k
label
int32
0
9
public static void matMultiply(Matrix A, Matrix B, Matrix C) { int rowsOut = B.height; int innerProdDim = B.width; int colsOut = C.width; if ((A.height != rowsOut) || (A.width != C.width) || (B.width != C.height)) { throw new RuntimeException("Error: The matrices have inconsi...
7
private String replaceInString(final String regex, final String srcString, final String replacement) { // Exit if (srcString == null || "".equals(srcString)) { return null; } // Replace all found files with the value of // <code>ApplicationProperties.LOG_FILE_PATH.getDefaultValue()</code> final Patte...
3
public synchronized byte[] getMessage() { if(pendingMessage != null) { // Padding has already been applied earlier, so we can just return the pending message. return pendingMessage; } else if(!messageBuffer.isEmpty()) { // Fetch the last message from the buffer and apply padding pendingMessage = P...
3
public ShowCompanyPanel() { super(null); this.setBackground(Color.black); model = new CompanyTableModel(); sorter = new TableRowSorter<CompanyTableModel>(model); companyTable = new JTable(model); companyTable.setPreferredScrollableViewportSize(new Dimension(500, 70)); companyTable.setFillsViewportHeight(t...
8
@Override public void playCard(int playerId, int cardId) throws ActionNotAllowedException { Card cardPlayed = cardDAO.getCard(cardId); if (!gameStatus.beginningCardDrawn && playerOnTheMove(playerId)) { throw new ActionNotAllowedException(EXCEPTION_PLAY_CARD_BEGINNING_CARD_NOT_DRAWN); ...
6
public void draw( Graphics2D g, Scale s){ int numPoints = 10; for( int i=0; i<numPoints; i++){ for( int j=0; j<numPoints; j++){ drawSlope( g, s.new Converter( numPoints, new Point(i,j) ) ); } } }
2
@Override public boolean equals(Object obj) { if (obj == null) return false; if (!(obj instanceof RGB)) return false; return ((RGB) obj).r == r && ((RGB) obj).g == g && ((RGB) obj).b == b && ((RGB) obj).a == a; }
5
public static int contains(String text, String match) { return StringTools.contains(text, match); }
0
public void playSounds(){ if(LockedPlaylistValueAccess.lockedPlaylist) { ArrayList<Sound> soundList = currentSlide.getSoundList(); if(!soundList.isEmpty()) { Sound sound = soundList.get(0); audioPlayer.prepareMedia(sound.getFile(), sound.getStart()); audioPlayer.playMedia(); } } }
2
private void btnSwitchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSwitchActionPerformed UsuariosCRUD udao = new UsuariosCRUD(MyConnection.getConnection()); if(btnSwitch.getText().equals("Actualizar")){ Usuarios u = new Usuarios( edtCodigo.getText().t...
3
public static void insert(Girl newNode){ if(head == null){ head = newNode; tail = newNode; } else{ tail.next = newNode; tail = tail.next; } }
1
public FlacHeader(int sampleRateHz, byte numChannels, byte bitsPerSample, long numSamples,byte[] md5,int numMetadataBlocks, long frameDataStart) { super(); this.sampleRateHz = sampleRateHz; this.numChannels = numChannels; this.bitsPerSample = bitsPerSample; this.numSamples = numSamples; this.numMetadataB...
1
private void insert(int put) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < n; i++) { if ((put & 1) == 1) sb.append('Q'); else sb.append('.'); put >>>= 1; } oneSolution[row] = sb.toString(); row++;...
2
public static boolean isValidDate(String dateString){ //for checking if date is a valid date, surprise surprise if (dateString == null || dateString.length() != "yyyyMMdd".length()){ return false; }//end of if statement int date; try{ date = Integer.parseInt(dateString); }//en...
8
public Sentence getSentence(String id) { for (Sentence sentence : sentences) { if (sentence.getId().equals(id)) return sentence; } return null; }
2
public boolean canSupport(Territory territory, int SeatNum) { //!territory.getOrder().getUse() semble pas fonctionner return (territory2.getNeighbors().contains(territory)&& territory.getOrder()!=null && territory.getFamily().getPlayer()==SeatNum && territory.getOrder().getType()==OrderType.SUP && (!territory.getOrd...
6
public void setFontSmoothingValue(Object sv) { if(sv == RenderingHints.VALUE_TEXT_ANTIALIAS_OFF) { font_smoothing_value = 1; } else if(sv == RenderingHints.VALUE_TEXT_ANTIALIAS_ON) { font_smoothing_value = 2; } else if(sv == RenderingHints.VALUE_TEXT_ANTIAL...
7
public void testConstructor_ObjectStringEx2() throws Throwable { try { new LocalDate("1970-04-06T10:20:30.040"); fail(); } catch (IllegalArgumentException ex) {} }
1
@Override public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException { if (qName.equals("onStandingDrop")) { response.setOnStandingDrop(getCombatSetting(attrs)); } else if (qName.equals("onStatusDrop")) { response.setOnStatusDrop(getCombatSetting(attrs)); } ...
5
public float GetLineThickness(){ switch (LineWidthComboBox.getSelectedIndex()) { case 0: return 1.00f; case 1: return 2.00f; case 2: return 3.00f; case 3: return 4.00f; case 4: ...
5
private boolean r_tidy_up() { int among_var; // (, line 183 // [, line 184 ket = cursor; // substring, line 184 among_var = find_among_b(a_7, 4); if (among_var == 0) { ...
8
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); // Invoke the painter for the background if (painter != null) { Dimension d = getSize(); Graphics2D g2 = (Graphics2D) g; g2.setPaint(painter); g2.fill( new Rectangle(0, 0, d.width, d.height) ); } // Draw the im...
5
private void Initialize() { //initialize cars playerCar = new Car(); enemyCar = new EnemyCar(); //create the course CreateCourse(); //create the background movingBg = new MovingBackground(); }
0
void f() { print("Pie.f();"); }
0
private Component cycle(Component currentComponent, int delta) { int index = -1; loop : for (int i = 0; i < m_Components.length; i++) { Component component = m_Components[i]; for (Component c = currentComponent; c != null; c = c.getParent()) { if (component == c) { index = i; break loop; } ...
8
public final LogoParser.statement_return statement() throws RecognitionException { LogoParser.statement_return retval = new LogoParser.statement_return(); retval.start = input.LT(1); Object root_0 = null; LogoParser.singleLine_return singleLine8 =null; try { // ...
2
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Produto)) { return false; } Produto produto = (Produto) obj; if (this.id == produto.getId()) { return true; } return false; }
3
@EventHandler(priority = EventPriority.LOW) public void onPlayerMove (PlayerMoveEvent event) { //plugin.log.info("active " + plugin.active); if(plugin.active == false) return; Player p = event.getPlayer(); //plugin.log.info("cacheVar " + plugin.cacheage); //plugin.log.info("p...
8
@Override public void dragGestureRecognized(DragGestureEvent dge) { if (mSortColumn != null && mOwner.allowColumnDrag()) { mOwner.setSourceDragColumn(mSortColumn); if (DragSource.isDragImageSupported()) { Point pt = dge.getDragOrigin(); dge.startDrag(null, mOwner.getColumnDragImage(mSortColumn), new Po...
3
public SegmentGroup joinSplines() { long startTime = System.currentTimeMillis(); System.out.println("Sorting and joining Splines..."); SegmentGroup s = new SegmentGroup(); recalculateAllSplines(splines, sGroups, HIGH_RES); printl(currentID + " curr Id"); ...
9
@Override public boolean monkeyTrouble(boolean aSmile, boolean bSmile) { if (aSmile && bSmile) { return true; } if (!aSmile && !bSmile) { return true; } return false; // The above can be shortened to: // return ((aSmile && bSmile) || (!aSmile && !bSmile)); // Or this very ...
4
public void cancel(){ synchronized (this) { log("Cancelled"); isCancelled = true; if (youtubeProc!=null) youtubeProc.destroy(); if (convertThread!=null) convertThread.interrupt(); if (downloadThread!=null) downloadThread.interrupt(); if (ffmpegProc!=null) ffmpegProc.destroy(); son...
5
private void sysCallOpen() { //Get the device ID int deviceID = m_CPU.popStack(); //SOS.debugPrintln("sysCallOpen"); //Add the current process to the device to indicate that it's using the device //If the device exists DeviceInfo di; if((di = findDevice(device...
5
private void transverseStation(RailwayStation currStation, RailwayStation prevStation, final RailwayStation toStation, int distanceTraveled, String transversedStation, TreeMap<Integer, String> bestSolution) throws NoSuchRouteException { int maxEffort...
6
private static void loadFEP() { try { FileInputStream fstream; fstream = new FileInputStream("fep.conf"); DataInputStream in = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String strLine; ...
5
protected void mouseClicked(int par1, int par2, int par3) { super.mouseClicked(par1, par2, par3); int var4 = (this.width - this.xSize) / 2; int var5 = (this.height - this.ySize) / 2; for (int var6 = 0; var6 < 3; ++var6) { int var7 = par1 - (var4 + 60); ...
6
public void addTryCatch(final TryCatch tryCatch) { if (this.isDeleted) { final String s = "Cannot change a field once it has been marked " + "for deletion"; throw new IllegalStateException(s); } if (ClassEditor.DEBUG) { System.out.println("add " + tryCatch); } tryCatches.add(tryCatch); this....
2
public String getRepTitle() throws SQLException { if (!getFormat().getBaseFormat().equals("CD")) return getTitle(); // Check the database for other titles List<Record> recs = GetRecords.create().getRecords(this.getTitle()); int count = 0; for (Record rec : recs) if (r...
5
public static String qualifyCellAddress( String s ) { String prefix = ""; if( !s.contains( "$" ) ) { // it's not qualified yet int i = s.indexOf( "!" ); if( i > -1 ) { prefix = s.substring( 0, i + 1 ); s = s.substring( i + 1 ); } s = "$" + s; i = 1; while( (i < s.length()) && !Cha...
6
public List<String> retrieve(String extension) throws Exception { List<String> filelist = new ArrayList<String>(); try { ResultSet rs = stmt.executeQuery("SELECT filepath from " + tablename + " WHERE filepath LIKE '%." + extension + "'"); try { while (rs.next()) { String sResult = rs.getString...
3
public ViewMap(Tile[][] fullMap,Point centerPosition) { map = new Tile[DrawUtil.TILES_WIDTH][DrawUtil.TILES_HEIGHT]; Point topLeft = new Point(centerPosition.x-DrawUtil.TILES_WIDTH/2,centerPosition.y-DrawUtil.TILES_HEIGHT/2); for(int i = 0;i<DrawUtil.TILES_WIDTH;i++){ for(int j = 0;j...
6
public void act() { switch(state) { case WAITING: // if he is waiting // he will stop waiting if you command him to walk if(Keyboard.keyCheck(KeyEvent.VK_RIGHT)) { state = State.WALKING; dx = +mov_speed; col = 1; dir = RIGHT; break; } else if(Keyboard.keyCheck(KeyEvent.VK_LEFT)) { s...
9
protected void btnAdicionarEnderecoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAdicionarEnderecoActionPerformed Endereco temp = new Endereco(); temp.setBairro(txtBairro.getText()); temp.setCep(txtCep.getText()); temp.setCidade(txtCidade.getText()); ...
1
@Override protected Statement methodInvoker(FrameworkMethod method, Object test) { try { return new JCheckStatement((Configuration) configuration.clone(), classGenerators, method, test); } catch (C...
1
public void executeOnAllAccounts(Method action, BigInteger bonus) { if (bonus.compareTo(BigInteger.ZERO) <= 0) throw new IllegalArgumentException(); for (BankAccount account: getAllAccounts()) try { action.invoke(account, bonus); } catch (IllegalAccess...
4
public boolean makeTurn(){ ArrayList<Player> winners = new ArrayList<Player>(); for (Player p : this.players) { if (p.getTurn() == 1) this.displaySet(); int current_dice = this.dice.randomNumber(); System.out.println(p.getPseudo() + " is throwing a dice : " + current_dice); p.goForward(current_dice); ...
8
public static char[] replaceSpacesInStr(char[] str, int true_length){ System.out.print("\""); System.out.print(str); SOP("\""); SOP(true_length); //first get pos of last char //then we'll go through and figure out num spaces from start to last char //if true_length != (last_char_pos+1) ...
7
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } Contact otherContact = (Contact) obj; return new EqualsBuilder().append(firstName, otherContact.firstName).append(lastName, oth...
3
public void tick(Point point){ if(point != getLocation()){ double nx = (int)(point.getX() - x) * .04; double ny = (int)(point.getY() - y) * .04; if(y + ny >= 0 && y + ny <= maxY - height){ y += ny; } if(x + nx >= 0 && x + nx <= maxX -width){ x += nx; } this.setLocation(x, y); } if...
7
protected boolean isDeprecated(String fieldKey) { boolean isDeprecated = false; for (Pattern deprecatedKey : deprecatedKeys) { if (deprecatedKey.matcher(fieldKey).find()) { isDeprecated = true; break; } } return isDeprecated; }
2
public static final String[] getLinesAndClose(Reader reader) throws IOException { if(reader != null) { try { final BufferedReader input = new BufferedReader(reader); ArrayList<String> lines = new ArrayList<String>(); while(true) { String line = input.readLine(); if(line == null) { brea...
3
private void jButton24ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton24ActionPerformed String s = (String) listaSecretari.getSelectedValue(); liceu.Administrator admin = new liceu.Administrator(); admin.delUser(s); BufferedReader fisier; try { ...
5
public JsonElement toJSON() { JsonObject obj = new JsonObject(); String[] properties = new String[]{"prefix", "name", "title", "pagebreak", "notitle", "noheader", "wiki", "entrypicture"}; for(String prop: properties) { try { Field field = this.getClass().getDeclaredField(prop); Object v1 = field.get(t...
7
public void initTableModel(JTable table, List<Client> list) { //Формируем массив клиентов для модели таблицы Object[][] clientArr = new Object[list.size()][table.getColumnCount()]; int i = 0; for (Client client : list) { //Создаем массив для клиента Object[] row =...
1
public void getKeyPath(GraphList glf) { Stack<GraphPoint> s = TopologicalSort(glf); Integer i; for(i=0;i<ltv.length ;i++) { ltv[i] = etv[etv.length-1]; } while(!s.isEmpty()) { GraphPoint gp = s.pop(); EdgePoint e = gp.firstEdge; while (e!=null) { int k = e.index; if(l...
7
@EventHandler public void CaveSpiderPoison(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.getCaveSpiderConfig().getDouble("CaveSpi...
6
public static void main(String args[]) { try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); ...
6
private void onOpen(){ FileNameExtensionFilter filter = new FileNameExtensionFilter(".wav files", "wav", "mp3"); fileChooser.setFileFilter(filter); if(fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION){ File file = fileChooser.getSelectedFile(); controller.open(file); } }
1
public Paintimator() throws IOException, UnsupportedAudioFileException, LineUnavailableException{ super(); this.setLayout(new BorderLayout()); this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); this.setTitle(FRAME_TITLE); //create a contentPane that can hold an image contentPane = new Ba...
3
private void compute_pcm_samples5(Obuffer buffer) { final float[] vp = actual_v; //int inc = v_inc; final float[] tmpOut = _tmpOut; int dvp =0; // fat chance of having this loop unroll for( int i=0; i<32; i++) { final float[] dp = d16[i]; float pcm_sample; pcm_sample = (float)(((vp[5 + ...
1
public boolean isUpdating() { return db != null && db.isForceEnabled(); }
1
public boolean onPlayerRightClick(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack, int par4, int par5, int par6, int par7) { if (par3ItemStack != null && par3ItemStack.getItem() != null && par3ItemStack.getItem().onItemUseFirst(par3ItemStack, par1EntityPlaye...
8
public void saveGame() { File file = new File("Saved_Games.txt"); FileWriter writer; boolean flag = false; ArrayList<String> data = new ArrayList<String>(); ListIterator<String> iterator; String currentPuzzle = getCurrentPuzzle(); try { Scanner s = new Scanner(file); while(s.hasNextLine()) { ...
8
private String addSocialComponent(DialogState dialogState, String output) { //String keyword = dialogState.getOutputKeyword(); JSONParser parser = new JSONParser(); boolean addBefore = true; try { //Location of sentences.json file Object obj = parser.parse(new FileReader("resources/nlg/soc...
7
public static void setMaxAge(int newMAX_AGE) { MAX_AGE = newMAX_AGE; }
0
@Override public int hashCode() { int result = benchmarkClass != null ? benchmarkClass.hashCode() : 0; result = 31 * result + (benchmarkMethod != null ? benchmarkMethod.hashCode() : 0); result = 31 * result + (heapMemoryFootprint != null ? heapMemoryFootprint.hashCode() : 0); result ...
6
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { DbfTable resultTable; DbfViewer dbfViewer; response.setCharacterEncoding("utf-8"); String file = request.getParameter("file"); String encoding; int recordsOnPage = 0; try{ ...
8
public static Stella_Object accessParametricTypeSpecifierSlotValue(ParametricTypeSpecifier self, Symbol slotname, Stella_Object value, boolean setvalueP) { if (slotname == Stella.SYM_STELLA_SPECIFIER_BASE_TYPE) { if (setvalueP) { self.specifierBaseType = ((Surrogate)(value)); } else { ...
6
@Override public void setAge(int age) { String methodName = Thread.currentThread().getStackTrace()[1].getMethodName(); /* save all arguments into an array */ Object[] args = new Object[]{age}; Class<?>[] argsType = new Class<?>[]{int.class}; try { super.invokeMethod(methodName, args, argsType); } cat...
5
public double getDouble(int index) throws JSONException { Object object = this.get(index); try { return object instanceof Number ? ((Number)object).doubleValue() : Double.parseDouble((String)object); } catch (Exception e) { throw new JSONEx...
2
@Test public void testOrdered() { // For reporting errors: an array of operations ArrayList<String> operations = new ArrayList<String>(); // Add a bunch of values for (int i = 0; i < 100; i++) { int rand = random.nextInt(1000); ints.add(rand); operations.add("ints.add("...
3
public void actionPerformed(ActionEvent e) { if (e.getSource() == this) { this.faceUp(); } else { // the faceUp() method has a delay so the user can see the card, then this code block executes selfTimer.stop(); Game.getThis().TimerRunning = false; // Keep track if Herobrine was revealed before ...
8
private void updateMinMax(Instance ex) { Instances insts = ex.relationalValue(1); for (int j = 0;j < m_Dimension; j++) { if (insts.attribute(j).isNumeric()){ for(int k=0; k < insts.numInstances(); k++){ Instance ins = insts.instance(k); if(!ins.isMissing(j)){ if (D...
7
public boolean hasNext() { if (index < ballContainer.getCount()) { return true; } else { return false; } }
1
public Result ValidarEdicionRol(Rol pRol) { StringBuilder sb = new StringBuilder(); sb.append((Common.IsMinorOrEqualsZero(pRol.getCodigoRol()))?".Código inválido\n":""); sb.append((Common.IsNullOrEmpty(pRol.getNombreRol()))?".Nombre inválido\n":""); sb.append((Common.IsN...
6
@Test public void testConnected() { assertThat(uf.connected(0, 1), is(false)); }
0
public void setSpeaker(final Speaker speaker) { this.speaker = speaker; }
0
@Override public void update() { if (!isRegistered) { isRegistered = true; pathID = TDPanel.registerPath(MonsterPath.getPatrol(patrolRad, (Point2D.Double) loc.clone())); } if (isFailing()) return; if (!isReloading()) { Mob closestMob = super.nextMob(); if (closestMob != null) { SoundEffect.B...
9
public static double[][] rref(double[][] mat) { double[][] rref = new double[mat.length][mat[0].length]; /* Copy matrix */ for (int r = 0; r < rref.length; ++r) { for (int c = 0; c < rref[r].length; ++c) { rref[r][c] = mat[r][c]; } } for (int p = ...
8
public void getInput(){ String userCommand; Scanner inFile = new Scanner(System.in); do { this.display(); userCommand = inFile.nextLine(); userCommand = userCommand.trim().toUpperCase(); switch (userCommand) ...
4
private Point[] drawSquare(Point center, double sideLength, Color color){ ArrayList<Point> changedPoints = new ArrayList<Point>(); int x = center.getX(); int y = center.getY(); if (sideLength == 0 && checkPointInBounds(center)){ board[x][y] = color; Point[] singl...
7
public static double[] doLinearRegression(double[][] args) //input double[0]=array of day number { //input double[1]=array of prices double[] answer = new double[3]; int n = 0; double[] x = new dou...
5
@Override public boolean okMessage(Environmental oking, CMMsg msg) { if((oking==null)||(!(oking instanceof MOB))) return super.okMessage(oking,msg); final MOB mob=(MOB)oking; if(msg.amITarget(mob) &&(((msg.sourceMajor()&CMMsg.MASK_MOVE)>0)||((msg.sourceMajor()&CMMsg.MASK_HANDS)>0))) { if(!msg.amI...
7
public Iterator<Land> iterator() { return laenderMap.values().iterator(); }
0
public String[] getColumnStr(int colNum) { int nRows = 0; int i = 0; String[] ret; if(colNum > 0){ try { //get amount of rows while(result.next()){ nRows ++; } //Check if there are more then 0 rows if(nRows == 0) return null; ret = new String[nRows]; //create the Stringarra...
5
public short[] assemble(Map<String, Integer> labelMap) { int op = 0; if (this.opcode.isExtended()) { op |= (this.opcode.getCode() & 0x3f) << 4; op |= (this.b.getRawValue() & 0x3f) << 10; if (this.b.getSize() > 0) { return new short[] { (short)op, this.b.getNumber(labelMap) }; } else { r...
4
public Component getListCellRendererComponent( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (value != null) { ComboBoxInterface it...
2
public JSONObject increment(String key) throws JSONException { Object value = this.opt(key); if (value == null) { this.put(key, 1); } else if (value instanceof Integer) { this.put(key, ((Integer)value).intValue() + 1); } else if (value instanceof Long) { ...
5
static private int jjMoveStringLiteralDfa10_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(8, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(9, active0, act...
7
@Override public void handleRequest(int request) { if (request == 3) { System.out.println("ConcreteHandlerC handleRequest " + request); } else if (mSuccessor != null) { mSuccessor.handleRequest(request); } }
2
private int findIndex(Object item){ int keyPosition = 0; for (int i = 0; i < numItems; i++) { if (items[i] != null && items[i].equals(item)){ keyPosition=i; } } return keyPosition; }
3
public static void main(String[] args) { String fileName = args[0]; int numCoefficient = Integer.parseInt(args[1]); // /*---------------Test DCT----------------*/ // imageReader _image = new imageReader(new File(fileName), 512, 512); // _image.ImageSetNormalColor(); // ...
0
private void dataMiningForProtonPatterns(){ ProtonPatternDetector protonPatternDetector; for(int startRow=0;startRow<get_rows()-protonPatternEncoder.getRows();startRow++){ for(int startColumn=0;startColumn<get_columns()-protonPatternEncoder.getColumns();startColumn++){ proton...
2
protected void verifyPossibleDenotationalTerm(CycObject cycObject) throws IllegalArgumentException { if (!(cycObject instanceof CycDenotationalTerm || cycObject instanceof CycList)) { throw new IllegalArgumentException("cycObject must be a Cyc denotational term " + cycObject.cyclify()); } }
2
@Override public Event createEvent(Event event) { Connection cn = null; PreparedStatement ps = null; ResultSet rs = null; try { cn = ConnectionHelper.getConnection(); ps = cn.prepareStatement(QTPL_INSERT_EVENT, new String[] { "event_id" })...
5
public static boolean isAnagramms(String str1, String str2){ if( str1 == null ){ return str2 == null ? true : false; } final int str1Length = str1.length(); final int str2Length = str2.length(); if( str1Length != str2Length ){ return false; } Map<Character, Integer> charsMap = new Ident...
9
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){ String command = cmd.getName(); if (command.equalsIgnoreCase("lteams")) { return onLteamsCommand(sender, cmd, label, args); } else if (command.equalsIgnoreCase("leave")) { return onLeaveCommand(sender, cmd, lab...
6
public void addQuizPermutation(String title,int quizId,ArrayList<String> imageList, ArrayList<Boolean> imageInventoryList,ArrayList<String> soundList, ArrayList<Boolean> soundInventoryList, int narration, String paragraphList, String preNote, String postNote, String goTo, int points, String date...
8
private static void comparableExanple() { NextGenericExample<Person> o = new NextGenericExample<>(); o.setInternal(new Person()); }
0
@Override protected Class<?> loadClass(String name, boolean resolve) { try { if ("offset.sim.Player".equals(name) || "offset.sim.Point".equals(name) || "offset.sim.Pair".equals(name) ||"offset.sim.movePair".equals(name)) return parent.loadClass(name); ...
6