rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
System.out.println("[Korta] PostData = "+strPostData.toString()); | private Hashtable getFirstResponse() throws KortathjonustanAuthorizationException { Hashtable properties = null; //System.out.println(" ------ REQUEST ------"); //long lStartTime = System.currentTimeMillis(); try { SSLClient client = getSSLClient(); StringBuffer strPostData = new StringBuffer(); appendProper... | |
System.out.println("[Korta] post_data = "+strPostData.toString()); | private String getPostData(Hashtable properties) { StringBuffer strPostData = new StringBuffer(); try { appendProperty(strPostData, PROPERTY_PASSWORD, PASSWORD); addProperties(strPostData, properties); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } System.out.println("[Korta] post_data =... | |
base, | dirURL, | void process() throws ParserConfigurationException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = factory.newDocumentBuilder(); String userName = System.getProperty("user.name"); dataset = new XMLDataSet(docBuilder, base, "genid"+Math.roun... |
URL dirURL = new URL(base, directory.getName()+"/"); | void process() throws ParserConfigurationException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = factory.newDocumentBuilder(); String userName = System.getProperty("user.name"); dataset = new XMLDataSet(docBuilder, base, "genid"+Math.roun... | |
URL seisURL = new URL(base, sacFiles[i].getName()); | URL seisURL = new URL(dirURL, sacFiles[i].getName()); | void process() throws ParserConfigurationException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = factory.newDocumentBuilder(); String userName = System.getProperty("user.name"); dataset = new XMLDataSet(docBuilder, base, "genid"+Math.roun... |
return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; | throw new WebdavException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); | private int processDoc(Document doc) throws WebdavException { try { WebdavNsIntf intf = getNsIntf(); Element root = doc.getDocumentElement(); /* Get hold of the PROPFIND method instance - we need it to process possible prop requests. */ PropFindMethod pm = (PropFindMethod)intf.fin... |
File directory, Channel channel, EventAccessOperations event) throws IOException, NoPreferredOrigin, CodecException { SacTimeSeries sac; String seisFilename = ""; seisFilename = ChannelIdUtil.toStringNoDates(seis.channel_id); seisFilename.replace(' ', '.'); File seisFile = new File(directory, seisFilename); int n =0; ... | File directory) throws IOException, CodecException { try { return saveAsSac(seis, directory, null, null); } catch (NoPreferredOrigin e) { | public static URL saveAsSac(LocalSeismogramImpl seis, File directory, Channel channel, EventAccessOperations event) throws IOException, NoPreferredOrigin, CodecException { SacTimeSeries sac; Str... |
sac.write(seisFile); return seisFile.toURL(); | return null; | public static URL saveAsSac(LocalSeismogramImpl seis, File directory, Channel channel, EventAccessOperations event) throws IOException, NoPreferredOrigin, CodecException { SacTimeSeries sac; Str... |
logger.debug("Original URL: " + url.toExternalForm()); | private URL appendParameters(URL url, Map<String, String> additionalParams) throws UnsupportedEncodingException, MalformedURLException { // get the request encoding HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); String encoding = request.getCharacterEncoding(); // not... | |
logger.debug("Original path: " + path); logger.debug("Original query string: " + queryString); | private URL appendParameters(URL url, Map<String, String> additionalParams) throws UnsupportedEncodingException, MalformedURLException { // get the request encoding HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); String encoding = request.getCharacterEncoding(); // not... | |
logger.debug("New query string: " + queryString); | private URL appendParameters(URL url, Map<String, String> additionalParams) throws UnsupportedEncodingException, MalformedURLException { // get the request encoding HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); String encoding = request.getCharacterEncoding(); // not... | |
logger.debug("New URL: " + result); | private URL appendParameters(URL url, Map<String, String> additionalParams) throws UnsupportedEncodingException, MalformedURLException { // get the request encoding HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); String encoding = request.getCharacterEncoding(); // not... | |
logger.debug("Prev link: " + prevLink); logger.debug("Next link: " + nextLink); | public int doEndTag() throws JspException { try { JspWriter out = pageContext.getOut(); // get locale-specific stuff locale = getDefaultLocale(); if (resourceBundle == null) resourceBundle = getDefaultResourceBundle(); if (timeZone == null) timeZone = getDefaultTimeZone(); ... | |
logger.debug("request_uri: " + request.getAttribute("javax.servlet.forward.request_uri")); logger.debug("context_path: " + request.getAttribute("javax.servlet.forward.context_path")); logger.debug("servlet_path: " + request.getAttribute("javax.servlet.forward.servlet_path")); logger.debug("path_info: " + request.getAtt... | private URL getCurrentUrl(HttpServletRequest request) throws MalformedURLException { StringBuilder buf = new StringBuilder(); String scheme = request.getScheme(); int port = request.getServerPort(); buf.append(scheme); buf.append("://"); buf.append(request.getServerName()); if ("http... | |
logger.debug("Current URL: " + name); | private URL getCurrentUrl(HttpServletRequest request) throws MalformedURLException { StringBuilder buf = new StringBuilder(); String scheme = request.getScheme(); int port = request.getServerPort(); buf.append(scheme); buf.append("://"); buf.append(request.getServerName()); if ("http... | |
logger.debug("next link, month=" + current.get(Calendar.MONTH)); | private String getDefaultNextLink(Calendar current) throws MalformedURLException, UnsupportedEncodingException { logger.debug("next link, month=" + current.get(Calendar.MONTH)); Calendar nextCal = Calendar.getInstance(timeZone, locale); nextCal.setTime(current.getTime()); nextCal.add(Calendar.MONTH, 1... | |
logger.debug("prev link, month=" + current.get(Calendar.MONTH)); | private String getDefaultPrevLink(Calendar current) throws MalformedURLException, UnsupportedEncodingException { logger.debug("prev link, month=" + current.get(Calendar.MONTH)); Calendar prevCal = Calendar.getInstance(timeZone, locale); prevCal.setTime(current.getTime()); prevCal.add(Calendar.MONTH, -1); ... | |
form.getErr().emit("org.bedework.client.error.missingcalendar"); return null; | if (getPublicAdmin(form)) { form.getErr().emit("org.bedework.client.error.missingcalendar"); return "retry"; } cal = svci.getPreferredCalendar(); | public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } CalSvcI svci = form.fetc... |
return null; | 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 svci = form.fetc... |
System.out.println(internalTimeConfig.getTimeRange().getBeginTime()); return internalTimeConfig; } | return internalTimeConfig; } | public TimeRangeConfig getInternalConfig(){ System.out.println(internalTimeConfig.getTimeRange().getBeginTime()); return internalTimeConfig; } |
return null; | return new GeneralPath(); | public Shape draw(Dimension size){ if(visible){ MicroSecondTimeRange overTimeRange = timeRegistrar.getTimeRange(). getOversizedTimeRange(BasicSeismogramDisplay.OVERSIZED_SCALE); if(flagTime.before(overTimeRange.getBeginTime()) || flagTime.after(overTimeRange.getEndTime())) return null; double offset =... |
if (value == null) return null; | public static String attribute(String value) { StringBuilder builder = new StringBuilder(); for (char c : value.toCharArray()) { switch (c) { case '&': builder.append("&"); break; case '<': builder.append("<"); break; case '>': builder.append(">"); break; case '"': builder... | |
mySubject.getClassifiers().add(resolution); | mySubject.getClassifiers().add((Classifier)resolution); | public void lookupResolved(NamedElement resolution) { if (resolution instanceof Classifier){ mySubject.getClassifiers().add(resolution); } } |
public static LocalSeismogram removeMean(LocalSeismogram seis){ if(seismo.can_convert_to_float()){ | public static LocalSeismogram removeMean(LocalSeismogramImpl seis){ TimeSeriesType dataType = seis.getDataType(); TimeSeriesDataSel dataSel = new TimeSeriesDataSel(); switch (dataType.value()) { case TimeSeriesType._TYPE_LONG: int[] iSeries = seis.get_as_longs(); return new LocalSeismogramImpl(seis, removeMean(iSeries)... | public static LocalSeismogram removeMean(LocalSeismogram seis){ if(seismo.can_convert_to_float()){ float[] fSeries = seis.get_as_floats(); return new LocalSeismogramImpl(seis, removeMean(fSeries)); }else{ int[] iSeries = seismo.get_as_longs(); return new LocalSeismogramImpl(seis, removeMean(iSeries)... |
}else{ int[] iSeries = seismo.get_as_longs(); return new LocalSeismogramImpl(seis, removeMean(iSeries)); } | case TimeSeriesType._TYPE_DOUBLE: double[] dSeries = seis.get_as_doubles(); return new LocalSeismogramImpl(seis, removeMean(dSeries)); default: return null; } | public static LocalSeismogram removeMean(LocalSeismogram seis){ if(seismo.can_convert_to_float()){ float[] fSeries = seis.get_as_floats(); return new LocalSeismogramImpl(seis, removeMean(fSeries)); }else{ int[] iSeries = seismo.get_as_longs(); return new LocalSeismogramImpl(seis, removeMean(iSeries)... |
comp[1][j] = getMinValue(uncomp[1], startIndex, endIndex); comp[1][j+1] = (int)getMaxValue(uncomp[1], startIndex, endIndex); comp[0][j] = uncomp[0][endIndex]; comp[0][j+1] = uncomp[0][endIndex]; return comp; | if(xvalue != 0) { startIndex = uncomp[0].length - 1; endIndex = uncomp[0].length - 1; comp[1][j] = getMinValue(uncomp[1], startIndex, endIndex); comp[1][j+1] = (int)getMaxValue(uncomp[1], startIndex, endIndex); comp[0][j] = uncomp[0][endIndex]; comp[0][j+1] = uncomp[0][endIndex]; j = j + 2; | protected static int[][] compressYvalues(LocalSeismogram seismogram, MicroSecondTimeRange tr, UnitRangeImpl ampRange, Dimension size)throws UnsupportedDataEncoding { int[][] uncomp = scaleXvalues(seismogram, tr, ampRange, size); // enough points to take the extra time to compress the lin... |
int temp[][] = new int[2][j]; System.arraycopy(comp[0], 0, temp[0], 0, j); System.arraycopy(comp[1], 0, temp[1], 0, j); return temp; } | protected static int[][] compressYvalues(LocalSeismogram seismogram, MicroSecondTimeRange tr, UnitRangeImpl ampRange, Dimension size)throws UnsupportedDataEncoding { int[][] uncomp = scaleXvalues(seismogram, tr, ampRange, size); // enough points to take the extra time to compress the lin... | |
int tempValue; | int tempValue = 0; | protected static int[][] scaleXvalues(LocalSeismogram seismogram, MicroSecondTimeRange timeRange, UnitRangeImpl ampRange, Dimension size) throws UnsupportedDataEncoding { LocalSeismogramImpl seis = (LocalSeismogramImpl)seismogram; int[][] out = new int[2][]; int seisIndex = 0; int pixelIn... |
out[1][numAdded] = tempYvalues[j-1]; out[1][numAdded+1] = tempYvalues[j-1]; | out[1][numAdded] = getMinValue(tempYvalues, 0, j-1); out[1][numAdded+1] = (int)getMaxValue(tempYvalues, 0, j-1); | protected static int[][] scaleXvalues(LocalSeismogram seismogram, MicroSecondTimeRange timeRange, UnitRangeImpl ampRange, Dimension size) throws UnsupportedDataEncoding { LocalSeismogramImpl seis = (LocalSeismogramImpl)seismogram; int[][] out = new int[2][]; int seisIndex = 0; int pixelIn... |
xvalue = tempValue; | protected static int[][] scaleXvalues(LocalSeismogram seismogram, MicroSecondTimeRange timeRange, UnitRangeImpl ampRange, Dimension size) throws UnsupportedDataEncoding { LocalSeismogramImpl seis = (LocalSeismogramImpl)seismogram; int[][] out = new int[2][]; int seisIndex = 0; int pixelIn... | |
logger.debug("setBegin "+newBegin); | public void setBegin(MicroSecondDate newBegin){ if ( latestTime.getTime().getEndTime().equals(newBegin)) { throw new IllegalArgumentException("Selection must not have zero width, newBegin and end are the same."); } // end of if () logger.debug("setBegin "+newBegin); MicroSecondDate currentBegin = latestTime.ge... | |
logger.debug("setEnd "+newEnd); | public void setEnd(MicroSecondDate newEnd){ if ( latestTime.getTime().getBeginTime().equals(newEnd)) { throw new IllegalArgumentException("Selection must not have zero width, begin and newEnd are the same."); } // end of if () logger.debug("setEnd "+newEnd); MicroSecondDate currentEnd = latestTime.getTime().get... | |
} else { | } else if(yearBox != null) { | private void dateChanged(){ updateToday(); int todaysYear = todayCalendar.get(Calendar.YEAR); int calJulianDay = calendar.get(Calendar.DAY_OF_YEAR); int todaysJulianDay = todayCalendar.get(Calendar.DAY_OF_YEAR); int calYear = calendar.get(Calendar.YEAR); otherButton.setSe... |
subs = new Vector(); | subs = new ArrayList(); | public BwFreeBusy getFreeBusy(BwCalendar cal, BwPrincipal who, BwDateTime start, BwDateTime end) throws CalFacadeException { if (!(who instanceof BwUser)) { throw new CalFacadeException("Unsupported: non user principal for free-busy"); } if (isGuest() || (!current... |
public Shaker3D(int waveFlag, float baz, float angI) { this.backAzimuth = baz; this.angleOfIncidence = angI; this.setWaveType(waveFlag); | public Shaker3D() { | public Shaker3D(int waveFlag, float baz, float angI) { this.backAzimuth = baz; this.angleOfIncidence = angI; this.setWaveType(waveFlag); } |
private JPanel createButtonPanel(final JFrame displayFrame){ | private JPanel createButtonPanel(){ | private JPanel createButtonPanel(final JFrame displayFrame){ JButton closeButton = new JButton("Close"); closeButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { displayFrame.dispose(); displayPan... |
public void actionPerformed(ActionEvent ex) { try{ writeFile(); }catch(IOException e){ int result = JOptionPane.showConfirmDialog(displayPanel, "We were unable to write to that file. Try again?", "Trouble writing exception file", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE); if(result == JOptionPane.OK_OP... | public void actionPerformed(ActionEvent e) { displayFrame.dispose(); displayFrame = null; displayPanel = null; | public void actionPerformed(ActionEvent ex) { try{ writeFile(); }catch(IOException e){ int result = JOptionPane.showConfirmDialog(displayPanel, ... |
JFrame displayFrame = new JFrame(); | displayFrame = new JFrame(); displayFrame.setDefaultCloseOperation (WindowConstants.DISPOSE_ON_CLOSE); | private void createFrame() { JFrame displayFrame = new JFrame(); displayFrame.addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent e) { displayPanel = null; } }); displayPanel = new JPanel(new Bo... |
displayPanel.add(createButtonPanel(displayFrame), | displayPanel.add(createButtonPanel(), | private void createFrame() { JFrame displayFrame = new JFrame(); displayFrame.addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent e) { displayPanel = null; } }); displayPanel = new JPanel(new Bo... |
displayFrame.pack(); displayFrame.show(); | private void createFrame() { JFrame displayFrame = new JFrame(); displayFrame.addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent e) { displayPanel = null; } }); displayPanel = new JPanel(new Bo... | |
if(displayPanel == null){ createFrame(); } | createFrame(); | public void report(String message, Throwable e, List sections) { this.message = message; this.e = e; this.sections = sections; if(displayPanel == null){ createFrame(); } displayPanel.add(createGUI(e, message, sections), BorderLayout.CENTER... |
SwingUtilities.invokeLater(new Runnable() { public void run() { displayFrame.pack(); displayFrame.show(); } }); | public void report(String message, Throwable e, List sections) { this.message = message; this.e = e; this.sections = sections; if(displayPanel == null){ createFrame(); } displayPanel.add(createGUI(e, message, sections), BorderLayout.CENTER... | |
BwCalSuite cs = fetchCalSuite(getSess(), val.getName()); if (cs != null) { throw new CalFacadeException("org.bedework.duplicate.calsuite"); } | public BwCalSuiteWrapper addCalSuite(BwCalSuite val) throws CalFacadeException { HibSession sess = getSess(); sess.save(val); CurrentAccess ca = checkAccess(val, PrivilegeDefs.privAny, false); return new BwCalSuiteWrapper(val, ca); } | |
DistAz distAz = new DistAz(station.latitude, station.longitude, | double degrees = SphericalCoords.distance(station.latitude, station.longitude, | public synchronized MicroSecondDate calculate(Origin origin, Location station) throws TauModelException { QuantityImpl depth = (QuantityImpl)origin.my_location.depth; depth = depth.convertTo(UnitImpl.KILOMETER); taup.setSourceDepth(depth.getValue()); DistAz distAz = new DistAz(station.la... |
taup.calculate(distAz.delta); | taup.calculate(degrees); | public synchronized MicroSecondDate calculate(Origin origin, Location station) throws TauModelException { QuantityImpl depth = (QuantityImpl)origin.my_location.depth; depth = depth.convertTo(UnitImpl.KILOMETER); taup.setSourceDepth(depth.getValue()); DistAz distAz = new DistAz(station.la... |
public CalEnv getEnv(ActionForm frm) throws Throwable { CalEnv env = frm.getEnv(); | public CalEnvI getEnv(ActionForm frm) throws Throwable { CalEnvI env = frm.getEnv(); | public CalEnv getEnv(ActionForm frm) throws Throwable { CalEnv env = frm.getEnv(); if (env != null) { return env; } env = new CalEnv(envPrefix, debug); frm.assignEnv(env); return env; } |
env = new CalEnv(envPrefix, debug); | env = CalEnvFactory.getEnv(envPrefix, debug); | public CalEnv getEnv(ActionForm frm) throws Throwable { CalEnv env = frm.getEnv(); if (env != null) { return env; } env = new CalEnv(envPrefix, debug); frm.assignEnv(env); return env; } |
CalEnv env = getEnv(form); | CalEnvI env = getEnv(form); | public void setup(HttpServletRequest request, ActionForm form, MessageResources messages) throws Throwable { BwSession s = BwWebUtil.getState(request); if (s != null) { } else { CalEnv env = getEnv(form); String appName = env.getAppProperty("name"); String... |
public CalEnv getEnv() { | public CalEnvI getEnv() { | public CalEnv getEnv() { return env; } |
public void assignEnv(CalEnv val) { | public void assignEnv(CalEnvI val) { | public void assignEnv(CalEnv val) { env = val; } |
properties = (Properties)CalEnv.getProperties().clone(); | if (env == null) { throw new Exception("No env set"); } properties = (Properties)env.getProperties().clone(); | public Properties getProperties() { if (properties == null) { try { properties = (Properties)CalEnv.getProperties().clone(); } catch (Throwable t) { getErr().emit(t); } } return properties; } |
editEvent = val; | public void setEditEvent(BwEvent val) { try { editEvent = val; if (val == null) { getEventDates().setNewEvent(val, fetchSvci().getTimezones()); } else { getEventDates().setFromEvent(val, fetchSvci().getTimezones()); } } catch (Throwable t) { err.emit(t); } } | |
editEvent = val; | public void setEditEvent(BwEvent val) { try { editEvent = val; if (val == null) { getEventDates().setNewEvent(val, fetchSvci().getTimezones()); } else { getEventDates().setFromEvent(val, fetchSvci().getTimezones()); } } catch (Throwable t) { err.emit(t); } } | |
public void removeListener(PlayerListener listener); | public void removeListener(PlayerListener listener) { listeners.remove(listener); } | public void removeListener(PlayerListener listener); |
return fromIcal(cal, bldr.build(new UnfoldingReader(new StringReader(val)))); | return fromIcal(cal, bldr.build(new StringReader(val), true)); | public Collection fromIcal(BwCalendar cal, String val) throws CalFacadeException { try { CalendarBuilder bldr = new CalendarBuilder(new CalendarParserImpl()); return fromIcal(cal, bldr.build(new UnfoldingReader(new StringReader(val)))); } catch (ParserException pe) { if (debug) { error(pe)... |
private String doDir(Vector v, DirClass dir, String indent) throws CalFacadeException { | private String doDir(ArrayList al, DirClass dir, String indent) throws CalFacadeException { | private String doDir(Vector v, DirClass dir, String indent) throws CalFacadeException { if (debug) { trace(indent + "Dir: " + dir.cal.getName()); } Iterator dit = dir.dirs.iterator(); while (dit.hasNext()) { doDir(v, (DirClass)dit.next(), indent + " "); } Iterator tzit = dir.tzs.iterator(... |
doDir(v, (DirClass)dit.next(), indent + " "); | doDir(al, (DirClass)dit.next(), indent + " "); | private String doDir(Vector v, DirClass dir, String indent) throws CalFacadeException { if (debug) { trace(indent + "Dir: " + dir.cal.getName()); } Iterator dit = dir.dirs.iterator(); while (dit.hasNext()) { doDir(v, (DirClass)dit.next(), indent + " "); } Iterator tzit = dir.tzs.iterator(... |
v.add(tzi); | al.add(tzi); | private String doDir(Vector v, DirClass dir, String indent) throws CalFacadeException { if (debug) { trace(indent + "Dir: " + dir.cal.getName()); } Iterator dit = dir.dirs.iterator(); while (dit.hasNext()) { doDir(v, (DirClass)dit.next(), indent + " "); } Iterator tzit = dir.tzs.iterator(... |
Vector v = new Vector(); | ArrayList al = new ArrayList(); | public Collection getTimeZones() throws CalFacadeException { /* The input file should look something like: <dir> <name>A-name</name> <dir>...</dir> <file> <name>file1.ics</name> <data>...</data> </file> </dir> We ignore the first name - it represents the root. Each <di... |
doDir(v, rootDir, ""); | doDir(al, rootDir, ""); | public Collection getTimeZones() throws CalFacadeException { /* The input file should look something like: <dir> <name>A-name</name> <dir>...</dir> <file> <name>file1.ics</name> <data>...</data> </file> </dir> We ignore the first name - it represents the root. Each <di... |
return v; | return al; | public Collection getTimeZones() throws CalFacadeException { /* The input file should look something like: <dir> <name>A-name</name> <dir>...</dir> <file> <name>file1.ics</name> <data>...</data> </file> </dir> We ignore the first name - it represents the root. Each <di... |
AffineTransform insetMove = AffineTransform.getTranslateInstance(x, y); copy.transform(insetMove); | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g; if (copy != null) { try { ... | |
insets.left -= x+left; insets.top -= y+top; insets.right -= right + c.getSize().width - x - left; insets.bottom -= bottom + c.getSize().height - y - top; | insets.top -= y+top; insets.bottom -= bottom + y; | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g; if (copy != null) { try { ... |
String labelTemp; | System.out.println(x + " " + y + " " + insets.left + " " + insets.right + " " + insets.top + " " + insets.bottom + " " + top + " " + left + " " + bottom + " " + right); String labelTemp; | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g; if (copy != null) { try { ... |
pixelLoc = insets.left + left + topScaleMap.getPixelLocation(i); | pixelLoc = insets.left + topScaleMap.getPixelLocation(i); | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g; if (copy != null) { try { ... |
pixelLoc = insets.top+top+ leftScaleMap.getPixelLocation(i); if (pixelLoc >=insets.top+top && pixelLoc <=height-insets.bottom-bottom) { if (leftScaleMap.isMajorTick(i)) { copy.draw(new Line2D.Float(left-majorTickLength, pixelLoc, left, pixelLoc)); } else { copy.draw(new Line2D.Float(left-minorTickLength, pixelLoc, left... | pixelLoc = height - leftScaleMap.getPixelLocation(i) - bottom; if (leftScaleMap.isMajorTick(i)) { copy.draw(new Line2D.Float(insets.left -majorTickLength - insets.right, pixelLoc, insets.left - insets.right, pixelLoc)); } else { copy.draw(new Line2D.Float(insets.left - insets.right - minorTickLength, pixelLoc, insets.... | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g; if (copy != null) { try { ... |
pixelLoc = insets.left + left+ bottomScaleMap.getPixelLocation(i); if (pixelLoc >=insets.left + left && pixelLoc <= width - insets.right) { if (bottomScaleMap.isMajorTick(i)) { | pixelLoc = insets.left + bottomScaleMap.getPixelLocation(i); if (bottomScaleMap.isMajorTick(i)) { | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g; if (copy != null) { try { ... |
} | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g; if (copy != null) { try { ... | |
pixelLoc = insets.top + top+ rightScaleMap.getPixelLocation(i); | pixelLoc = height - rightScaleMap.getPixelLocation(i) - bottom; | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g; if (copy != null) { try { ... |
public static void rotate(float[] x, float[] y, double radians) { rotate(x, y, AffineTransform.getRotateInstance(radians)); | public static float[][] rotate(LocalSeismogramImpl x, LocalSeismogramImpl y, double radians) throws FissuresException { float[][] data = new float[2][]; float[] temp = x.get_as_floats(); data[0] = new float[temp.length]; System.arraycopy(temp, 0, data[0], 0, temp.length); temp = y.get_as_floats(); data[1] = new float[... | public static void rotate(float[] x, float[] y, double radians) { rotate(x, y, AffineTransform.getRotateInstance(radians)); } |
out.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"); out.write("<opml version=\"1.0\">\n"); out.write(" <head>\n"); out.write(" <title/>\n"); out.write(" </head>\n"); out.write(" <body>\n"); saveIdea(idea); out.write(" </body>\n"); out.write("</opml>\n"); | try { db = DocumentBuilderFactory.newInstance( ).newDocumentBuilder(); Document document = db.newDocument(); document.setXmlVersion("1.0"); Element opml = document.createElement("opml"); opml.setAttribute("version", "1.0"); document.appendChild(opml); Element head = document.createElement("head"); opml.appendChild(he... | private void save(Idea idea) throws IOException { out.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"); out.write("<opml version=\"1.0\">\n"); out.write(" <head>\n"); out.write(" <title/>\n"); out.write(" </head>\n"); out.write(" ... |
finally { release(); } | public int doEndTag() throws JspException { try { JspWriter out = pageContext.getOut(); out.write("</select>"); } catch (IOException ioe) { throw new JspException(ioe); } return EVAL_PAGE; } | |
public void addSelection(Selection newSelection){ selections.add(newSelection); } | public void addSelection(Selection newSelection){ if(!selections.contains(newSelection)) selections.add(newSelection); } | public void addSelection(Selection newSelection){ selections.add(newSelection); } |
return "notAdded"; } if (name.length() > BwCalSuite.maxNameLength) { form.getErr().emit("org.bedework.client.error.toolong", "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 extractAll(getAll); | return extractAll(getAllQuery); | public StationId[] getAllStationIds() throws SQLException { return extractAll(getAll); } |
public NSNetworkAccess(NetworkAccess na, NetworkId id, ProxyNetworkDC netDC){ super(na); this.id = id; this.netDC = netDC; | public NSNetworkAccess(NetworkId id, ProxyNetworkDC netDC) throws NetworkNotFound{ this(getFromDC(id, netDC), id, netDC); | public NSNetworkAccess(NetworkAccess na, NetworkId id, ProxyNetworkDC netDC){ super(na); this.id = id; this.netDC = netDC; } |
globals.subscriptionsTbl.put(u, intFld()); | globals.subscriptionsTbl.put(OwnerInfo.makeOwnerInfo(u), intFld()); | public void field(String name) throws java.lang.Exception{ BwUser u = (BwUser)top(); if (principalTags(u, name)) { return; } if (name.equals("instanceOwner")) { u.setInstanceOwner(booleanFld()); } else if (name.equals("quota")) { u.setQuota(longFld()); } else if (name.equals("subscr... |
globals.getTzcache().saveTimeZone(entity.getTzid(), (VTimeZone)o); | VTimeZone vtz = (VTimeZone)o; String tzid = entity.getTzid(); globals.getTzcache().saveTimeZone(tzid, vtz, entity.getPublick()); | public void end(String ns, String name) throws Exception { BwTimeZone entity = (BwTimeZone)pop(); globals.timezones++; Calendar ical = IcalTranslator.getCalendar(entity.getVtimezone()); ComponentList cl = ical.getComponents(); if (cl.size() != 1) { error("Exception restoring " + entity); thro... |
System.out.println("pixels to be drawn by seismogram shape: " + startPixel + ", " + endPixel); | private void getEdgeValues(MicroSecondTimeRange time, Dimension size){ if(seis.getEndTime().before(time.getBeginTime()) || seis.getBeginTime().after(time.getEndTime())) { startPixel = 0; endPixel = 0; return; } int[] points = DisplayUtils.getSeisPoints(seis, time); seisStart = points[0]; seisEnd = point... | |
for(int i = 0; i < seisEnd - seisStart; i++){ points[i][0] = (int)(i/samplesPerPixel); points[i][1] = (int)((seis.getValueAt(i + seisStart).getValue() - minAmp)/range * size.height); | if(seisEnd <= seis.getNumPoints() && seisStart >= 0){ if(seisStart != 0){ startPixel = 0; } if(seisEnd < seis.getNumPoints()){ endPixel = size.width; seisEnd++; } points = new int[seisEnd - seisStart][2]; samplesPerPixel = (seisEnd - seisStart - 1)/(double)(endPixel - startPixel); for(int i = 0; i < points.length; i++)... | private void plotAll(Dimension size) throws UnsupportedDataEncoding{ for(int i = 0; i < seisEnd - seisStart; i++){ points[i][0] = (int)(i/samplesPerPixel); points[i][1] = (int)((seis.getValueAt(i + seisStart).getValue() - minAmp)/range * size.height); } if(points.length < 2){ points = new int[2][2]; ... |
if(points.length < 2){ points = new int[2][2]; points[0][1] = (int)((seis.getValueAt(seisStart).getValue() - minAmp)/range * size.height); points[1][1] = (int)((seis.getValueAt(seisEnd).getValue() - minAmp)/range * size.height); } points[0][0] = 0; if(seisStart != seisEnd){ points[seisEnd - seisStart - 1][0] = size.w... | private void plotAll(Dimension size) throws UnsupportedDataEncoding{ for(int i = 0; i < seisEnd - seisStart; i++){ points[i][0] = (int)(i/samplesPerPixel); points[i][1] = (int)((seis.getValueAt(i + seisStart).getValue() - minAmp)/range * size.height); } if(points.length < 2){ points = new int[2][2]; ... | |
ChannelNameAndOrientation[] array = new ChannelNameAndOrientation[3]; array[0] = new ChannelNameAndOrientation('Z', 0, -90); array[1] = new ChannelNameAndOrientation('N', 0, 0); array[2] = new ChannelNameAndOrientation('E', 90, 0); return array; | return new ChannelNameAndOrientation[] {new ChannelNameAndOrientation('Z', 0, -90), new ChannelNameAndOrientation('N', 0, 0), new ChannelNameAndOrientation('E', 90, 0)}; | public static ChannelNameAndOrientation[] parse(String chanDipAzi) { if(chanDipAzi.equals("default")) { ChannelNameAndOrientation[] array = new ChannelNameAndOrientation[3]; array[0] = new ChannelNameAndOrientation('Z', 0, -90); array[1] = new ChannelNameAndOrientation('N', 0... |
assertEquals(atThree_, bdy.asBegin().getStatements().base_at(NATNumber.ONE)); | assertEquals(atThree_, bdy.asBegin().base_getStatements().base_at(NATNumber.ONE)); | public void testClosureLiteral() throws NATException { ATClosure clo = evalAndReturn("{| x, y | 3 }").asClosure(); ATSymbol nam = clo.base_getMethod().base_getName(); ATTable arg = clo.base_getMethod().base_getArguments(); ATAbstractGrammar bdy = clo.base_getMethod().base_getBodyExpression(); ATContext ctx =... |
assertEquals(ctx_.base_getSelf(), ((ATAsyncMessage) asyncMsg).getSender()); | assertEquals(ctx_.base_getSelf(), ((ATAsyncMessage) asyncMsg).base_getSender()); | public void testFirstClassMessages() throws NATException { ATMessage methInv = evalAndReturn(".m(3)").asMessage(); ATMessage asyncMsg = evalAndReturn("<-m(3)").asMessage(); assertEquals(atM_, methInv.base_getSelector()); assertEquals(atThree_, methInv.base_getArguments().base_at(NATNumber.ONE)); assertTrue(methIn... |
public NATMethod(ATSymbol name, ATTable parameters, ATAbstractGrammar body) { | public NATMethod(ATSymbol name, ATTable parameters, ATBegin body) { | public NATMethod(ATSymbol name, ATTable parameters, ATAbstractGrammar body) { name_ = name; parameters_ = parameters; body_ = body; } |
public synchronized void removeAll(){ | public void removeAll(){ | public synchronized void removeAll(){ layout = null; tc = null; ac = null; drawables.clear(); displayRemover = null; setBorder(BorderFactory.createEmptyBorder()); painter = null; super.removeAll(); } |
if ("REPORT".equals(name)) { setMethod(new ReportMethod(uri)); | if ("MKCOL".equals(name)) { setMethod(new MkColMethod(uri)); | public void setMethodName(String name, String uri) throws CalFacadeException { if ("REPORT".equals(name)) { setMethod(new ReportMethod(uri)); } else if ("PROPFIND".equals(name)) { setMethod(new PropFindMethod(uri)); } else { super.setMethodName(name, uri); } } |
} else if ("REPORT".equals(name)) { setMethod(new ReportMethod(uri)); | public void setMethodName(String name, String uri) throws CalFacadeException { if ("REPORT".equals(name)) { setMethod(new ReportMethod(uri)); } else if ("PROPFIND".equals(name)) { setMethod(new PropFindMethod(uri)); } else { super.setMethodName(name, uri); } } | |
form.initFields(); form.setEvent(null); | initFields(form); | public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access and set request parameters */ if (!form.getUserAuth().isAlertUser()) { return "noAccess"; } /** Set the objects to null so we g... |
form.resetEvent(); | public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access and set request parameters */ if (!form.getUserAuth().isAlertUser()) { return "noAccess"; } /** Set the objects to null so we g... | |
keyId = new IntSelectId(id, IntSelectId.AHasPrecedence); | categoryId = new IntSelectId(id, IntSelectId.AHasPrecedence); | public void resetEvent() { getEvent(); // Make sure we have one /* Implant the current id(s) in new entries */ int id = 0; BwCategory k = event.getFirstCategory(); if (k != null) { id = k.getId(); setCategory(k); } /* A is the All box, B is the user preferred values. */ keyId = new I... |
GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration(); Canvas3D canvas3D = new Canvas3D(config); add("Center", canvas3D); BranchGroup scene = createSceneGraph(baz,ang); SimpleUniverse simpleU = new SimpleUniverse(canvas3D); simpleU.getViewingPlatform().setNominalViewingTransform(); si... | try { GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration(); Canvas3D canvas3D = new Canvas3D(config); add("Center", canvas3D); BranchGroup scene = createSceneGraph(baz, ang); SimpleUniverse simpleU = new SimpleUniverse(canvas3D); simpleU.getViewingPlatform().setNominalViewingTransform(); simpleU.a... | public PartMo(float baz, float ang) { setLayout(new BorderLayout()); // Create Canvas3D GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration(); // if(config == null) System.out.println("The configuration is NULL"); //else System.out.p... |
Text is placed in the global coordinate sytem at locations transformed by the PlaceCoordSystem object. This keeps them facing the viewer, but in the proper location. | * Text is placed in the global coordinate sytem at locations * transformed by the PlaceCoordSystem object. This keeps them facing * the viewer, but in the proper location. | public BranchGroup createSceneGraph(float baz, float ang) { BranchGroup objRoot = new BranchGroup(); BranchGroup Axes = new Axis().getAxisBG(); BranchGroup Surface = new Axis().getSurfaceBG(); BranchGroup Motion = new MotionVector(baz,ang).getMotionBG(); BranchGrou... |
/* Set up the animation of the traces | /* * Set up the animation of the traces | public BranchGroup createSceneGraph(float baz, float ang) { BranchGroup objRoot = new BranchGroup(); BranchGroup Axes = new Axis().getAxisBG(); BranchGroup Surface = new Axis().getSurfaceBG(); BranchGroup Motion = new MotionVector(baz,ang).getMotionBG(); BranchGrou... |
float gnotInc = 1.0f/(GMknots-1); i = 0; while (i < GMknots) { gknots[i] = i*gnotInc; | float gnotInc = 1.0f / (GMknots - 1); for(i = 0; i < GMknots; i++) { gknots[i] = i * gnotInc; | public BranchGroup createSceneGraph(float baz, float ang) { BranchGroup objRoot = new BranchGroup(); BranchGroup Axes = new Axis().getAxisBG(); BranchGroup Surface = new Axis().getSurfaceBG(); BranchGroup Motion = new MotionVector(baz,ang).getMotionBG(); BranchGrou... |
i++; | public BranchGroup createSceneGraph(float baz, float ang) { BranchGroup objRoot = new BranchGroup(); BranchGroup Axes = new Axis().getAxisBG(); BranchGroup Surface = new Axis().getSurfaceBG(); BranchGroup Motion = new MotionVector(baz,ang).getMotionBG(); BranchGrou... | |
ViewHandler realHandler = getViewHandlerForContext(ctx); if(realHandler!=null){ return realHandler.calculateLocale(ctx); } else{ throw new RuntimeException ("No ViewHandler Found to calculate Locale"); } | IWContext iwc = IWContext.getIWContext(ctx); Locale locale = iwc.getCurrentLocale(); return locale; | public Locale calculateLocale(FacesContext ctx) { ViewHandler realHandler = getViewHandlerForContext(ctx); if(realHandler!=null){ return realHandler.calculateLocale(ctx); } else{ throw new RuntimeException ("No ViewHandler Found to calculate Locale"); } } |
return realHandler.createView(ctx,viewId); | UIViewRoot root = realHandler.createView(ctx,viewId); root.setLocale(IWContext.getIWContext(ctx).getCurrentLocale()); return root; | public UIViewRoot createView(FacesContext ctx, String viewId) { ViewHandler realHandler = getViewHandlerForContext(ctx); if(realHandler!=null){ return realHandler.createView(ctx,viewId); } else{ throw new RuntimeException ("No ViewHandler Found to create View"); } } |
return realHandler.restoreView(ctx,viewId); | UIViewRoot root = realHandler.restoreView(ctx,viewId); if(root != null){ root.setLocale(IWContext.getIWContext(ctx).getCurrentLocale()); } return root; | public UIViewRoot restoreView(FacesContext ctx, String viewId) { ViewHandler realHandler = getViewHandlerForContext(ctx); if(realHandler!=null){ return realHandler.restoreView(ctx,viewId); } else{ throw new RuntimeException ("No ViewHandler Found for restoreView"); } } |
public KortathjonustanAuthorisationEntries findByAuthorizationCode(java.lang.String p0)throws javax.ejb.FinderException{ | public KortathjonustanAuthorisationEntries findByAuthorizationCode(java.lang.String p0, IWTimestamp stamp)throws javax.ejb.FinderException{ | public KortathjonustanAuthorisationEntries findByAuthorizationCode(java.lang.String p0)throws javax.ejb.FinderException{ com.idega.data.IDOEntity entity = this.idoCheckOutPooledEntity(); Object pk = ((KortathjonustanAuthorisationEntriesBMPBean)entity).ejbFindByAuthorizationCode(p0); this.idoCheckInPooledEntity(entity);... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.