rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public Category selectById(int categoryId) throws Exception;
public Category selectById(int categoryId);
public Category selectById(int categoryId) throws Exception;
public void delete(int categoryId) throws Exception;
public void delete(int categoryId);
public void delete(int categoryId) throws Exception;
public void update(Category category) throws Exception;
public void update(Category category);
public void update(Category category) throws Exception;
public void setForumsModerationStatus(Category c, boolean status) throws Exception
public void setForumsModerationStatus(Category c, boolean status)
public void setForumsModerationStatus(Category c, boolean status) throws Exception { for (Iterator iter = c.getForums().iterator(); iter.hasNext(); ) { Forum f = (Forum)iter.next(); if (f.isModerated() != c.isModerated()) { f.setModerated(c.isModerated()); this.setTopicModerationStatus(f.getId(), c.isModera...
public int addNew(Category category) throws Exception;
public int addNew(Category category);
public int addNew(Category category) throws Exception;
public void setOrderUp(Category category, Category otherCategory) throws Exception;
public void setOrderUp(Category category, Category otherCategory);
public void setOrderUp(Category category, Category otherCategory) throws Exception;
public void setOrderDown(Category category, Category otherCategory) throws Exception;
public void setOrderDown(Category category, Category otherCategory);
public void setOrderDown(Category category, Category otherCategory) throws Exception;
FlatModel flat; if(model instanceof FlatModel) { flat = (FlatModel) model; } else { flat = new FlatModel(model); }
MarkovModel flat = DP.flatView(model);
public static DP createDP(MarkovModel model) throws Exception { int heads = model.heads(); FlatModel flat; if(model instanceof FlatModel) { flat = (FlatModel) model; } else { flat = new FlatModel(model); } if(heads == 1) { return new SingleDP(flat); } else if(heads == 2) { re...
public SingleDP(FlatModel flat)
public SingleDP(MarkovModel flat)
public SingleDP(FlatModel flat) throws IllegalResidueException, IllegalTransitionException { super(flat); }
int x, y; x = (int) c.getX(); y = battle.getBattleField().getHeight() - (int) c.getY(); AffineTransform at = AffineTransform.getTranslateInstance(x, y);
private void drawRobots(Graphics2D g) { RobotPeer c; for (int i = 0; i < battle.getRobots().size(); i++) { c = (RobotPeer) battle.getRobots().elementAt(i); int x, y; x = (int) c.getX(); y = battle.getBattleField().getHeight() - (int) c.getY(); AffineTransform at = AffineTransform.getTranslateInstance(x, y)...
} else {
} } for (int i = 0; i < battle.getRobots().size(); i++) { c = (RobotPeer) battle.getRobots().elementAt(i); if (!c.isDead()) { int x = (int) c.getX(); int y = battle.getBattleField().getHeight() - (int) c.getY(); AffineTransform at = AffineTransform.getTranslateInstance(x, y); at.rotate(c.getHeading());
private void drawRobots(Graphics2D g) { RobotPeer c; for (int i = 0; i < battle.getRobots().size(); i++) { c = (RobotPeer) battle.getRobots().elementAt(i); int x, y; x = (int) c.getX(); y = battle.getBattleField().getHeight() - (int) c.getY(); AffineTransform at = AffineTransform.getTranslateInstance(x, y)...
at.rotate(c.getHeading());
private void drawRobots(Graphics2D g) { RobotPeer c; for (int i = 0; i < battle.getRobots().size(); i++) { c = (RobotPeer) battle.getRobots().elementAt(i); int x, y; x = (int) c.getX(); y = battle.getBattleField().getHeight() - (int) c.getY(); AffineTransform at = AffineTransform.getTranslateInstance(x, y)...
setBackground(CANVAS_BG_COLOR); g.clearRect(0, 0, getWidth(), getHeight());
g.setColor(CANVAS_BG_COLOR); g.fillRect(0, 0, getWidth(), getHeight());
public void paintBattle(Graphics2D g) { // Clear canvas setBackground(CANVAS_BG_COLOR); g.clearRect(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...
pointcut.resolve(new CaesarScope(classContext, caller));
pointcut.resolve(new CaesarPointcutScope(classContext, caller));
public void createAttribute( CContext context, CClass caller, JFormalParameter[] formalParameters, TokenReference tokenReference, int orderNr) { List formalBindings = new ArrayList(); //bind parameters for (int i = 0; i < parameters.length; i++) { if (!formalParameters[i].isGenerated()) { formalBind...
String index[] = new String(hlsc.fetch(new FreenetURI(uri)).asByteArray()).trim().split("\n");
FreenetURI u = new FreenetURI(uri); FetchResult res; while(true) { try { res = hlsc.fetch(u); break; } catch (FetchException e) { if(e.newURI != null) u = e.newURI; } } String index[] = new String(res.asByteArray()).trim().split("\n");
private HashMap getFullIndex(String uri) throws Exception { HighLevelSimpleClient hlsc = pr.getHLSimpleClient(); String index[] = new String(hlsc.fetch(new FreenetURI(uri)).asByteArray()).trim().split("\n"); Vector uris = new Vector(); HashMap keywords = new HashMap(); int i; URIWrapper uriw = new URIWrapper...
HashSet keyuris = (HashSet)index.get(searchWords[i].toLowerCase().trim());
Vector keyuris = (Vector)index.get(searchWords[i].toLowerCase().trim());
public String handleHTTPGet(HTTPRequest request) throws PluginHTTPException { StringBuffer out = new StringBuffer(); //int page = request.getIntParam("page", 1); String indexuri = request.getParam("index", DEFAULT_INDEX_URI); String search = request.getParam("search"); if (search.equals("")) { appendDefaultPa...
Set features = new TreeSet();
public void removeFeature(Feature f) throws ChangeVetoException, BioException { Set features = new TreeSet(); for (Iterator i = this.relations.iterator(); i.hasNext(); ) { RichFeatureRelationship r = (RichFeatureRelationship)i.next(); if (r.getSubject().equals(f)) i.remove(); ...
List<String> textParts)
List<String> textParts, List<AttachmentData> attachments)
public MailData( Long id, String subject, String fromEmail, String fromName, Date dateCreated, List<MailSummary> replies, Long listId, List<String> textParts) { super(id, subject, fromEmail, fromName, dateCreated, replies); this.listId = listId; this.textParts = textParts; }
this.attachments = attachments;
public MailData( Long id, String subject, String fromEmail, String fromName, Date dateCreated, List<MailSummary> replies, Long listId, List<String> textParts) { super(id, subject, fromEmail, fromName, dateCreated, replies); this.listId = listId; this.textParts = textParts; }
public void deliver(String from, String recipient, byte[] data) {
public void deliver(String from, String recipient, InputStream data) throws IOException {
public void deliver(String from, String recipient, byte[] data) { for (MessageListener messageListener : listeners.keySet()) { if (messageListener.accept(from, recipient)) { messageListener.deliver(from, recipient, data); } } }
CBinaryTypeContext typeContext = new CBinaryTypeContext(
CTypeContext typeContext = null; if (this.originalClass != null) { typeContext = originalClass.getTypeContext(); } else { typeContext = new CBinaryTypeContext(
public CSourceMethod checkInterface(CClassContext context) throws PositionedError { FjClassContext caesarContext = (FjClassContext) context; CBinaryTypeContext typeContext = new CBinaryTypeContext( context.getClassReader(), context.getTypeFactory(), context, (modifiers & ACC_STATIC) == 0); CType[] pa...
}
public CSourceMethod checkInterface(CClassContext context) throws PositionedError { FjClassContext caesarContext = (FjClassContext) context; CBinaryTypeContext typeContext = new CBinaryTypeContext( context.getClassReader(), context.getTypeFactory(), context, (modifiers & ACC_STATIC) == 0); CType[] pa...
classContext.setBindings(
if (this.originalClass != null && this.originalClass.self != null) { classContext = (FjClassContext) originalClass.constructContext( originalClass.self.getCompilationUnitContext()); } classContext.setBindings(
public CaesarMember resolve( CClassContext context, CClass caller, JFormalParameter[] formalParameters, TokenReference tokenReference) { List parameterSignatures = new ArrayList(); List formalBindings = new ArrayList(); for (int i = 0; i < parameters.length; i++) { if (!formalParameters[i].isGenerated()) { ...
pointcut.resolve(new CaesarPointcutScope((FjClassContext) context, caller));
pointcut.resolve(new CaesarPointcutScope((FjClassContext) classContext, caller));
public CaesarMember resolve( CClassContext context, CClass caller, JFormalParameter[] formalParameters, TokenReference tokenReference) { List parameterSignatures = new ArrayList(); List formalBindings = new ArrayList(); for (int i = 0; i < parameters.length; i++) { if (!formalParameters[i].isGenerated()) { ...
this.typeTerm.compareTo(them.getTypeTerm());
return this.typeTerm.compareTo(them.getTypeTerm());
public int compareTo(Object o) { // Hibernate comparison - we haven't been populated yet if (this.parent==null) return -1; // Normal comparison Feature them = (Feature)o; if (this.parent instanceof Comparable && them.getParent() instanceof Comparable && !this.p...
this.sourceTerm.compareTo(them.getSourceTerm());
return this.sourceTerm.compareTo(them.getSourceTerm());
public int compareTo(Object o) { // Hibernate comparison - we haven't been populated yet if (this.parent==null) return -1; // Normal comparison Feature them = (Feature)o; if (this.parent instanceof Comparable && them.getParent() instanceof Comparable && !this.p...
if (!(loc instanceof RichLocation)) loc = RichLocation.Tools.enrich(loc);
RichLocation richLoc; if (loc instanceof RichLocation) { richLoc = (RichLocation) loc; } else { richLoc = RichLocation.Tools.enrich(loc); }
public void setLocation(Location loc) throws ChangeVetoException {// System.out.println("SimpleRichFeature.setLocation-featureId:"+featureId+", loc:"+loc); if (loc==null) throw new IllegalArgumentException("Location cannot be null"); if (!(loc instanceof RichLocation)) loc = RichLocation.Tools....
this.location = (RichLocation)loc;
this.location = richLoc;
public void setLocation(Location loc) throws ChangeVetoException {// System.out.println("SimpleRichFeature.setLocation-featureId:"+featureId+", loc:"+loc); if (loc==null) throw new IllegalArgumentException("Location cannot be null"); if (!(loc instanceof RichLocation)) loc = RichLocation.Tools....
loc,
richLoc,
public void setLocation(Location loc) throws ChangeVetoException {// System.out.println("SimpleRichFeature.setLocation-featureId:"+featureId+", loc:"+loc); if (loc==null) throw new IllegalArgumentException("Location cannot be null"); if (!(loc instanceof RichLocation)) loc = RichLocation.Tools....
if (!(t instanceof ComparableTerm)) t = RichObjectFactory.getDefaultOntology().getOrImportTerm(t);
ComparableTerm comparableT; if (t instanceof ComparableTerm) { comparableT = (ComparableTerm) t; } else { comparableT = RichObjectFactory.getDefaultOntology().getOrImportTerm(t); }
public void setSourceTerm(Term t) throws ChangeVetoException, InvalidTermException { if (t==null) throw new IllegalArgumentException("Term cannot be null"); if (!(t instanceof ComparableTerm)) t = RichObjectFactory.getDefaultOntology().getOrImportTerm(t); if(!this.hasListeners(RichFeature.SOURC...
this.sourceTerm = (ComparableTerm)t;
this.sourceTerm = comparableT;
public void setSourceTerm(Term t) throws ChangeVetoException, InvalidTermException { if (t==null) throw new IllegalArgumentException("Term cannot be null"); if (!(t instanceof ComparableTerm)) t = RichObjectFactory.getDefaultOntology().getOrImportTerm(t); if(!this.hasListeners(RichFeature.SOURC...
t,
comparableT,
public void setSourceTerm(Term t) throws ChangeVetoException, InvalidTermException { if (t==null) throw new IllegalArgumentException("Term cannot be null"); if (!(t instanceof ComparableTerm)) t = RichObjectFactory.getDefaultOntology().getOrImportTerm(t); if(!this.hasListeners(RichFeature.SOURC...
if (!(t instanceof ComparableTerm)) t = RichObjectFactory.getDefaultOntology().getOrImportTerm(t);
ComparableTerm comparableT; if (t instanceof ComparableTerm) { comparableT = (ComparableTerm) t; } else { comparableT = RichObjectFactory.getDefaultOntology().getOrImportTerm(t); }
public void setTypeTerm(Term t) throws ChangeVetoException, InvalidTermException { if (t==null) throw new IllegalArgumentException("Term cannot be null"); if (!(t instanceof ComparableTerm)) t = RichObjectFactory.getDefaultOntology().getOrImportTerm(t); if(!this.hasListeners(RichFeature.TYPETER...
this.typeTerm = (ComparableTerm)t;
this.typeTerm = comparableT;
public void setTypeTerm(Term t) throws ChangeVetoException, InvalidTermException { if (t==null) throw new IllegalArgumentException("Term cannot be null"); if (!(t instanceof ComparableTerm)) t = RichObjectFactory.getDefaultOntology().getOrImportTerm(t); if(!this.hasListeners(RichFeature.TYPETER...
t,
comparableT,
public void setTypeTerm(Term t) throws ChangeVetoException, InvalidTermException { if (t==null) throw new IllegalArgumentException("Term cannot be null"); if (!(t instanceof ComparableTerm)) t = RichObjectFactory.getDefaultOntology().getOrImportTerm(t); if(!this.hasListeners(RichFeature.TYPETER...
protected void addPmText(PrivateMessage pm) throws Exception {
protected void addPmText(PrivateMessage pm) throws SQLException {
protected void addPmText(PrivateMessage pm) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("PrivateMessagesModel.addText")); p.setInt(1, pm.getId()); p.executeUpdate(); p.close(); OracleUtils.writeBlobUTF16BinaryStream(SystemGlobals.getS...
protected String getPmText(ResultSet rs) throws Exception
protected String getPmText(ResultSet rs) throws SQLException
protected String getPmText(ResultSet rs) throws Exception { return OracleUtils.readBlobUTF16BinaryStream(rs, "privmsgs_text"); }
public SecondaryFileAsList(File file, boolean mutable)
public SecondaryFileAsList(File file, int recordLen)
public SecondaryFileAsList(File file, boolean mutable) throws IOException { super(file, mutable); }
super(file, mutable);
super(file, recordLen);
public SecondaryFileAsList(File file, boolean mutable) throws IOException { super(file, mutable); }
setKeyBindingScopes(new String[] {"Scheme Editing"});
setKeyBindingScopes(new String[] {"org.schemeway.plugins.schemescript.schemeEditorScope"});
protected void initializeKeyBindingScopes() { setKeyBindingScopes(new String[] {"Scheme Editing"}); }
"</ul>\n" +
public String buildSummary() { int photoCount = photoSource.getOutputPhotoCount(); String sourceDir = photoSource.getSourceDir().getAbsolutePath(); String destDir = outputDirectory.getAbsolutePath(); String thumbnailSummary; String sizeSummary; String captionsSummar...
public void delete() throws Exception
public void delete()
public void delete() throws Exception { String bannerId = this.request.getParameter("banner_id"); if(bannerId == null) { this.list(); return; } BannerDAO dao = DataAccessDriver.getInstance().newBannerDAO(); int id = Integer.parseInt(bannerId); if(dao.canDelete(id)) { dao.delete(id); } else { this.co...
public void edit() throws Exception
public void edit()
public void edit() throws Exception { int bannerId = this.request.getIntParameter("banner_id"); BannerDAO dao = DataAccessDriver.getInstance().newBannerDAO(); this.context.put("banner", dao.selectById(bannerId)); this.setTemplateName(TemplateKeys.BANNER_EDIT); this.context.put("action", "editSave"); }
public void editSave() throws Exception
public void editSave()
public void editSave() throws Exception { int bannerId = this.request.getIntParameter("banner_id"); Banner banner = getBanner(); banner.setId(bannerId); DataAccessDriver.getInstance().newBannerDAO().update(banner); this.list(); }
public void insert() throws Exception
public void insert()
public void insert() throws Exception { this.context.put("action", "insertSave"); this.setTemplateName(TemplateKeys.BANNER_INSERT); }
public void insertSave() throws Exception
public void insertSave()
public void insertSave() throws Exception { BannerDAO dao = DataAccessDriver.getInstance().newBannerDAO(); dao.addNew(getBanner()); this.list(); }
public void list() throws Exception
public void list()
public void list() throws Exception { this.context.put("banners", DataAccessDriver.getInstance().newBannerDAO().selectAll()); this.setTemplateName(TemplateKeys.BANNER_LIST); }
public boolean canDelete(int bannerId) throws Exception;
public boolean canDelete(int bannerId);
public boolean canDelete(int bannerId) throws Exception;
public void delete(int bannerId) throws Exception;
public void delete(int bannerId);
public void delete(int bannerId) throws Exception;
public Banner selectById(int bannerId) throws Exception;
public Banner selectById(int bannerId);
public Banner selectById(int bannerId) throws Exception;
public void update(Banner banner) throws Exception;
public void update(Banner banner);
public void update(Banner banner) throws Exception;
public int addNew(Banner banner) throws Exception;
public int addNew(Banner banner);
public int addNew(Banner banner) throws Exception;
public static RangeLocation getVisibleRange(SequenceRenderContext src, Graphics2D g2) {
public static Location getVisibleRange(SequenceRenderContext src, Graphics2D g2) {
public static RangeLocation getVisibleRange(SequenceRenderContext src, Graphics2D g2) { Rectangle2D clip = g2.getClipBounds(); int min = Math.max( src.getRange().getMin(), src.graphicsToSequence( new Point2D.Double(clip.getMinX(), clip.getMinY()) ) - 1 ); i...
return new RangeLocation(min, max);
if( min > max ) { return Location.empty; } else { return new RangeLocation(min, max); }
public static RangeLocation getVisibleRange(SequenceRenderContext src, Graphics2D g2) { Rectangle2D clip = g2.getClipBounds(); int min = Math.max( src.getRange().getMin(), src.graphicsToSequence( new Point2D.Double(clip.getMinX(), clip.getMinY()) ) - 1 ); i...
e.printStackTrace();
public void transferCompleted( TransferEvent transferEvent ) { if ( digester == null ) { return; } Wagon wagon = transferEvent.getWagon(); actualChecksum = encode ( digester.digest() ); digester = null; InputStrea...
counts = new IndexedCount(getIndexer());
counts = new IndexedCount(indexer);
public Trainer() { counts = new IndexedCount(getIndexer()); }
AtomicSymbol s = (AtomicSymbol) getIndexer().symbolForIndex(i); sum += total[i] =
AtomicSymbol s = (AtomicSymbol) indexer.symbolForIndex(i); sum += total[i] =
protected void trainImpl(DistributionTrainerContext dtc, double weight) { try { Distribution nullModel = getNullModel(); double[] weights = getWeights(); double []total = new double[weights.length]; double sum = 0.0; for(int i = 0; i < total.length; i++) { AtomicSymbol s =...
this.alphabet = alphabet;
this.alpha = alphabet; this.indexer = AlphabetManager.getAlphabetIndex(alphabet); indexer.addChangeListener( new ChangeAdapter() { public void preChange(ChangeEvent ce) throws ChangeVetoException { if(hasWeights()) { throw new ChangeVetoException( ce, "Can't allow the index to change as we have probabilities." ); } } }...
public SimpleDistribution(FiniteAlphabet alphabet) { this.alphabet = alphabet; try { setNullModel(new UniformDistribution(alphabet)); } catch (Exception e) { throw new BioError(e, "This should never fail. Something is screwed!"); } }
return alphabet; }
return indexer.getAlphabet(); }
public Alphabet getAlphabet() { return alphabet; }
return weights[getIndexer().indexForSymbol(s)];
return weights[indexer.indexForSymbol(s)];
public double getWeightImpl(AtomicSymbol s) throws IllegalSymbolException { if(!hasWeights()) { return Double.NaN; } else { return weights[getIndexer().indexForSymbol(s)]; } }
weights = new double[getIndexer().getAlphabet().size()];
weights = new double[indexer.getAlphabet().size()];
protected double[] getWeights() { if(weights == null) { weights = new double[getIndexer().getAlphabet().size()]; for(int i = 0; i < weights.length; i++) { weights[i] = Double.NaN; } } return weights; }
weights[getIndexer().indexForSymbol(s)] = w;
weights[indexer.indexForSymbol(s)] = w;
protected void setWeightImpl(AtomicSymbol s, double w) throws IllegalSymbolException, ChangeVetoException { double[] weights = getWeights(); if(w < 0.0) { throw new IllegalArgumentException( "Can't set weight to negative score: " + s.getName() + " -> " + w ); } weights[getIndexer(...
weightedHosts.put(wh.getHost(), wh);
public synchronized void add(WeightedHost wh) { scores.add(wh); sum += wh.getScore(); }
scores.add(new WeightedHost(wh.getHost(), newScore));
WeightedHost nwh = new WeightedHost(wh.getHost(), newScore); weightedHosts.put(wh.getHost(), nwh); scores.add(nwh);
public synchronized void changeScore(WeightedHost wh, double newScore) { scores.remove(wh); sum -= wh.getScore(); scores.add(new WeightedHost(wh.getHost(), newScore)); sum += newScore; }
weightedHosts = new HashMap();
protected void init() { scores = new TreeSet(); sum = 0; }
weightedHosts.remove(wh.getHost());
public synchronized double remove(WeightedHost wh) { scores.remove(wh); return wh.getScore(); }
public void list() throws Exception
public void list()
public void list() throws Exception { this.login(); }
public void login() throws Exception
public void login()
public void login() throws Exception { UserSession us = SessionFacade.getUserSession(); PermissionControl pc = SecurityRepository.get(us.getUserId()); if (!SessionFacade.isLogged() || pc == null || !pc.canAccess(SecurityConstants.PERM_ADMINISTRATION)) { String returnPath = this.request.getContextPath()...
public void menu() throws Exception
public void menu()
public void menu() throws Exception { if (this.checkAdmin()) { this.setTemplateName(TemplateKeys.ADMIN_MENU); } }
SimpleHash context) throws Exception
SimpleHash context)
public Template process(ActionServletRequest request, HttpServletResponse response, SimpleHash context) throws Exception { return super.process(request, response, context); }
try { is.close(); os.close(); } catch (Exception e) {}
try { is.close(); } catch (Exception e) { } } if (os != null) { try { os.close(); } catch (Exception e) { }
private String readVersionFromSocket() { InputStream is = null; OutputStream os = null; String data = null; try { URL url = new URL(SystemGlobals.getValue(ConfigKeys.JFORUM_VERSION_URL)); URLConnection conn = url.openConnection(); is = conn.getInputStream(); os = new ByteArrayOutputStream(); in...
public OverlayText(OverlayTransform overlay, float x, float y, String text) { super(overlay); x1 = x; y1 = y; this.text = text; computeGridParameters(); }
public OverlayText(OverlayTransform overlay) { super(overlay); }
public OverlayText(OverlayTransform overlay, float x, float y, String text) { super(overlay); x1 = x; y1 = y; this.text = text; computeGridParameters(); }
target.createFeature(t);
synchronized (target) { target.createFeature(t); }
public void run() { SymbolListCharSequence charSeq = new SymbolListCharSequence(target); try { Pattern [] patterns = RestrictionEnzymeManager.getPatterns(enzyme); int siteLen = enzyme.getRecognitionSite().length(); int seqLen = target.length(); in...
&& document.getPartition(selection.x - 1).getType() == IDocument.DEFAULT_CONTENT_TYPE) {
&& SchemeTextUtilities.getPartition(document, selection.x - 1).getType() == IDocument.DEFAULT_CONTENT_TYPE) {
public final void paint(final int reason) { Point selection = mSourceViewer.getSelectedRange(); if (selection.y > 0) { deactivate(true); return; } SexpNavigator explorer = mEditor.getExplorer(); boolean backward = true; boolean closeToParen...
&& document.getPartition(selection.x).getType() == IDocument.DEFAULT_CONTENT_TYPE) {
&& SchemeTextUtilities.getPartition(document, selection.x).getType() == IDocument.DEFAULT_CONTENT_TYPE) {
public final void paint(final int reason) { Point selection = mSourceViewer.getSelectedRange(); if (selection.y > 0) { deactivate(true); return; } SexpNavigator explorer = mEditor.getExplorer(); boolean backward = true; boolean closeToParen...
writeSessions(pw, prefixEndingInSlash);
String totalLine = strings().getString(HJBStrings.LISTING_TOTAL, new Integer(getListingTotal())); String prefixEndingWithConnection = prefixEndingInSlash + PathNaming.CONNECTION + '-' + getTheConnection().getConnectionIndex(); pw.println(prefixEndingWithConnection + ':'); pw.println(totalLine); writeSessions(pw);
public void writeListing(Writer aWriter, String prefix, boolean recurse) { PrintWriter pw = new PrintWriter(aWriter); String prefixEndingInSlash = prefix.endsWith("/") ? prefix : prefix + "/"; writeSessions(pw, prefixEndingInSlash); if (getTheConnection().getActiveSessions...
writeSessionListings(pw, prefixEndingInSlash);
writeSessionListings(pw, prefixEndingWithConnection + "/");
public void writeListing(Writer aWriter, String prefix, boolean recurse) { PrintWriter pw = new PrintWriter(aWriter); String prefixEndingInSlash = prefix.endsWith("/") ? prefix : prefix + "/"; writeSessions(pw, prefixEndingInSlash); if (getTheConnection().getActiveSessions...
JMSObjectDescription d = getTheConnection().getSessionDescription(sessionIndex.intValue());
protected void writeSessionListings(PrintWriter aWriter, String prefixEndingInSlash) { Map activeSessions = getTheConnection().getActiveSessions(); for (Iterator i = activeSessions.keySet().iterator(); i.hasNext();) { Integer sessionIndex = (Integer) i...
aWriter.println(prefixEndingInSlash + d.longDescription()); new SessionListing(getTheConnection().getSession(sessionIndex.intValue())).writeListing(aWriter, prefixEndingInSlash, true);
HJBSession theSession = getTheConnection().getSession(sessionIndex.intValue()); new SessionListing(theSession).writeListing(aWriter, prefixEndingInSlash, true);
protected void writeSessionListings(PrintWriter aWriter, String prefixEndingInSlash) { Map activeSessions = getTheConnection().getActiveSessions(); for (Iterator i = activeSessions.keySet().iterator(); i.hasNext();) { Integer sessionIndex = (Integer) i...
protected void writeSessions(PrintWriter aWriter, String prefixEndingInSlash) {
protected void writeSessions(PrintWriter aWriter) {
protected void writeSessions(PrintWriter aWriter, String prefixEndingInSlash) { Map activeSessions = getTheConnection().getActiveSessions(); for (Iterator i = activeSessions.keySet().iterator(); i.hasNext();) { Integer sessionIndex = (Integer) i.next(); JMSObjectDescription d = g...
aWriter.print(prefixEndingInSlash + d); aWriter.println();
aWriter.print(d.longDescription()); if (i.hasNext()) { aWriter.println(); }
protected void writeSessions(PrintWriter aWriter, String prefixEndingInSlash) { Map activeSessions = getTheConnection().getActiveSessions(); for (Iterator i = activeSessions.keySet().iterator(); i.hasNext();) { Integer sessionIndex = (Integer) i.next(); JMSObjectDescription d = g...
int totalMessages = u.getTotalPosts();
int totalMessages = pm.countUserPosts(u.getId());
public void listByUser() throws Exception { PostDAO pm = DataAccessDriver.getInstance().newPostDAO(); UserDAO um = DataAccessDriver.getInstance().newUserDAO(); TopicDAO tm = DataAccessDriver.getInstance().newTopicDAO(); UserSession us = SessionFacade.getUserSession(); int anonymousUser = SystemGlobals.getIntVa...
FeatureHolder filterResult; if (FilterUtils.areProperSubset(ff, mf)) { filterResult = fh;
if (FilterUtils.areProperSubset(mf, ff)) { results.put(fh, mf);
public FeatureHolder filter(FeatureFilter ff, boolean recurse) { // MergeFeatureHolder mfh = new MergeFeatureHolder(); // for (Iterator fhi = featureHolders.iterator(); fhi.hasNext(); ) { // FeatureHolder fh = (FeatureHolder) fhi.next(); // mfh.addFeatureHolder(fh.filter(ff, recurse)); // } // return mfh; Map...
filterResult = fh.filter(ff, false); if (filterResult.countFeatures() == 0) { continue;
FeatureHolder filterResult = fh.filter(ff, false); if (filterResult.countFeatures() != 0) { results.put(filterResult, new FeatureFilter.And(mf, ff));
public FeatureHolder filter(FeatureFilter ff, boolean recurse) { // MergeFeatureHolder mfh = new MergeFeatureHolder(); // for (Iterator fhi = featureHolders.iterator(); fhi.hasNext(); ) { // FeatureHolder fh = (FeatureHolder) fhi.next(); // mfh.addFeatureHolder(fh.filter(ff, recurse)); // } // return mfh; Map...
results.put(filterResult, new FeatureFilter.And(mf, ff));
public FeatureHolder filter(FeatureFilter ff, boolean recurse) { // MergeFeatureHolder mfh = new MergeFeatureHolder(); // for (Iterator fhi = featureHolders.iterator(); fhi.hasNext(); ) { // FeatureHolder fh = (FeatureHolder) fhi.next(); // mfh.addFeatureHolder(fh.filter(ff, recurse)); // } // return mfh; Map...
public void doModeration() throws Exception
public void doModeration()
public void doModeration() throws Exception { String returnUrl = this.request.getParameter("returnUrl"); new ModerationHelper().doModeration(returnUrl); this.context.put("returnUrl", returnUrl); if (JForumExecutionContext.getRequest().getParameter("topicMove") != null) { this.setTemplateName(TemplateKeys.M...
public void list() throws Exception
public void list()
public void list() throws Exception { throw new UnsupportedOperationException(); }
public void moderationDone() throws Exception
public void moderationDone()
public void moderationDone() throws Exception { this.setTemplateName(new ModerationHelper().moderationDone(this.request.getParameter("returnUrl"))); }
public void moveTopic() throws Exception
public void moveTopic()
public void moveTopic() throws Exception { new ModerationHelper().moveTopicsSave(this.request.getParameter("returnUrl")); }
String[] emailAddresses,
List<String> emailAddresses,
public SubscriberData( Long id, String name, String[] emailAddresses, String roleName, String deliverTo, Date dateSubscribed) { super(id, name, emailAddresses); this.roleName = roleName; this.deliverTo = deliverTo; this.dateSubscribed = dateSubscribed; }
public PersonData(Long id, String name, String[] emailAddresses)
public PersonData(Long id, String name, List<String> emailAddresses)
public PersonData(Long id, String name, String[] emailAddresses) { this.id = id; this.name = name; this.emailAddresses = emailAddresses; }
public Object getElementAt(int which) {
public FileSpecification getElementAt(int which) {
public Object getElementAt(int which) { try { return availableRobots.elementAt(which); } catch (ArrayIndexOutOfBoundsException e) { // If the view updates while we're updating... return ""; } }
return "";
return null;
public Object getElementAt(int which) { try { return availableRobots.elementAt(which); } catch (ArrayIndexOutOfBoundsException e) { // If the view updates while we're updating... return ""; } }
} else { if (robotSpecification.getFullPackage().equals(selectedPackage)) { availableRobots.add(robotSpecification); }
} else if (robotSpecification.getFullPackage().equals(selectedPackage)) { availableRobots.add(robotSpecification);
private void availablePackagesListSelectionChanged() { int sel[] = getAvailablePackagesList().getSelectedIndices(); availableRobots.clear(); if (sel.length == 1) { robotNamesCellRenderer.setUseShortNames(true); getAvailablePackagesList().scrollRectToVisible(getAvailablePackagesList().getCellBounds(sel[0], sel[0...
FileSpecification robotSpecification = (FileSpecification) robotList.elementAt(i);
FileSpecification robotSpecification = robotList.elementAt(i);
public void run() { availablePackages.clear(); availableRobots.clear(); if (AvailableRobotsPanel.this.robotList == null) { AvailableRobotsPanel.this.robotList = new Vector<FileSpecification>(); availablePackages.add("One moment please..."); ((AvailablePackagesModel) getAvailablePackagesList().ge...
_hsb = Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), null);
hsl = RGBtoHSL(color.getRed(), color.getGreen(), color.getBlue());
public ColorFilter(Color color) { _hsb = Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), null); }
float[] hsb = Color.RGBtoHSB(r, g, b, null);
float[] HSL = RGBtoHSL(r, g, b);
public int filterRGB(int x, int y, int argb) { int r = (argb >> 16) & 0xff; int g = (argb >> 8) & 0xff; int b = argb & 0xff; float[] hsb = Color.RGBtoHSB(r, g, b, null); if (hsb[1] > 0f) { if (_hsb[1] > 0f) { return (argb & 0xff000000) | HSLtoRGB(_hsb[0], _hsb[1], hsb[2]); } return (argb & 0xff...
if (hsb[1] > 0f) { if (_hsb[1] > 0f) { return (argb & 0xff000000) | HSLtoRGB(_hsb[0], _hsb[1], hsb[2]); } return (argb & 0xff000000) | HSLtoRGB(0f, 0f, (hsb[2] + _hsb[2]) / 2);
if (HSL[1] > 0) { return argb & 0xff000000 | HSLtoRGB(hsl[0], hsl[1], (HSL[2] + hsl[2]) / 2);
public int filterRGB(int x, int y, int argb) { int r = (argb >> 16) & 0xff; int g = (argb >> 8) & 0xff; int b = argb & 0xff; float[] hsb = Color.RGBtoHSB(r, g, b, null); if (hsb[1] > 0f) { if (_hsb[1] > 0f) { return (argb & 0xff000000) | HSLtoRGB(_hsb[0], _hsb[1], hsb[2]); } return (argb & 0xff...
private static final int HSLtoRGB(float h, float s, float l) { float m2 = (l <= 0.5) ? (l * (s + 1f)) : (l + s - l * s); float m1 = 2f * l - m2;
private static int HSLtoRGB(float h, float s, float l) { float m2 = (l <= 0.5f) ? (l * (s + 1)) : (l + s - l * s); float m1 = 2 * l - m2;
private static final int HSLtoRGB(float h, float s, float l) { float m2 = (l <= 0.5) ? (l * (s + 1f)) : (l + s - l * s); float m1 = 2f * l - m2; int r = (int) (255 * HUEtoRGB(m1, m2, h + (1f / 3f))); int g = (int) (255 * HUEtoRGB(m1, m2, h)); int b = (int) (255 * HUEtoRGB(m1, m2, h - (1f / 3f))); return (((r << ...
int r = (int) (255 * HUEtoRGB(m1, m2, h + (1f / 3f)));
int r = (int) (255 * HUEtoRGB(m1, m2, h + (1f / 3)));
private static final int HSLtoRGB(float h, float s, float l) { float m2 = (l <= 0.5) ? (l * (s + 1f)) : (l + s - l * s); float m1 = 2f * l - m2; int r = (int) (255 * HUEtoRGB(m1, m2, h + (1f / 3f))); int g = (int) (255 * HUEtoRGB(m1, m2, h)); int b = (int) (255 * HUEtoRGB(m1, m2, h - (1f / 3f))); return (((r << ...