rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
}
private static String[] parseCommandLine(String command) throws CoreException { List list = new ArrayList(10); int len = command.length(); int index = 0; while (index < len) { char ch = command.charAt(index); if (ch == '\'') { index++; ...
return this.nextBioEntry();
return this.nextRichSequence();
public BioEntry nextBioEntry() throws NoSuchElementException, BioException { return this.nextBioEntry(); }
System.out.println("Adding states");
public FlatModel(MarkovModel model) throws IllegalResidueException, IllegalAlphabetException { this.source = model; flat = new SimpleMarkovModel(model.heads(), model.emissionAlphabet()); // add all the states Map old2from = new HashMap(); Map old2to = new HashMap(); for(Iterator i = model.s...
if(s instanceof EmissionState) {
if(s instanceof DotState) { DotStateProxy dsw = new DotStateProxy(s, model, "." + s.getName()); old2from.put(s, dsw); old2to.put(s, dsw); flat.addState(dsw); System.out.println("Added " + dsw.getName()); } else if(s == model.magicalState()) { old2from.put(model.magicalState(), model.magicalState()); old2to.put(model.ma...
public FlatModel(MarkovModel model) throws IllegalResidueException, IllegalAlphabetException { this.source = model; flat = new SimpleMarkovModel(model.heads(), model.emissionAlphabet()); // add all the states Map old2from = new HashMap(); Map old2to = new HashMap(); for(Iterator i = model.s...
} else if(s instanceof DotState) { DotStateProxy dsw = new DotStateProxy(s, model, "." + s.getName()); old2from.put(s, dsw); old2to.put(s, dsw); flat.addState(dsw);
System.out.println("Added " + esw.getName());
public FlatModel(MarkovModel model) throws IllegalResidueException, IllegalAlphabetException { this.source = model; flat = new SimpleMarkovModel(model.heads(), model.emissionAlphabet()); // add all the states Map old2from = new HashMap(); Map old2to = new HashMap(); for(Iterator i = model.s...
} else if(s == model.magicalState()) { old2from.put(model.magicalState(), model.magicalState()); old2to.put(model.magicalState(), model.magicalState());
public FlatModel(MarkovModel model) throws IllegalResidueException, IllegalAlphabetException { this.source = model; flat = new SimpleMarkovModel(model.heads(), model.emissionAlphabet()); // add all the states Map old2from = new HashMap(); Map old2to = new HashMap(); for(Iterator i = model.s...
if(s instanceof StateWrapper) {
System.out.println("Processing transitions involving " + s.getName()); if(s instanceof MagicalState) { } else if(s instanceof StateProxy) { StateProxy sp = (StateProxy) s; State swrapped = sp.getWrappedState(); MarkovModel smod = sp.getSourceModel(); for(Iterator j = smod.transitionsFrom(swrapped).iterator(); j.hasNext...
public FlatModel(MarkovModel model) throws IllegalResidueException, IllegalAlphabetException { this.source = model; flat = new SimpleMarkovModel(model.heads(), model.emissionAlphabet()); // add all the states Map old2from = new HashMap(); Map old2to = new HashMap(); for(Iterator i = model.s...
createTransition(s, (State) old2to.get(twrapped));
flat.createTransition(s, (State) old2to.get(twrapped)); System.out.println( "Transition " + s.getName() + " -> " + ((State) old2to.get(twrapped)).getName() );
public FlatModel(MarkovModel model) throws IllegalResidueException, IllegalAlphabetException { this.source = model; flat = new SimpleMarkovModel(model.heads(), model.emissionAlphabet()); // add all the states Map old2from = new HashMap(); Map old2to = new HashMap(); for(Iterator i = model.s...
createTransition((State) old2from.get(twrapped), s);
flat.createTransition((State) old2from.get(twrapped), s); System.out.println( "Transition " + ((State) old2from.get(twrapped)).getName() + " -> " + s );
public FlatModel(MarkovModel model) throws IllegalResidueException, IllegalAlphabetException { this.source = model; flat = new SimpleMarkovModel(model.heads(), model.emissionAlphabet()); // add all the states Map old2from = new HashMap(); Map old2to = new HashMap(); for(Iterator i = model.s...
System.out.println("Done");
public FlatModel(MarkovModel model) throws IllegalResidueException, IllegalAlphabetException { this.source = model; flat = new SimpleMarkovModel(model.heads(), model.emissionAlphabet()); // add all the states Map old2from = new HashMap(); Map old2to = new HashMap(); for(Iterator i = model.s...
if(to instanceof StateProxy) {
if(to instanceof MagicalState) { to2 = to; } else if(to instanceof StateProxy) {
public double getTransitionScore(State from, State to) throws IllegalResidueException, IllegalTransitionException { stateAlphabet().validate(from); stateAlphabet().validate(to); if(!flat.containsTransition(from, to)) { throw new IllegalTransitionException(from, to, "Transition does not exist"); } ...
if(from instanceof StateProxy) {
if(from instanceof MagicalState) { from2 = from; } else if(from instanceof StateProxy) {
public double getTransitionScore(State from, State to) throws IllegalResidueException, IllegalTransitionException { stateAlphabet().validate(from); stateAlphabet().validate(to); if(!flat.containsTransition(from, to)) { throw new IllegalTransitionException(from, to, "Transition does not exist"); } ...
reference = refs[0];
reference = refs[refs.length-1];
Mail findParentMail(SubEthaMessage msg) throws UnknownParentException, MessagingException { // First try message id String inReplyTo = msg.getInReplyTo(); if (inReplyTo != null) { try { return this.dao.findMailByMessageId(inReplyTo); } catch (NotFoundException ex) {} } // Next try the first referenc...
public void delete() throws Exception
public void delete()
public void delete() throws Exception { String groupId[] = this.request.getParameterValues("group_id"); if (groupId == null) { this.list(); return; } List errors = new ArrayList(); GroupDAO gm = DataAccessDriver.getInstance().newGroupDAO(); for (int i = 0; i < groupId.length; i++) { int id = In...
public void edit() throws Exception
public void edit()
public void edit() throws Exception { int groupId = this.request.getIntParameter("group_id"); GroupDAO gm = DataAccessDriver.getInstance().newGroupDAO(); this.setTemplateName(TemplateKeys.GROUP_EDIT); this.context.put("group", gm.selectById(groupId)); this.context.put("groups", new TreeGroup().getNodes());...
public void editSave() throws Exception
public void editSave()
public void editSave() throws Exception { int groupId = this.request.getIntParameter("group_id"); Group g = new Group(); g.setDescription(this.request.getParameter("group_description")); g.setId(groupId); int parentId = this.request.getIntParameter("parent_id"); if (parentId == g.getId()) { parentId = 0...
public void insert() throws Exception
public void insert()
public void insert() throws Exception { this.context.put("groups", new TreeGroup().getNodes()); this.context.put("action", "insertSave"); this.context.put("selectedList", new ArrayList()); this.setTemplateName(TemplateKeys.GROUP_INSERT); }
public void insertSave() throws Exception
public void insertSave()
public void insertSave() throws Exception { GroupDAO gm = DataAccessDriver.getInstance().newGroupDAO(); Group g = new Group(); g.setDescription(this.request.getParameter("group_description")); g.setParentId(this.request.getIntParameter("parent_id")); g.setName(this.request.getParameter("group_name")); gm.ad...
public void list() throws Exception
public void list()
public void list() throws Exception { this.context.put("groups", new TreeGroup().getNodes()); this.setTemplateName(TemplateKeys.GROUP_LIST); }
public void permissions() throws Exception
public void permissions()
public void permissions() throws Exception { int id = this.request.getIntParameter("group_id"); PermissionControl pc = new PermissionControl(); pc.setRoles(DataAccessDriver.getInstance().newGroupSecurityDAO().loadRoles(id)); List sections = new XMLPermissionControl(pc).loadConfigurations( SystemGlobals.getV...
public void permissionsSave() throws Exception
public void permissionsSave()
public void permissionsSave() throws Exception { int id = this.request.getIntParameter("id"); GroupSecurityDAO gmodel = DataAccessDriver.getInstance().newGroupSecurityDAO(); PermissionControl pc = new PermissionControl(); pc.setSecurityModel(gmodel); new PermissionProcessHelper(pc, id).processData(); Secur...
int groundWidth = groundImage.getWidth(null); int geoundHeight = groundImage.getHeight(null); int dx = (getWidth() - groundWidth) / 2; int dy = (getHeight() - geoundHeight) / 2; g.drawImage(groundImage, dx, dy, groundWidth, geoundHeight, null);
g.drawImage(groundImage, dx, dy, groundWidth, groundHeight, null);
private void drawGround(Graphics2D g) { // Ground should not be drawn if (!drawGround) { g.setColor(Color.BLACK); g.fillRect(0, 0, battleField.getWidth(), battleField.getHeight()); } else { // Create pre-rendered ground image if it is not available if (groundImage == null) { createGroundImage(); } //...
offscreenGfx.scale(scale, scale);
private void initialize() { if (bufferStrategy == null) { createBufferStrategy(2); bufferStrategy = getBufferStrategy(); } // If we are scaled... if (getWidth() < battleField.getWidth() || getHeight() < battleField.getHeight()) { // Use the smaller scale. // Actually we don't need this, since // the Robo...
if (paintMode == PAINTROBOCODELOGO) {
switch (paintMode) { case PAINTROBOCODELOGO:
public void paint(Graphics g) { if (paintMode == PAINTROBOCODELOGO) { paintRobocodeLogo(g); } }
return; case PAINTBATTLE: { if (!initialized) { initialize(); } paintBattle(offscreenGfx); break; } } if (offscreenImage != null) { g.drawImage(offscreenImage, 0, 0, null);
public void paint(Graphics g) { if (paintMode == PAINTROBOCODELOGO) { paintRobocodeLogo(g); } }
g.setTransform(new AffineTransform());
public void paintBattle(Graphics2D g) { // Clear canvas g.setColor(CANVAS_BG_COLOR); g.fillRect(0, 0, getWidth(), getHeight()); // Calculate border space double dx = (getWidth() - scale * battleField.getWidth()) / 2; double dy = (getHeight() - scale * battleField.getHeight()) / 2; // Scale and translate the gra...
BufferedImage screenImage = new BufferedImage(battleField.getWidth(), battleField.getWidth(), BufferedImage.TYPE_INT_RGB); paint(screenImage.getGraphics()); encoder.encode(screenImage);
encoder.encode((BufferedImage) offscreenImage);
public void saveFrame(String fileName) { try { java.io.FileOutputStream o = new java.io.FileOutputStream(fileName); com.sun.image.codec.jpeg.JPEGImageEncoder encoder = com.sun.image.codec.jpeg.JPEGCodec.createJPEGEncoder(o); BufferedImage screenImage = new BufferedImage(battleField.getWidth(), battleField.getWi...
paintBattle(g);
paint(g);
public void showNextFrame() { try { if (robocodeFrame.isIconified() || (getWidth() <= 0) || (getHeight() <= 0)) { return; } if (!initialized) { initialize(); } Graphics2D g = (Graphics2D) bufferStrategy.getDrawGraphics(); paintBattle(g); g.dispose(); // Flush the buffer to the main graphics ...
while (currentNode!=root&&currentNode.suffixLink==null)
while (currentNode!=root&&currentNode.suffixLink==null&&canLinkJump)
private void addPreppedSequence(String seq){ int i, gammaStart; int j=0; SuffixNode oldNode=null, newNode; SuffixNode currentNode; //Puts i at the end of the previous sequences i = sequences.length(); j=i; sequences= sequences.toString()+seq.toString(); currentNode = root; //phase i f...
if (root==currentNode){ currentNode=jumpTo(root,sequences,j,i+1); }else{ if (canLinkJump) currentNode = currentNode.suffixLink; gammaStart = j+getPathLength(currentNode);
private void addPreppedSequence(String seq){ int i, gammaStart; int j=0; SuffixNode oldNode=null, newNode; SuffixNode currentNode; //Puts i at the end of the previous sequences i = sequences.length(); j=i; sequences= sequences.toString()+seq.toString(); currentNode = root; //phase i f...
if (root==currentNode) currentNode=walkTo(root,sequences,j,i+1); else{ currentNode = currentNode.suffixLink; gammaStart = j+getPathLength(currentNode); if (gammaStart>=sequences.length()){ System.out.println(gammaStart+" "+j+" "+i); System.out.println(currentNode.labelStart+" "+currentNode.labelEnd+" "+e); } currentNo...
currentNode = jumpTo(currentNode,sequences,gammaStart,i+1);
private void addPreppedSequence(String seq){ int i, gammaStart; int j=0; SuffixNode oldNode=null, newNode; SuffixNode currentNode; //Puts i at the end of the previous sequences i = sequences.length(); j=i; sequences= sequences.toString()+seq.toString(); currentNode = root; //phase i f...
break; }
canLinkJump=false; break; }else canLinkJump=true;
private void addPreppedSequence(String seq){ int i, gammaStart; int j=0; SuffixNode oldNode=null, newNode; SuffixNode currentNode; //Puts i at the end of the previous sequences i = sequences.length(); j=i; sequences= sequences.toString()+seq.toString(); currentNode = root; //phase i f...
int number = getAllNodes(root, null, false).size();
private void doRule2(SuffixNode parent, int splittingPos, int suffixStart){ int number = getAllNodes(root, null, false).size(); SuffixNode leaf = new SuffixNode (parent, suffixStart); parent.children.put(new Character(sequences.charAt(splittingPos)), leaf); //System.out.println("rule 2: "+sequences.charAt...
int number = getAllNodes(root, null, false).size();
private SuffixNode doRule3(SuffixNode child, int splittingPos, int suffixStart){// return toBeSplit.splitEdge(endOfSubSeq, sequences.charAt(endOfSubSeq),// toBeSplit.getStart()+endOfSubSeq-rule3Position,// suffixStart); int number = getAllNodes(root, null, false).size(); SuffixNode parent...
boolean canGoDown = true; int edgeLength;
String edgeLabel;
public SuffixNode walkTo(SuffixNode starting, String source, int from, int to){ SuffixNode currentNode; SuffixNode arrivedAt; boolean canGoDown = true; int edgeLength; currentNode=starting; arrivedAt=starting; rule=0; if (from==to){ rule=5; return starting; } while (canGoDown){...
rule=0; if (from==to){ rule=5; return starting; } while (canGoDown){ if (currentNode.isTerminal()) System.out.println("ARRGH!");
while (from<to){
public SuffixNode walkTo(SuffixNode starting, String source, int from, int to){ SuffixNode currentNode; SuffixNode arrivedAt; boolean canGoDown = true; int edgeLength; currentNode=starting; arrivedAt=starting; rule=0; if (from==to){ rule=5; return starting; } while (canGoDown){...
canGoDown=false;
from=to;
public SuffixNode walkTo(SuffixNode starting, String source, int from, int to){ SuffixNode currentNode; SuffixNode arrivedAt; boolean canGoDown = true; int edgeLength; currentNode=starting; arrivedAt=starting; rule=0; if (from==to){ rule=5; return starting; } while (canGoDown){...
edgeLength = getEdgeLength(arrivedAt); if (edgeLength>=to-from){ int before = currentNode.labelEnd+to-from+1; int after = getPathEnd(arrivedAt)-getEdgeLength(arrivedAt)+to-from-1; if (sequences.charAt(after)== source.charAt(to-1)){ if (getEdgeLength(arrivedAt)==to-from){ if (arrivedAt.isTerminal()) rule=1; else rule=5;...
edgeLabel = getEdgeLabel(arrivedAt); if (edgeLabel.length()>=to-from){ if (edgeLabel.equals(source.substring(from,to))){ if (arrivedAt.isTerminal()) rule=1; else rule=5; } if (edgeLabel.substring(0, to-from).equals(source.substring(from,to))) rule=4; else rule=3; from=to; } else if (source.substring(from,from+edgeLabe...
public SuffixNode walkTo(SuffixNode starting, String source, int from, int to){ SuffixNode currentNode; SuffixNode arrivedAt; boolean canGoDown = true; int edgeLength; currentNode=starting; arrivedAt=starting; rule=0; if (from==to){ rule=5; return starting; } while (canGoDown){...
from+=edgeLength; currentNode=arrivedAt; }
else{ rule=3; from=to; } }
public SuffixNode walkTo(SuffixNode starting, String source, int from, int to){ SuffixNode currentNode; SuffixNode arrivedAt; boolean canGoDown = true; int edgeLength; currentNode=starting; arrivedAt=starting; rule=0; if (from==to){ rule=5; return starting; } while (canGoDown){...
viterbiPrepareCol(0, 0); initializationHack = false;
public StatePath runViterbi(ResidueList seq0, ResidueList seq1) throws IllegalResidueException, IllegalAlphabetException, IllegalTransitionException { states = getStates(); cursor = new LightPairDPCursor(seq0, seq1, states.length, true); alpha = (CrossProductAlphabet) getModel().emissionAlphabet(); // Fo...
double[] curCol = (double[]) matrix[0][0]; int[] advance; BackPointer[] curBPs = bpMatrix[0][0]; for (int l = 0; l < states.length; ++l) {
double[] curCol = (double[]) matrix[0][0]; int[] advance; BackPointer[] curBPs = bpMatrix[0][0]; for (int l = 0; l < states.length; ++l) { if (initializationHack && states[l] == magicalState) { continue; }
private void viterbiCalcStepMatrix() throws IllegalResidueException, IllegalAlphabetException, IllegalTransitionException { double[] curCol = (double[]) matrix[0][0]; int[] advance; BackPointer[] curBPs = bpMatrix[0][0]; for (int l = 0; l < states.length; ++l) { // System.out.println("State = " + states[l].g...
if (states[l] instanceof EmissionState) advance = ((EmissionState) states[l]).getAdvance(); else advance = ia00;
if (states[l] instanceof EmissionState) { advance = ((EmissionState) states[l]).getAdvance(); } else { advance = ia00; }
private void viterbiCalcStepMatrix() throws IllegalResidueException, IllegalAlphabetException, IllegalTransitionException { double[] curCol = (double[]) matrix[0][0]; int[] advance; BackPointer[] curBPs = bpMatrix[0][0]; for (int l = 0; l < states.length; ++l) { // System.out.println("State = " + states[l].g...
return new SimpleFeatureHolder();
return FeatureHolder.EMPTY_FEATURE_HOLDER;
public FeatureHolder filter(FeatureFilter ff, boolean recurse) { if(featureHolderAllocated()) return getFeatureHolder().filter(ff, recurse); return new SimpleFeatureHolder(); }
private void mkdirs( ChannelSftp channel, String dir )
private void mkdirs( ChannelSftp channel, String resourceName )
private void mkdirs( ChannelSftp channel, String dir ) throws TransferFailedException, SftpException { String[] dirs = PathUtils.dirnames( dir ); for ( int i = 0; i < dirs.length; i++ ) { try { SftpATTRS attrs = channel.stat( dirs[i] ); ...
String[] dirs = PathUtils.dirnames( dir );
String[] dirs = PathUtils.dirnames( resourceName );
private void mkdirs( ChannelSftp channel, String dir ) throws TransferFailedException, SftpException { String[] dirs = PathUtils.dirnames( dir ); for ( int i = 0; i < dirs.length; i++ ) { try { SftpATTRS attrs = channel.stat( dirs[i] ); ...
throw new TransferFailedException( "Remote path is not a directory:" + dir );
throw new TransferFailedException( "Remote path is not a directory:" + PathUtils.dirname( resourceName ) );
private void mkdirs( ChannelSftp channel, String dir ) throws TransferFailedException, SftpException { String[] dirs = PathUtils.dirnames( dir ); for ( int i = 0; i < dirs.length; i++ ) { try { SftpATTRS attrs = channel.stat( dirs[i] ); ...
mkdirs( channel, dir );
mkdirs( channel, resourceName );
public void put( File source, String resourceName ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { String basedir = getRepository().getBasedir(); resourceName = StringUtils.replace( resourceName, "\\", "/" ); String dir = PathUtils.dirname( res...
recipients = null;
recipients.clear();
public void reset() { verbose = false; esmtp = false; sender = null; recipients = null; messageLines.clear(); dataMode = false; }
this.saveSeqAnno(); StringTokenizer lineTokens = new StringTokenizer(line); headerTag = lineTokens.nextToken(); headerTagText = new StringBuffer(lineTokens.nextToken()); this.saveSeqAnno(); headerTag = GenbankFormat.SIZE_TAG; headerTagText = new StringBuffer(lineTokens.nextToken()); lineTokens.nextToken(); if(line...
if (line.length() < 73) { throw new ParseException("LOCUS line too short [" + line + "]"); } saveSeqAnno2(GenbankFormat.LOCUS_TAG, line.substring(12, 22)); saveSeqAnno2(GenbankFormat.SIZE_TAG, line.substring(22, 29)); saveSeqAnno2(GenbankFormat.STRAND_NUMBER_TAG, line.substring(33, 35)); saveSeqAnno2(GenbankFormat.TYP...
private void processHeaderLine(String line) throws ParseException { if(line.startsWith(GenbankFormat.LOCUS_TAG)) { // the LOCUS line is a special case because it contains the // locus, size, molecule type, GenBank division, and the date // of last modificatio...
CReferenceType mixinType = context.getTypeFactory().createType(node.getMixin().getQualifiedImplName().toString(), false); mixinType = (CReferenceType)mixinType.checkType(context); CClass mixinClass = mixinType.getCClass();
CClass mixinClass = context.getClassReader().loadClass( context.getTypeFactory(), node.getMixin().getQualifiedImplName().toString() );
public CClass generateCClass(JavaTypeNode node, CContext context) { // CTODO we need binary/source flag for CaesarTypeNode // for now consider everything as non-binary try { if(node.getParent() == null) { return context.getTypeFa...
CReferenceType interfaces[] = new CReferenceType[]{mixinClass.getAbstractType()};
CReferenceType interfaces[] = new CReferenceType[]{mixinIfcClass.getAbstractType()};
public CClass generateCClass(JavaTypeNode node, CContext context) { // CTODO we need binary/source flag for CaesarTypeNode // for now consider everything as non-binary try { if(node.getParent() == null) { return context.getTypeFa...
value = new String(ch) ;
value = new String(ch, start, length) ;
public void characters(char[] ch, int start, int length) throws SAXException { value = new String(ch) ; }
public final int viewToSource(int indx) throws IndexOutOfBoundsException { if(indx < 1 || indx > length()) { throw new IndexOutOfBoundsException( "Attempted to address sequence (1.." + length() + ") at " + indx ); } int j = findViewBlock(indx); if(j < 0) { int nj = -j-1; if(nj < blocks.size()) { Block b = (Block) bloc...
protected final int viewToSource(Block b, int indx) { return indx - b.viewStart + b.sourceStart;
public final int viewToSource(int indx) throws IndexOutOfBoundsException { if(indx < 1 || indx > length()) { throw new IndexOutOfBoundsException( "Attempted to address sequence (1.." + length() + ") at " + indx ); } int j = findViewBlock(indx); if(j < 0) { int nj = -j-1; //Syst...
structure = struct ; current_model_pos = 0 ; current_chain_pos = 0 ;
structure = struct ; chain = null ; current_model_pos = 0 ; current_chain_pos = 0 ;
public GroupIterator (Structure struct) { structure = struct ; current_model_pos = 0 ; current_chain_pos = 0 ; current_group_pos = -1 ; }
private Structure getStructure(){ return structure; };
private Structure getStructure() { return structure ;}
private Structure getStructure(){ return structure; };
return (int) (gPos / scale) + 1;
return ((int) (gPos / scale)) + 1;
public int graphicsToSequence(double gPos) { return (int) (gPos / scale) + 1; }
double maxAcross = sequenceToGraphics(range.getMax()) +
double maxAcross = sequenceToGraphics(range.getMax()) + 1 +
public void paintComponent(Graphics g) { if(!isActive()) { return; } Graphics2D g2 = (Graphics2D) g; Rectangle2D currentClip = g2.getClip().getBounds2D(); double minAcross = sequenceToGraphics(range.getMin()) - renderer.getMinimumLeader(this, range); double maxAcross =...
g2.setTransform(oldTransform);
public void paintComponent(Graphics g) { if(!isActive()) { return; } Graphics2D g2 = (Graphics2D) g; Rectangle2D currentClip = g2.getClip().getBounds2D(); double minAcross = sequenceToGraphics(range.getMin()) - renderer.getMinimumLeader(this, range); double maxAcross =...
return ((double) (seqPos-1) * scale);
return ((double) (seqPos-1)) * scale;
public double sequenceToGraphics(int seqPos) { return ((double) (seqPos-1) * scale); }
ifcDecl.join(context);
public void createImplicitCaesarTypes(CContext context) throws PositionedError { JavaQualifiedName qualifiedName = new JavaQualifiedName( getMixinIfcDeclaration().getCClass().getQualifiedName() ); CaesarTypeSystem typeSystem = context.getEnvironment().getCa...
iconFilePath = getClass().getResource("/resources/icons/largeicon.jpg").getFile();
iconURL = getClass().getResource("/resources/icons/largeicon.jpg");
public AboutBox(Frame owner, RobocodeManager manager) { super(owner); robocodeVersion = manager.getVersionManager().getVersion(); iconFilePath = getClass().getResource("/resources/icons/largeicon.jpg").getFile(); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); setTitle("About Robocode"); setContentP...
htmlText = HTML_TEMPLATE.replaceAll(TAG_ROBOCODE_VERSION, robocodeVersion).replaceAll(TAG_ROBOCODE_ICON_SRC, "file:
htmlText = HTML_TEMPLATE.replaceAll(TAG_ROBOCODE_VERSION, robocodeVersion).replaceAll(TAG_ROBOCODE_ICON_SRC, iconURL.toString()).replaceAll(TAG_SYSCOLOR_CTRL_HIGHLIGHT, toHtmlColor(BG_COLOR)).replaceAll(TAG_JAVA_VERSION, System.getProperty("java.version")).replaceAll(
private String getHtmlText() { if (htmlText == null) { htmlText = HTML_TEMPLATE.replaceAll(TAG_ROBOCODE_VERSION, robocodeVersion).replaceAll(TAG_ROBOCODE_ICON_SRC, "file://" + iconFilePath).replaceAll(TAG_SYSCOLOR_CTRL_HIGHLIGHT, toHtmlColor(BG_COLOR)).replaceAll(TAG_JAVA_VERSION, System.getProperty("java.version")...
if (verbose) System.out.println("Leistung des zufaelligen Mechanismus. P = " + unbek[0]);
double[][] getVerschobeneLage() { assert fertigberechnet: "ERROR: Call clMechanismus.rechnen() first."; if (!INSTABIL_KEIN_GLGEW) { assert false; return null; } // Finden der Parameter (d.h. Freiheitsgrade), welche eine virt. Leistung verursachen, // d.h. das...
System.out.println("Anzahl Freiheitsgrade: " +solver.getAnzUnbestParam());
private boolean rMechanismen() { // 1.) Überprüfen, ob Einzelknoten existiert, der das Glgew. verletzt. // nötig, da anschliessende Ber. davon ausgeht, dass alle Knoten durch Stäbe verbunden sind, // oder zumindest ein Lager haben. for (int kni = 1; kni < Top.length; kni++) { ...
Symbol[] syms = new Symbol[ll.size()]; ll.toArray(syms);
Symbol[] syms = new Symbol[l.size()]; l.toArray(syms);
private static final SymbolList generateOrderNSymbolList(OrderNDistribution d, int length){ SymbolList sl = null; List l = new ArrayList(length); /* * When emitting an orderN sequence a seed sequence is required that is of the * length of the conditioning alphabet. The emissions will also be allowed ...
resource.setContentLength( source.length() ); resource.setLastModified( source.lastModified() );
protected void putTransfer( Resource resource, File source, OutputStream output, boolean closeOutput ) throws TransferFailedException { firePutStarted( resource, source ); InputStream input = null; try { input = new FileInputStream( source ); transfer( res...
tpsLabel = new JLabel("" + getTpsSlider().getValue());
int tps = getTpsSlider().getValue(); if (tps > 200) { tps = 10000; } tpsLabel = new JLabel("" + tps);
public JLabel getTpsLabel() { if (tpsLabel == null) { tpsLabel = new JLabel("" + getTpsSlider().getValue()); } return tpsLabel; }
tpsSlider = new JSlider(0, 200, props.getOptionsBattleDesiredTPS());
int tps = Math.max(props.getOptionsBattleDesiredTPS(), 1); if (tps > 200) { tps = 201; } tpsSlider = new JSlider(1, 201, tps);
public JSlider getTpsSlider() { if (tpsSlider == null) { RobocodeProperties props = manager.getProperties(); tpsSlider = new JSlider(0, 200, props.getOptionsBattleDesiredTPS()); tpsSlider.addChangeListener(eventHandler); props.addPropertyListener(props.new PropertyListener() { public void desiredTpsChan...
;
public JSlider getTpsSlider() { if (tpsSlider == null) { RobocodeProperties props = manager.getProperties(); tpsSlider = new JSlider(0, 200, props.getOptionsBattleDesiredTPS()); tpsSlider.addChangeListener(eventHandler); props.addPropertyListener(props.new PropertyListener() { public void desiredTpsChan...
public void pauseResumeButtonActionPerformed() {
private void pauseResumeButtonActionPerformed() {
public void pauseResumeButtonActionPerformed() { if (getPauseResumeButton().getText().equals("Pause/Debug")) { getPauseResumeButton().setText("Resume"); getPauseResumeButton().setMnemonic('e'); getPauseResumeButton().setDisplayedMnemonicIndex(1); getNextTurnButton().setVisible(true); manager.getBattleManage...
alignment
alignment, new SmallAnnotation()
public void endSubHit() { super.addSubHitProperty( SEARCH_SUB_HIT, new SimpleSeqSimilaritySearchSubHit( score, eValue, pValue, Math.min(queryStart, queryEnd), Math.max(queryStart, queryEnd), queryStrand, Math.min(subjectStart, subjectEnd), Math.max(subjectStart, subjectEnd), subjectS...
throw new IOException("Symbol in serialized stream can't be found in the alphabet");
throw new IOException("Symbol in serialized stream: "+swm[m].symbol.getName()+" can't be found in the alphabet");
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); indexer = AlphabetManager.getAlphabetIndex(alpha); indexer.addChangeListener( new ChangeAdapter(){ public void preChange(ChangeEvent ce) throws ChangeVetoException{ ...
List users = new ArrayList();
List recipients = new ArrayList();
public List listRecipients() throws Exception { String query = SystemGlobals.getSql("SummaryDAO.selectAllRecipients"); PreparedStatement p = JForum.getConnection().prepareStatement(query); List users = new ArrayList(); ResultSet rs = p.executeQuery(); while (rs.next()) { User user = new User(); user.setUserna...
while (rs.next()) { User user = new User(); user.setUsername(rs.getString("username")); user.setEmail(rs.getString("user_email")); users.add(user);
while (rs.next()) { recipients.add(rs.getString("username"));
public List listRecipients() throws Exception { String query = SystemGlobals.getSql("SummaryDAO.selectAllRecipients"); PreparedStatement p = JForum.getConnection().prepareStatement(query); List users = new ArrayList(); ResultSet rs = p.executeQuery(); while (rs.next()) { User user = new User(); user.setUserna...
return users;
return recipients;
public List listRecipients() throws Exception { String query = SystemGlobals.getSql("SummaryDAO.selectAllRecipients"); PreparedStatement p = JForum.getConnection().prepareStatement(query); List users = new ArrayList(); ResultSet rs = p.executeQuery(); while (rs.next()) { User user = new User(); user.setUserna...
log.debug("AppendFooterFilter: onSendAfterAttaching()");
if (log.isDebugEnabled()) log.debug("AppendFooterFilter: onSend()");
public void onSend(SubEthaMessage msg, SendFilterContext ctx) throws IgnoreException, MessagingException { log.debug("AppendFooterFilter: onSendAfterAttaching()"); Object obj; try { obj = msg.getContent(); if (obj instanceof String) { ctx.expand((String)obj); } msg.setContent(obj, "text/ascii"); } ...
Object obj;
public void onSend(SubEthaMessage msg, SendFilterContext ctx) throws IgnoreException, MessagingException { log.debug("AppendFooterFilter: onSendAfterAttaching()"); Object obj; try { obj = msg.getContent(); if (obj instanceof String) { ctx.expand((String)obj); } msg.setContent(obj, "text/ascii"); } ...
obj = msg.getContent();
String footerContent = (String) ctx.getArgument(ARG_FOOTER); String expandedFooter = ctx.expand(footerContent); Object obj = msg.getContent();
public void onSend(SubEthaMessage msg, SendFilterContext ctx) throws IgnoreException, MessagingException { log.debug("AppendFooterFilter: onSendAfterAttaching()"); Object obj; try { obj = msg.getContent(); if (obj instanceof String) { ctx.expand((String)obj); } msg.setContent(obj, "text/ascii"); } ...
ctx.expand((String)obj);
String tmp = (String)obj + expandedFooter; msg.setText(tmp);
public void onSend(SubEthaMessage msg, SendFilterContext ctx) throws IgnoreException, MessagingException { log.debug("AppendFooterFilter: onSendAfterAttaching()"); Object obj; try { obj = msg.getContent(); if (obj instanceof String) { ctx.expand((String)obj); } msg.setContent(obj, "text/ascii"); } ...
msg.setContent(obj, "text/ascii");
else if (obj instanceof MimeMultipart) { MimeMultipart tmp = (MimeMultipart)obj; MimeBodyPart part = new MimeBodyPart(); part.setText(expandedFooter); tmp.addBodyPart(part, tmp.getCount()); msg.setContent(tmp); } else { if (log.isDebugEnabled()) log.debug("Don't know type of content for message"); }
public void onSend(SubEthaMessage msg, SendFilterContext ctx) throws IgnoreException, MessagingException { log.debug("AppendFooterFilter: onSendAfterAttaching()"); Object obj; try { obj = msg.getContent(); if (obj instanceof String) { ctx.expand((String)obj); } msg.setContent(obj, "text/ascii"); } ...
if (log.isDebugEnabled()) log.debug(e);
public void onSend(SubEthaMessage msg, SendFilterContext ctx) throws IgnoreException, MessagingException { log.debug("AppendFooterFilter: onSendAfterAttaching()"); Object obj; try { obj = msg.getContent(); if (obj instanceof String) { ctx.expand((String)obj); } msg.setContent(obj, "text/ascii"); } ...
(o instanceof And) && (((And) o).getChild1() == this.getChild1()) && (((And) o).getChild2() == this.getChild2());
(o instanceof And) && (( ((And) o).getChild1().equals(this.getChild1()) && ((And) o).getChild2().equals(this.getChild2()) ) || ( ((And) o).getChild1().equals(this.getChild2()) && ((And) o).getChild2().equals(this.getChild1()) ));
public boolean equals(Object o) { return (o instanceof And) && (((And) o).getChild1() == this.getChild1()) && (((And) o).getChild2() == this.getChild2()); }
return "And(" + c1.toString() + " , " + c2.toString() + ")";
return "And(" + c1 + " , " + c2 + ")";
public String toString() { return "And(" + c1.toString() + " , " + c2.toString() + ")"; }
(((And) o).getChild1() == this.getChild1()) && (((And) o).getChild2() == this.getChild2());
(((AndNot) o).getChild1().equals(this.getChild1())) && (((AndNot) o).getChild2().equals(this.getChild2()));
public boolean equals(Object o) { return (o instanceof AndNot) && (((And) o).getChild1() == this.getChild1()) && (((And) o).getChild2() == this.getChild2()); }
return "And(" + c1.toString() + " , Not(" + c2.toString() + "))";
return "AndNot(" + c1 + " , " + c2 + ")";
public String toString() { return "And(" + c1.toString() + " , Not(" + c2.toString() + "))"; }
(((ByAnnotation) o).getKey() == this.getKey()) && (((ByAnnotation) o).getValue() == this.getValue());
(((ByAnnotation) o).getKey().equals(this.getKey())) && (((ByAnnotation) o).getValue().equals(this.getValue()));
public boolean equals(Object o) { return (o instanceof ByAnnotation) && (((ByAnnotation) o).getKey() == this.getKey()) && (((ByAnnotation) o).getValue() == this.getValue()); }
(((BySource) o).getSource() == this.getSource());
(((BySource) o).getSource().equals(this.getSource()));
public boolean equals(Object o) { return (o instanceof BySource) && (((BySource) o).getSource() == this.getSource()); }
(((ByType) o).getType() == this.getType());
(((ByType) o).getType().equals(this.getType()));
public boolean equals(Object o) { return (o instanceof ByType) && (((ByType) o).getType() == this.getType()); }
(((ContainedByLocation) o).getLocation() == this.getLocation());
(((ContainedByLocation) o).getLocation().equals(this.getLocation()));
public boolean equals(Object o) { return (o instanceof ContainedByLocation) && (((ContainedByLocation) o).getLocation() == this.getLocation()); }
return "ContainedBy(" + loc.toString() + ")";
return "ContainedBy(" + loc + ")";
public String toString() { return "ContainedBy(" + loc.toString() + ")"; }
(((HasAnnotation) o).getKey() == this.getKey());
(((HasAnnotation) o).getKey().equals(this.getKey()));
public boolean equals(Object o) { return (o instanceof HasAnnotation) && (((HasAnnotation) o).getKey() == this.getKey()); }
(((Not) o).getChild() == this.getChild());
(((Not) o).getChild().equals(this.getChild()));
public boolean equals(Object o) { return (o instanceof Not) && (((Not) o).getChild() == this.getChild()); }
return "Not(" + child.toString() + ")";
return "Not(" + child + ")";
public String toString() { return "Not(" + child.toString() + ")"; }
(o instanceof Or) && (((Or) o).getChild1() == this.getChild1()) && (((Or) o).getChild2() == this.getChild2());
(o instanceof Or) && (( ((Or) o).getChild1().equals(this.getChild1()) && ((Or) o).getChild2().equals(this.getChild2()) ) || ( ((Or) o).getChild1().equals(this.getChild2()) && ((Or) o).getChild2().equals(this.getChild1()) ));
public boolean equals(Object o) { return (o instanceof Or) && (((Or) o).getChild1() == this.getChild1()) && (((Or) o).getChild2() == this.getChild2()); }
return "Or(" + c1.toString() + " , " + c2.toString() + ")";
return "Or(" + c1 + " , " + c2 + ")";
public String toString() { return "Or(" + c1.toString() + " , " + c2.toString() + ")"; }
(((OverlapsLocation) o).getLocation() == this.getLocation());
(((OverlapsLocation) o).getLocation().equals(this.getLocation()));
public boolean equals(Object o) { return (o instanceof OverlapsLocation) && (((OverlapsLocation) o).getLocation() == this.getLocation()); }
return "Overlaps(" + loc.toString() + ")";
return "Overlaps(" + loc + ")";
public String toString() { return "Overlaps(" + loc.toString() + ")"; }
lblTitle.setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(3, 3, 3, 3)));
lblTitle.setBorder(javax.swing.BorderFactory.createEmptyBorder(3, 3, 3, 3));
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; lblTitle = new javax.swing.JLabel(); pnlContents = new javax.swing.JPanel(); tpInstructions = new javax.swing.JTextPane(); pnlAlbumTitleOption = new javax.swing.JPanel(); lblAlbumTitle = new jav...
taAlbumDescription.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0)));
taAlbumDescription.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; lblTitle = new javax.swing.JLabel(); pnlContents = new javax.swing.JPanel(); tpInstructions = new javax.swing.JTextPane(); pnlAlbumTitleOption = new javax.swing.JPanel(); lblAlbumTitle = new jav...
coOutLanguage.setModel(new javax.swing.DefaultComboBoxModel(new Locale[] { Locale.ITALIAN, Locale.ENGLISH }));
coOutLanguage.setModel(new DefaultComboBoxModel( Constants.listLocaleForOutput ));
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; lblTitle = new javax.swing.JLabel(); pnlContents = new javax.swing.JPanel(); tpInstructions = new javax.swing.JTextPane(); pnlAlbumTitleOption = new javax.swing.JPanel(); lblAlbumTitle = new jav...