rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
AGSymbol.alloc("clone"),
AGSymbol.jAlloc("clone"),
public ATObject meta_clone() throws InterpreterException { return Reflection.downObject(mirror_.meta_invoke( mirror_, AGSymbol.alloc("clone"), NATTable.EMPTY )); }
AGSymbol.alloc("defineField"),
AGSymbol.jAlloc("defineField"),
public ATNil meta_defineField(ATSymbol name, ATObject value) throws InterpreterException { mirror_.meta_invoke( mirror_, AGSymbol.alloc("defineField"), new NATTable(new ATObject[] { name, value }) ); return NATNil._INSTANCE_; }
AGSymbol.alloc("doesNotUnderstand"),
AGSymbol.jAlloc("doesNotUnderstand"),
public ATObject meta_doesNotUnderstand(ATSymbol selector) throws InterpreterException { return Reflection.downObject(mirror_.meta_invoke( mirror_, AGSymbol.alloc("doesNotUnderstand"), new NATTable(new ATObject[] { selector }) )); }
AGSymbol.alloc("eval"),
AGSymbol.jAlloc("eval"),
public ATObject meta_eval(ATContext ctx) throws InterpreterException { return Reflection.downObject(mirror_.meta_invoke( mirror_, AGSymbol.alloc("eval"), new NATTable(new ATObject[] { ctx }) )); }
AGSymbol.alloc("extend"),
AGSymbol.jAlloc("extend"),
public ATObject meta_extend(ATClosure code) throws InterpreterException { return Reflection.downObject(mirror_.meta_invoke( mirror_, AGSymbol.alloc("extend"), new NATTable(new ATObject[] { code }) )); }
AGSymbol.alloc("dynamicParent")));
AGSymbol.jAlloc("dynamicParent")));
public ATObject meta_getDynamicParent() throws InterpreterException { return Reflection.downObject(mirror_.meta_select( mirror_, AGSymbol.alloc("dynamicParent"))); }
AGSymbol.alloc("lexicalParent")));
AGSymbol.jAlloc("lexicalParent")));
public ATObject meta_getLexicalParent() throws InterpreterException { return Reflection.downObject(mirror_.meta_select( mirror_, AGSymbol.alloc("lexicalParent"))); }
AGSymbol.alloc("getField"),
AGSymbol.jAlloc("getField"),
public ATField meta_grabField(ATSymbol selector) throws InterpreterException { return Reflection.downObject(mirror_.meta_invoke( mirror_, AGSymbol.alloc("getField"), new NATTable(new ATObject[] { selector }) )).base_asField(); }
AGSymbol.alloc("getMethod"),
AGSymbol.jAlloc("getMethod"),
public ATMethod meta_grabMethod(ATSymbol selector) throws InterpreterException { return Reflection.downObject(mirror_.meta_invoke( mirror_, AGSymbol.alloc("getMethod"), new NATTable(new ATObject[] { selector }) )).base_asMethod(); }
AGSymbol.alloc("invoke"),
AGSymbol.jAlloc("invoke"),
public ATObject meta_invoke(ATObject receiver, ATSymbol selector, ATTable arguments) throws InterpreterException { return Reflection.downObject(mirror_.meta_invoke( mirror_, AGSymbol.alloc("invoke"), new NATTable(new ATObject[] { receiver, selector, arguments }) )); }
AGSymbol.alloc("listFields"),
AGSymbol.jAlloc("listFields"),
public ATTable meta_listFields() throws InterpreterException { return Reflection.downObject(mirror_.meta_invoke( mirror_, AGSymbol.alloc("listFields"), NATTable.EMPTY )).base_asTable(); }
AGSymbol.alloc("listMethods"),
AGSymbol.jAlloc("listMethods"),
public ATTable meta_listMethods() throws InterpreterException { return Reflection.downObject(mirror_.meta_invoke( mirror_, AGSymbol.alloc("listMethods"), NATTable.EMPTY )).base_asTable(); }
AGSymbol.alloc("lookup"),
AGSymbol.jAlloc("lookup"),
public ATObject meta_lookup(ATSymbol selector) throws InterpreterException { return Reflection.downObject(mirror_.meta_invoke( mirror_, AGSymbol.alloc("lookup"), new NATTable(new ATObject[] { selector }) )); }
AGSymbol.alloc("newInstance"),
AGSymbol.jAlloc("newInstance"),
public ATObject meta_newInstance(ATTable initargs) throws InterpreterException { return Reflection.downObject(mirror_.meta_invoke( mirror_, AGSymbol.alloc("newInstance"), new NATTable(new ATObject[] { initargs }) )); }
AGSymbol.alloc("quote"),
AGSymbol.jAlloc("quote"),
public ATObject meta_quote(ATContext ctx) throws InterpreterException { return Reflection.downObject(mirror_.meta_invoke( mirror_, AGSymbol.alloc("quote"), new NATTable(new ATObject[] { ctx }) )); }
AGSymbol.alloc("respondsTo"),
AGSymbol.jAlloc("respondsTo"),
public ATBoolean meta_respondsTo(ATSymbol selector) throws InterpreterException { return Reflection.downObject(mirror_.meta_invoke( mirror_, AGSymbol.alloc("respondsTo"), new NATTable(new ATObject[] { selector }) )).base_asBoolean(); }
AGSymbol.alloc("select"),
AGSymbol.jAlloc("select"),
public ATObject meta_select(ATObject receiver, ATSymbol selector) throws InterpreterException { return Reflection.downObject(mirror_.meta_invoke( mirror_, AGSymbol.alloc("select"), new NATTable(new ATObject[] { receiver, selector }) )); }
AGSymbol.alloc("send"),
AGSymbol.jAlloc("send"),
public ATNil meta_send(ATAsyncMessage message) throws InterpreterException { mirror_.meta_invoke( mirror_, AGSymbol.alloc("send"), new NATTable(new ATObject[] { message }) ); return NATNil._INSTANCE_; }
AGSymbol.alloc("share"),
AGSymbol.jAlloc("share"),
public ATObject meta_share(ATClosure code) throws InterpreterException { return Reflection.downObject(mirror_.meta_invoke( mirror_, AGSymbol.alloc("share"), new NATTable(new ATObject[] { code }) )); }
textField.setPreferredSize( new Dimension(275, 25) );
textField.setPreferredSize( new Dimension(250, 25) );
FilterPanel( SortedSet tags, DataDictionary dataDictionary ) { setLayout( new FlowLayout() ); enablePanel( false ); checkBox.setPreferredSize( new Dimension(25, 25) ); add( checkBox ); comboBox.setPreferredSize( new Dimension(200, 25) ); add( comboBox ); operatorComboBox.setPreferredSize( new Dime...
testParse("closures.at(closures.length)()", "(begin (apply (send (symbol closures) (message (apply (symbol at) (table (select (symbol closures) (symbol length)))))) (table)))"); testParse("closures[closures.length]()", "(begin (apply (table-get (symbol closures) (select (symbol closures) (symbol length))) (table)))");
public void testCurrying() { testParse( "[ { display: \"test\" }, { | x, y | x < y } ][2](a ,b)", " ( begin ( apply ( table-get ( table ( closure (table ) ( begin ( apply (symbol display:) (table (text \"test\" ) ) ) ) ) ( closure ( table (symbol x) (symbol y) ) ( begin ( < (symbol x) (symbol y) ) ) ) ...
this(owner, PREV | PLAY | NEXT | RANDOM);
this(owner, PREV | PLAY | NEXT | PLAYALL | RANDOM);
public ControlPanel(final AudioPlayer owner) { this(owner, PREV | PLAY | NEXT | RANDOM); }
mainPanel.getPlaylist().setRandom(random.isSelected());
mainPanel.getPlaylist().setPlayAll(playAll.isSelected());
public void actionPerformed(ActionEvent e) { MainPanel mainPanel = (MainPanel)owner.getPanelInstance(); mainPanel.getPlaylist().setRandom(random.isSelected()); }
return NATMirrorFactory._INSTANCE_.base_createMirror(reflectee);
return NATIntrospectiveMirror.atValue(reflectee);
public ATObject base_reflect_(ATObject reflectee) throws InterpreterException { return NATMirrorFactory._INSTANCE_.base_createMirror(reflectee); }
if (request.isUserInRole(roles[i]))
if (request.isUserInRole(roles[i].trim()))
public int doStartTag() throws JspException { HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); String[] roles = role.split(","); for (int i = 0; i < roles.length; i++) { if (request.isUserInRole(roles[i])) return EVAL_BODY_INCLUDE; } return SKIP_BODY; }
Document doc = docBuilder.newDocument(); config = doc.createElement("dataset"); config.setAttribute("xmlns:xlink", "http:
public XMLDataSet(DocumentBuilder docBuilder, URL datasetURL) { this.base = datasetURL; this.docBuilder = docBuilder; }
return xpath.eval(config, "@datasetid").str();
return xpath.eval(config, path).str();
protected String evalString(Node context, String path) { try { return xpath.eval(config, "@datasetid").str(); } catch (javax.xml.transform.TransformerException e) { logger.error("Couldn't get String", e); } // end of try-catch return null; }
"dataset/parameter[name/text()="+
"parameter[name/text()="+
public Object getParamter(String name) { if (parameterCache.containsKey(name)) { return parameterCache.get(name); } // end of if (parameterCache.containsKey(name)) NodeList nList = evalNodeList(config, "dataset/parameter[name/text()="+ dquote+name+dquote+"]"); if (nList != null && nList.getL...
"dataset/parameterRef[text()="+dquote+name+dquote+"]");
"parameterRef[text()="+dquote+name+dquote+"]");
public Object getParamter(String name) { if (parameterCache.containsKey(name)) { return parameterCache.get(name); } // end of if (parameterCache.containsKey(name)) NodeList nList = evalNodeList(config, "dataset/parameter[name/text()="+ dquote+name+dquote+"]"); if (nList != null && nList.getL...
cal.setCalendarCollection(newCC);
private boolean validateCalendar(HttpServletRequest request, BwActionFormBase form, boolean add) throws Throwable { boolean ok = true; BwCalendar cal = form.getCalendar(); Boolean cc = getBooleanReqPar(request, "calendarCollection"); if (...
BwFreeBusy fb = svci.getFreeBusy(cal, user,
if (svci.isUserRoot(cal)) { cal = null; } BwFreeBusy fb = svci.getFreeBusy(null, cal, user,
public BwFreeBusy getFreeBusy(CalSvcI svci, BwCalendar cal, String account) throws WebdavException { try { BwUser user = svci.findUser(account); if (user == null) { throw WebdavIntfException.unauthorized(); } BwFreeBusy fb = svci.getFreeBusy(cal, user, ...
boolean superUser,
public boolean init(String authenticatedUser, String user, boolean publicAdmin, boolean superUser, Groups groups, String synchId, boolean debug) throws CalFacadeException { boolean userAdde...
superUser, groups, synchId, debug);
groups, synchId, debug);
public boolean init(String authenticatedUser, String user, boolean publicAdmin, boolean superUser, Groups groups, String synchId, boolean debug) throws CalFacadeException { boolean userAdde...
seismograms[counter] = new DataSetSeismogram(hseis.getDataSet().getSeismogram(getSeismogramName(channelGroup[counter], hseis.getDataSet(), new edu.iris.Fissures.TimeRange(seis.getBeginTime().getFissuresTime(), seis.getEndTime().getFissuresTime()))), hseis.getDataSet());
String name = DisplayUtils.getSeismogramName(channelGroup[counter], hseis.getDataSet(), new edu.iris.Fissures.TimeRange(seis.getBeginTime().getFissuresTime(), seis.getEndTime().getFissuresTime())); seismograms[counter] = new DataSetSeismogram(hseis.getDataSet().getSeismogram(name), hseis.getDataSet());
public void addParticleMotionDisplay(DataSetSeismogram hseis, TimeConfigRegistrar timeConfigRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar) { LocalSeismogramImpl seis = hseis.getSeismogram(); ChannelId[] channelIds = ((edu.sc.seis.fissuresUtil.xml.XMLData...
EventInfo ei = svci.getEvent(id);
EventInfo ei = findEvent(request, form);
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } String idstr = getReqPar(request, "cal"); boolean calid = idstr != null; if (!calid) { idstr = getReqPar(request, "event"); } if ...
pane.setLayout(new BorderLayout());
private MainFrame() { super(EVI.TITLE); setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); addWindowListener(new WindowListener() { public void windowActivated(WindowEvent arg0) { } public void windowClosed(WindowEvent arg0) { } public void windowClosing(WindowEvent arg0) { Util.askToExit()...
warn("Unable to restore " + entity);
public void end(String ns, String name) throws Exception { BwSponsor entity = (BwSponsor)pop(); globals.sponsors++; globals.sponsorsTbl.put(entity); fixSharableEntity(entity, "Sponsor"); try { if (globals.rintf != null) { for (;;) { Integer i = globals.rintf.restoreSponsor(entity);...
String name = Util.checkNull(request.getParameter("name"));
String name = getReqPar(request, "name");
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } CalSvcI svc = form.fetch...
return "error";
return "retry";
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } CalSvcI svc = form.fetch...
String add = Util.checkNull(request.getParameter("add")); String remove = Util.checkNull(request.getParameter("remove"));
String add = getReqPar(request, "add"); String remove = getReqPar(request, "remove");
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } CalSvcI svc = form.fetch...
int selected = 0;
int selected = -1;
private JPanel makeProfileConnectPanel() { JPanel p = new JPanel(); p.setBorder(new TitledBorder("Connect Profile")); p.setLayout(new GridLayout(2, 0)); Profile[] profiles = Profile.getProfiles(); String lastProfile = Configuration.getLastProfile(); int selected = 0; for (int i = 0; i < profiles.length; i++) ...
profileBox.setSelectedIndex(selected);
if (selected != -1) { profileBox.setSelectedIndex(selected); }
private JPanel makeProfileConnectPanel() { JPanel p = new JPanel(); p.setBorder(new TitledBorder("Connect Profile")); p.setLayout(new GridLayout(2, 0)); Profile[] profiles = Profile.getProfiles(); String lastProfile = Configuration.getLastProfile(); int selected = 0; for (int i = 0; i < profiles.length; i++) ...
logger.debug("Body content: " + content);
public int doEndTag() throws JspException { try { CalendarTag cal = (CalendarTag) findAncestorWithClass(this, CalendarTag.class); if (cal == null) return Tag.EVAL_PAGE; // can't use this String content = null; if (day != null && day >= 1 && day <= 31) { BodyContent body = getBodyCo...
getParentPage().setOnLoad("window.open('" + uri + "' , 'newWin', 'width=600,height=400,scrollbars=yes')");
getParentPage().setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') ");
private boolean executeQueries(SQLQuery query, QueryToSQLBridge bridge, List executedSQLQueries) throws RemoteException { QueryResult queryResult = bridge.executeQueries(query, executedSQLQueries); // check if everything is fine if (queryResult == null || queryResult.isEmpty()) { // nothing to do return false; ...
sb.append("AclVO{");
sb.append("Acl{");
public String toString() { StringBuffer sb = new StringBuffer(); sb.append("AclVO{"); if (!empty()) { sb.append("encoded=["); rewind(); while (hasMore()) { sb.append(getChar()); } sb.append("] "); rewind(); try { if (aces == null) { decode(getEncoded(...
null,
private void init() throws Throwable { svci = new CalSvc(); CalSvcIPars pars = new CalSvcIPars(account, account, null, // XXX needs envPrefix true, // public ...
form.getErr().emit("org.bedework.error.usernotfound");
form.getErr().emit("org.bedework.client.error.usernotfound");
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { String userId = request.getParameter("userid"); BwUser user; CalSvcI svci = form.getCalSvcI(); if (userId != null) { user = svci.findUser(userId); if (user == null) { form.getE...
form.getErr().emit("org.bedework.error.badinterval");
form.getErr().emit("org.bedework.client.error.badinterval");
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { String userId = request.getParameter("userid"); BwUser user; CalSvcI svci = form.getCalSvcI(); if (userId != null) { user = svci.findUser(userId); if (user == null) { form.getE...
form.getErr().emit("org.bedework.error.badintervalunit");
form.getErr().emit("org.bedework.client.error.badintervalunit");
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { String userId = request.getParameter("userid"); BwUser user; CalSvcI svci = form.getCalSvcI(); if (userId != null) { user = svci.findUser(userId); if (user == null) { form.getE...
logger.debug("creating an image with " + numLeft + " in the queue");
begin = new Date();
public void run(){ PlotInfo currentRequirements; BasicSeismogramDisplay.ImagePainter currentPatron; int numLeft; Graphics2D graphic; Image currentImage = null; BufferedImage buffCurrentImage = null; Dimension size; HashMap plotters; numLeft = requests.size(); while(numLeft > 0){ logger.debug("creating an i...
buffCurrentImage = new BufferedImage(size.width, size.height, BufferedImage.TYPE_BYTE_INDEXED);
buffCurrentImage = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_BGR);
public void run(){ PlotInfo currentRequirements; BasicSeismogramDisplay.ImagePainter currentPatron; int numLeft; Graphics2D graphic; Image currentImage = null; BufferedImage buffCurrentImage = null; Dimension size; HashMap plotters; numLeft = requests.size(); while(numLeft > 0){ logger.debug("creating an i...
}
} Date endPlotting = new Date(); long interval = (endPlotting.getTime() - beginPlotting.getTime()); logger.debug("plotting: " + interval + "ms"); plottingTotals += interval;
public void run(){ PlotInfo currentRequirements; BasicSeismogramDisplay.ImagePainter currentPatron; int numLeft; Graphics2D graphic; Image currentImage = null; BufferedImage buffCurrentImage = null; Dimension size; HashMap plotters; numLeft = requests.size(); while(numLeft > 0){ logger.debug("creating an i...
logger.debug("image creation thread is finished");
logger.debug("image total " + imageTotals + " plot total " + plottingTotals);
public void run(){ PlotInfo currentRequirements; BasicSeismogramDisplay.ImagePainter currentPatron; int numLeft; Graphics2D graphic; Image currentImage = null; BufferedImage buffCurrentImage = null; Dimension size; HashMap plotters; numLeft = requests.size(); while(numLeft > 0){ logger.debug("creating an i...
return super.meta_eval(ctx);
return null;
public ATObject meta_eval(ATContext ctx) { // TODO Auto-generated method stub return super.meta_eval(ctx); }
return super.meta_quote(ctx);
return null;
public ATAbstractGrammar meta_quote(ATContext ctx) { // TODO Auto-generated method stub return super.meta_quote(ctx); }
svci.addEvent(cal, proxy, null);
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } CalSvcI svci = form.fetchSvci(); EventInfo ei = findEvent(request, form); if (ei == null) { // Do nothing return "doNothing"; }...
form.getMsg().emit("org.bedework.client.message.added.eventrefs", 1);
try { svci.addEvent(cal, proxy, null); form.getMsg().emit("org.bedework.client.message.added.eventrefs", 1);
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } CalSvcI svci = form.fetchSvci(); EventInfo ei = findEvent(request, form); if (ei == null) { // Do nothing return "doNothing"; }...
return "success";
return "success"; } catch (CalFacadeException cfe) { if (CalFacadeException.duplicateGuid.equals(cfe.getMessage())) { form.getErr().emit("org.bedework.client.error.duplicate.guid"); return "duplicate"; } throw cfe; }
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } CalSvcI svci = form.fetchSvci(); EventInfo ei = findEvent(request, form); if (ei == null) { // Do nothing return "doNothing"; }...
svci.addEvent(null, proxy.getTarget(), null);
BwCalendar cal = svci.getPreferredCalendar(); proxy.setOwner(svci.getUser()); svci.addEvent(cal, proxy, null);
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } CalSvcI svci = form.fetchSvci(); EventInfo ei = findEvent(request, form); if (ei == null) { // Do nothing return "doNothing"; }...
char[] encoded = logEncoded(acl, "default encoded");
char[] encoded = logEncoded(acl, "default");
public void testBasics() { try { // Make sonme test objects BwUser unauth = new BwUser(); BwUser owner = new BwUser("anowner"); BwUser auser = new BwUser("auser"); BwUser auserInGroup = new BwUser("auseringroup"); BwGroup agroup = new BwGroup("agroup"); BwGroup bgroup = new BwGro...
acl.clear();
acl = new Acl(debug);
public void testBasics() { try { // Make sonme test objects BwUser unauth = new BwUser(); BwUser owner = new BwUser("anowner"); BwUser auser = new BwUser("auser"); BwUser auserInGroup = new BwUser("auseringroup"); BwGroup agroup = new BwGroup("agroup"); BwGroup bgroup = new BwGro...
log("---------------------------------------------------------"); acl = new Acl(debug); acl.addAce(new Ace(null, false, Ace.whoTypeAll, Privileges.makePriv(Privileges.privRead))); acl.addAce(new Ace(null, false, Ace.whoTypeUnauthenticated, Privileges.makePriv(Privileges.privNone))); encoded = logEncoded(acl, "read ...
public void testBasics() { try { // Make sonme test objects BwUser unauth = new BwUser(); BwUser owner = new BwUser("anowner"); BwUser auser = new BwUser("auser"); BwUser auserInGroup = new BwUser("auseringroup"); BwGroup agroup = new BwGroup("agroup"); BwGroup bgroup = new BwGro...
CurrentAccess ca = new Acl().evaluateAccess(who, owner.getAccount(), how, encoded, null);
CurrentAccess ca = new Acl(debug).evaluateAccess(who, owner.getAccount(), how, encoded, null);
private void tryEvaluateAccess(BwPrincipal who, BwPrincipal owner, Privilege[] how,char[] encoded, boolean expected, String title) throws Throwable { CurrentAccess ca = new Acl().evaluateAccess(who, owner.getAccount(), how, ...
this.displayKeys.add(key);
if(!this.displayKeys.contains(key)) { this.displayKeys.add(key); }
public void addDisplayKey(String key) { this.displayKeys.add(key); }
if(min > max) ampRange = new UnitRangeImpl(min, -min, seis.getAmplitudeRange().getUnit()); else ampRange = new UnitRangeImpl(-max, max, seis.getAmplitudeRange().getUnit());
double mean = seis.getMeanValue(beginIndex, endIndex).getValue(); double meanDiff = (Math.abs(mean - min) > Math.abs(mean - max) ? Math.abs(mean - min) : Math.abs(mean - max)); ampRange = new UnitRangeImpl(-meanDiff, meanDiff, seis.getAmplitudeRange().getUnit());
public OffsetMeanAmpConfig(LocalSeismogram aSeis, MicroSecondTimeRange range){ LocalSeismogramImpl seis = (LocalSeismogramImpl)aSeis; int beginIndex = SeisPlotUtil.getPixel(seis.getNumPoints(), seis.getBeginTime(), seis.getE...
if (pos == 0) return;
public void keyPressed(KeyEvent e) { int key = e.getKeyCode(); if (key == KeyEvent.VK_UP) { String current = getText(); if (current != null && current.length() > 0 && history.isBehind()) { history.append(current); } if (history.previous() != null) { setText((String)history.current()); } else { set...
boolean nonNull = false; for (int i = 0; i < array.length && !nonNull; i++ ) {
boolean allNull = true; for (int i = 0; i < array.length && allNull; i++ ) {
public static boolean allNull(Object[] array){ boolean nonNull = false; for (int i = 0; i < array.length && !nonNull; i++ ) { if(array[i] != null){ nonNull = true; } } return nonNull; }
nonNull = true;
allNull = false;
public static boolean allNull(Object[] array){ boolean nonNull = false; for (int i = 0; i < array.length && !nonNull; i++ ) { if(array[i] != null){ nonNull = true; } } return nonNull; }
return nonNull;
return allNull;
public static boolean allNull(Object[] array){ boolean nonNull = false; for (int i = 0; i < array.length && !nonNull; i++ ) { if(array[i] != null){ nonNull = true; } } return nonNull; }
Dimension size = currentRequirements.getSize();
public void run(){ PlotInfo currentRequirements; BasicSeismogramDisplay.ImagePainter currentPatron; int numLeft; Graphics2D graphic; Image currentImage; numLeft = requests.size(); while(numLeft > 0){ synchronized(this){ currentPatron = ((BasicSeismogramDisplay.ImagePainter)requests.getFirst()); currentRequ...
public static boolean getBoolProperty(String name) throws CalEnvException {
public boolean getBoolProperty(String name) throws CalEnvException {
public static boolean getBoolProperty(String name) throws CalEnvException { String val = getProperty(name); val = val.toLowerCase(); return "true".equals(val) || "yes".equals(val); }
public static boolean getGlobalBoolProperty(String name) throws CalEnvException {
public boolean getGlobalBoolProperty(String name) throws CalEnvException {
public static boolean getGlobalBoolProperty(String name) throws CalEnvException { return getBoolProperty(globalPrefix + name); }
public static int getGlobalIntProperty(String name) throws CalEnvException {
public int getGlobalIntProperty(String name) throws CalEnvException {
public static int getGlobalIntProperty(String name) throws CalEnvException { return getIntProperty(globalPrefix + name); }
public static Object getGlobalObject(String name, Class cl) throws CalEnvException {
public Object getGlobalObject(String name, Class cl) throws CalEnvException {
public static Object getGlobalObject(String name, Class cl) throws CalEnvException { try { String className = getGlobalProperty(name); Object o = Class.forName(className).newInstance(); if (o == null) { throw new CalEnvException("Class " + className + " not found"); } if (!cl.isInst...
public static String getGlobalProperty(String name) throws CalEnvException {
public String getGlobalProperty(String name) throws CalEnvException {
public static String getGlobalProperty(String name) throws CalEnvException { return getProperty(globalPrefix + name); }
public static int getIntProperty(String name) throws CalEnvException {
public int getIntProperty(String name) throws CalEnvException {
public static int getIntProperty(String name) throws CalEnvException { String val = getProperty(name); try { return Integer.valueOf(val).intValue(); } catch (Throwable t) { throw new CalEnvException("Invalid property " + name + " = " + val); } }
public static String getOptProperty(String name) throws CalEnvException {
public String getOptProperty(String name) throws CalEnvException {
public static String getOptProperty(String name) throws CalEnvException { String val = getPr().getProperty(name); return val; }
public static Properties getProperties() throws CalEnvException {
public Properties getProperties() throws CalEnvException {
public static Properties getProperties() throws CalEnvException { return getPr(); }
public static String getProperty(String name) throws CalEnvException {
public String getProperty(String name) throws CalEnvException {
public static String getProperty(String name) throws CalEnvException { String val = getPr().getProperty(name); if (val == null) { throw new CalEnvException("Missing property " + name); } return val; }
addExecutedSQLQueries(executedSQLStatements);
if("true".equals(getBundle(iwc).getProperty(ADD_QUERY_SQL_FOR_DEBUG,"false"))){ addExecutedSQLQueries(executedSQLStatements); }
private void getSingleQueryView(IWBundle bundle, IWResourceBundle resourceBundle, String action, IWContext iwc) throws RemoteException { String errorMessage = null; QueryService queryService = getQueryService(); int currentQueryId = ((Integer) parameterMap.get(CURRENT_QUERY_ID)).intValue(); QueryHelper queryHelp...
Enumeration en = getNsIntf().getProperties(node);
Iterator it = getNsIntf().iterateProperties(node);
private void doNodeNsProperties(WebdavNsNode node) throws WebdavException { Enumeration en = getNsIntf().getProperties(node); WebdavNsIntf intf = getNsIntf(); while (en.hasMoreElements()) { WebdavProperty prop = (WebdavProperty)en.nextElement(); intf.generatePropValue(node, prop); } }
while (en.hasMoreElements()) { WebdavProperty prop = (WebdavProperty)en.nextElement();
while (it.hasNext()) { WebdavProperty prop = (WebdavProperty)it.next();
private void doNodeNsProperties(WebdavNsNode node) throws WebdavException { Enumeration en = getNsIntf().getProperties(node); WebdavNsIntf intf = getNsIntf(); while (en.hasMoreElements()) { WebdavProperty prop = (WebdavProperty)en.nextElement(); intf.generatePropValue(node, prop); } }
WebdavProperty prop = new WebdavProperty( new QName(propnode.getNamespaceURI(), propnode.getLocalName()), null);
WebdavProperty prop = makeProp(propnode);
public PropRequest parseProps(Node nd) throws WebdavException { PropRequest pr = new PropRequest(PropRequest.reqProp); pr.props = new ArrayList(); Element[] children = getChildren(nd); for (int i = 0; i < children.length; i++) { Element propnode = children[i]; WebdavProperty prop = new WebdavPro...
calendars.addNewCalendars();
calendars.addNewCalendars(user);
public void addUser(BwUser user) throws CalFacadeException { addNewUser(user); calendars.addNewCalendars(); }
calendars.addNewCalendars();
calendars.addNewCalendars(authUser);
public boolean init(String authenticatedUser, String user, boolean publicAdmin, boolean superUser, Groups groups, String synchId, boolean debug) throws CalFacadeException { this.debug = deb...
if (MethodBase.nodeMatches(curnode, CaldavTags.isDefined)) {
if (MethodBase.nodeMatches(curnode, CaldavTags.isNotDefined)) {
private CompFilter parseCompFilter(Node nd) throws WebdavException { String name = getOnlyAttrVal(nd, "name"); if (name == null) { throw new WebdavBadRequest(); } CompFilter cf = new CompFilter(name); Element[] children = getChildren(nd); try { for (int i = 0; i < children.length; i++) { ...
cf.setIsDefined(true);
cf.setIsNotDefined(true);
private CompFilter parseCompFilter(Node nd) throws WebdavException { String name = getOnlyAttrVal(nd, "name"); if (name == null) { throw new WebdavBadRequest(); } CompFilter cf = new CompFilter(name); Element[] children = getChildren(nd); try { for (int i = 0; i < children.length; i++) { ...
if (cf.getIsDefined()) {
if (cf.getIsNotDefined()) {
private CompFilter parseCompFilter(Node nd) throws WebdavException { String name = getOnlyAttrVal(nd, "name"); if (name == null) { throw new WebdavBadRequest(); } CompFilter cf = new CompFilter(name); Element[] children = getChildren(nd); try { for (int i = 0; i < children.length; i++) { ...
if (MethodBase.nodeMatches(child, CaldavTags.isDefined)) {
if (MethodBase.nodeMatches(child, CaldavTags.isNotDefined)) {
private ParamFilter parseParamFilter(Node nd) throws WebdavException { String name = getOnlyAttrVal(nd, "name"); if (name == null) { status = HttpServletResponse.SC_BAD_REQUEST; return null; } // Only one child - either is-defined | text-match Element child = getOnlyChild(nd); if (debug) {...
if (MethodBase.nodeMatches(curnode, CaldavTags.isDefined)) { pf.setIsDefined(true);
if (MethodBase.nodeMatches(curnode, CaldavTags.isNotDefined)) { pf.setIsNotDefined(true);
private PropFilter parsePropFilter(Node nd) throws WebdavException { String name = getOnlyAttrVal(nd, "name"); if (name == null) { status = HttpServletResponse.SC_BAD_REQUEST; return null; } PropFilter pf = new PropFilter(name); Element[] children = getChildren(nd); boolean idTrTm = false;...
pf.setIsDefined(true);
private PropFilter parsePropFilter(Node nd) throws WebdavException { String name = getOnlyAttrVal(nd, "name"); if (name == null) { status = HttpServletResponse.SC_BAD_REQUEST; return null; } PropFilter pf = new PropFilter(name); Element[] children = getChildren(nd); boolean idTrTm = false;...
d.addRule("caldata/*/owner-key", new OwnerRule(globals)); d.addRule("caldata/*/owner-key/*", new OwnerFieldRule(globals));
public void addRuleInstances(Digester d) { d.addRule("caldata/syspars/system", new SysparsRule(globals)); d.addRule("caldata/syspars/system/*", new SysparsFieldRule(globals)); UserFieldRule ufr = new UserFieldRule(globals); d.addRule("caldata/users/user", new UserRule(globals)); d.addRule("caldata/user...
if (selected == null || selected.length == 0) { return; }
public void shiftSelectedDown() { int[] selected = table.getSelectedRows(); for (int i = selected.length - 1; i >= 0; i--) { model.swap(selected[i], selected[i]+1); } int first = selected[0] + 1; int last = selected[selected.length - 1] + 1; try { table.setRowSelectionInterval(first, last); } catc...
if (selected == null || selected.length == 0) { return; }
public void shiftSelectedUp() { int[] selected = table.getSelectedRows(); for (int i = 0; i < selected.length; i++) { model.swap(selected[i]-1, selected[i]); } int first = selected[0] - 1; int last = selected[selected.length - 1] - 1; try { table.setRowSelectionInterval(first, last); } catch (Exce...
if (seis.getEndTime().subtract(seis.getBeginTime()).lessThan(delay) || nsta > ntdly) {
if (seis.getEndTime().subtract(seis.getBeginTime()).lessThan(delay) || nsta > ntdly || ntdly > seis.getNumPoints()) {
public LongShortTrigger[] calcTriggers(LocalSeismogramImpl seis) throws FissuresException { LinkedList out = new LinkedList(); float[] seisData = seis.get_as_floats(); // establish number of points in LTA and STA windows // as well as in trgdly float dt = (float)seis.getSampl...
System.out.println("seis is too short, so no trigger possible");
public LongShortTrigger[] calcTriggers(LocalSeismogramImpl seis) throws FissuresException { LinkedList out = new LinkedList(); float[] seisData = seis.get_as_floats(); // establish number of points in LTA and STA windows // as well as in trgdly float dt = (float)seis.getSampl...
xmean += seisData[nlta-nmean-1];
xmean += seisData[ntdly-nmean-1];
public LongShortTrigger[] calcTriggers(LocalSeismogramImpl seis) throws FissuresException { LinkedList out = new LinkedList(); float[] seisData = seis.get_as_floats(); // establish number of points in LTA and STA windows // as well as in trgdly float dt = (float)seis.getSampl...
System.out.println("i="+i+" xmean="+xmean+" nmean="+nmean+" ylta="+ylta+" ysta="+ysta+" ratio="+ratio);
public LongShortTrigger[] calcTriggers(LocalSeismogramImpl seis) throws FissuresException { LinkedList out = new LinkedList(); float[] seisData = seis.get_as_floats(); // establish number of points in LTA and STA windows // as well as in trgdly float dt = (float)seis.getSampl...
assertEquals("stat["+i+"]", n*(n+1)*(2*n+1)/6, (int)stat[i].binaryIndexSum(0, stat[i].getLength()));
double sumSquare = 1.0*n*(n+1)*(2*n+1)/6; assertEquals("stat["+i+"]", sumSquare, stat[i].binaryIndexSum(0, stat[i].getLength()), 0.00001*sumSquare);
public void testBinaryIndexSum() throws Exception { // JUnitDoclet begin method binaryIndexSum for ( int i = 0; i<stat.length; i++) { int n=stat[i].getLength()-1; assertEquals("stat["+i+"]", n*(n+1)*(2*n+1)/6, (int)stat[i].binaryIndexSum(0, stat[i].getLength())); } // end ...
double out = stat[i].binarySum(0, intTestData.length);
double out = stat[i].binarySum(0, stat[i].getLength());
public void testBinarySum() throws Exception { for ( int i = 0; i<stat.length; i++) { int n=stat[i].getLength()-1; double out = stat[i].binarySum(0, intTestData.length); assertEquals("BinarySum", n*(n+1)/2, out, 0.0000001); } // end of for () }