Skip to content

Instantly share code, notes, and snippets.

View JeremyMcCormick's full-sized avatar
:octocat:

Jeremy McCormick JeremyMcCormick

:octocat:
View GitHub Profile
public class PrintRequestServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
PrintWriter out = resp.getWriter();
out.println("<b>HTTP Headers</b><br/>");
Enumeration<?> headers = req.getHeaderNames();
for (;;) {
if (!headers.hasMoreElements()) {
package org.hps.crawler;
import java.io.File;
/**
* Reads metadata from EVIO files, including the event count, run min and run max expected by the datacat, as well as
* many custom field values applicable to HPS EVIO raw data.
*
* @author Jeremy McCormick, SLAC
*/
@JeremyMcCormick
JeremyMcCormick / calculateQ.java
Last active November 10, 2015 23:06
HPS - calculate Q from EvioMetadataReader (unused)
/**
* Calculate charge in nano coulomb for a file using the EPICS FCup current measurements.
* <p>
* The accuracy of this calculation is limited by the time interval of the EPICS data (2s),
* and SVT livetime is not included so the value should not be used for analysis.
*
* @param epicsData the list of EPICS data with the FCup values
* @param firstTimestamp the first timestamp in the file
* @param lastTimestamp the last timestamp in the file
* @return the charge for the file
<script>
window.onload = function() {
document.getElementById("cookie-enabled").innerHTML = navigator.cookieEnabled;
};
</script>
<p>Cookies enabled: <span id="cookie-enabled"></span></p>
@JeremyMcCormick
JeremyMcCormick / gist:f46ec37eda0c639ea422
Created September 9, 2015 06:38
givdo_mission.html.erb
<div class="organization-mission">
<%= @organization_graph['mission'] %>
</div>
@JeremyMcCormick
JeremyMcCormick / gist:915313f52635b54746d3
Created September 8, 2015 20:58
aida_displaytree.jsp
<aida:displaytree rootLabel="ClustererTest" showItemCount="true" rootVisible="true" storeName="${rootDataURI}"/>
<h1>modal demo</h1>
<div class="modal fade" id="modal1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Modal Title</h4>
</div>
<div class="modal-body">
Modal Body>
package org.hps.record.scalers;
import java.util.ArrayList;
/**
* This is an EVIO event processor for creating a {@link ScalerData} object from scaler bank data.
*
* @author <a href="mailto:[email protected]">Jeremy McCormick</a>
*/
public class ScalersEvioProcessor extends EvioEventProcessor {
@JeremyMcCormick
JeremyMcCormick / schema.sql
Last active August 29, 2015 14:27 — forked from brianv0/init.sql
MySQL Datacat Schema
--drop table ContainerSearch;
drop table VerDatasetMetaString ;
drop table VerDatasetMetaNumber ;
drop table VerDatasetMetaTimestamp ;
drop table DatasetGroupMetaString ;
drop table DatasetGroupMetaNumber ;
drop table DatasetGroupMetaTimestamp ;