id stringlengths 36 36 | text stringlengths 1 1.25M |
|---|---|
959bffd8-6307-4fb9-8699-78c9512b0867 | public static String getNameEnding(File file)
{
String name=null;
String s = file.getName();
int i = s.lastIndexOf('.');
if (i > 0 && i < s.length() - 1)
{
name=s.substring(0,file.getName().length()-4)+".yuv";
}
return name;
} |
05e35665-4dfd-4162-ac6d-72f93b094440 | public static String getBaseName(File file)
{
String baseName=null;
String pathName=file.getPath();
int i = pathName.lastIndexOf('.');
if (i > 0 && i < pathName.length() - 1)
{
baseName=pathName.substring(0,(pathName.length()-4));
}
return baseName;
} |
a65e3c1d-dfaf-4ce8-b984-5e69238bff30 | public static File getDirectoryPath(File f)
{
String strDir = f.getPath();
strDir = strDir.substring(0,strDir.lastIndexOf(File.separator));
return new File(strDir);
} |
22289977-00fd-443c-b090-67afa49fb62a | public static File[] getFilesInDirectory(File f)
{
File dirFile =ExtensionUtils.getDirectoryPath(f);//new File(strDir);
return dirFile.listFiles();
} |
b2df7518-3aca-415e-919d-762f71cc8403 | public ExtensionFileFilter(String extension)
{
fileExtension = new String (extension);
} |
2dc5ee9d-f588-4fa2-9894-281c1122d2e4 | public boolean accept(File file)
{
if (file.isDirectory())
{
return true;
}
String extension = ExtensionUtils.getExtension(file);
if (extension != null)
{
if (extension.equals(fileExtension))
{
return true;
}
else
{
return false;
}
}
return false;
} |
a9f5ff65-9415-4e31-af09-87a6498b63c4 | public String getDescription()
{
return fileExtension+ " Files (*."+ fileExtension +")";
} |
056d07fc-f3d2-4a86-93a8-7915356ba91c | public FrameAboutBox(MainFrame parent)
{
super(parent);
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try
{
jbInit();
}
catch(Exception e)
{
e.printStackTrace();
}
} |
b7726419-051f-4ae3-abb5-9c2143f0c64a | private void jbInit() throws Exception
{
imageLabel.setIcon(new ImageIcon(FrameAboutBox.class.getResource("movie.jpg")));
this.setTitle("About");
panel1.setLayout(borderLayout1);
panel2.setLayout(borderLayout2);
insetsPanel1.setLayout(flowLayout1);
insetsPanel2.setLayout(flowLayout1);
insetsPanel2.setBorder(... |
259327cd-9432-4eda-94b8-5328c65c5d80 | protected void processWindowEvent(WindowEvent e)
{
if (e.getID() == WindowEvent.WINDOW_CLOSING)
{
cancel();
}
super.processWindowEvent(e);
} |
bf17c38f-e55d-4ba8-89a9-edf9f9f848a8 | void cancel()
{
dispose();
} |
ba73db3a-e86f-4d2b-9a05-2f6d5b605e85 | public void actionPerformed(ActionEvent e)
{
if (e.getSource() == buttonOK)
{
cancel();
}
} |
5db6741b-f5d0-4259-883c-a25942c71062 | public static native int[] calculateFastRGBImage(boolean showY,
boolean showU,
boolean showV,
int width,
int height,
byte[] yData,
byte[] uData,
byte[] vData,
int[] rgbImage
); |
1885aae4-f6b4-4d6a-bcdf-c996f8bf9f94 | public static native int[] calculateFastColoredRGBImage(int width,
int height,
byte[] yData,
byte[] uData,
byte[] vData,
int[] rgbImage
); |
c9c3f67f-c1a2-4c84-9f5d-71597d25840a | public static native int[] calculateRGBImage(boolean showY,
boolean showU,
boolean showV,
int width,
int height,
byte[] yData,
byte[] uData,
byte[] vData,
int[] rgbImage
); |
3d294dca-643e-4f34-8c36-2312c261cdb7 | public static native int[] resizeRGBImage(int scale,
int width,
int height,
int[] scaledRGBImage,
int[] rgbImage
); |
ab991a8e-45a9-4933-8966-c29ffa1ca670 | public YUVViewer(MainFrame frame,File yuvFile,Dimension size, int cc)
{
super(frame);
this.frame=frame;
this.yuvFile=yuvFile;
this.size=size;
this.colorspace = cc;
if(!((size.width*size.height)%2==0))
{
System.err.println("Something fishy with the Dimension");
}
bufferedImage = new BufferedImage... |
e0ec704b-1a72-472b-9f32-d99fae103331 | public void paint(Graphics g)
{
if(scale>1)
{
g.drawImage(scaledImage, 0, 0, Color.BLACK, this);
}
else
{
g.drawImage(bufferedImage, 0, 0, Color.BLACK, this);
}
} |
e4771800-4587-4672-a855-18c4a86d5109 | public void update(Graphics g)
{
paint(g);
} |
21ba460b-b2a8-4010-be8a-54ba76544e86 | void prepare()
{
frameNumber=0;
assert yuvFile.exists();
int yLength=size.width*size.height;
int uvLength=(size.width*size.height)/4;
yData = new byte[yLength];
uData = new byte[uvLength];
vData = new byte[uvLength];
try
{
randomAccessFile = new RandomAccessFile(yuvFile,"r");
}
catch(FileNotFou... |
52204bd7-3de1-456a-bc72-8995edb7ecb6 | boolean readData()
{
try
{
int k, l, m;
k = l = m = 0;
k = randomAccessFile.read(yData);
if ( colorspace==YUVDeclaration.ccYUV )
{
l = randomAccessFile.read(uData);
m = randomAccessFile.read(vData);
}
if (k == -1 || l == -1 || m == -1) {
return true;
}
}
catch(IOException ioe... |
3a011a56-a619-4e55-bbfa-593bc631445c | boolean readLastData()
{
frameNumber--;
frameNumber=frameNumber<1?1:frameNumber;
frame.setFrameNumber(frameNumber);
int dataLength=0;
if ( colorspace==YUVDeclaration.ccYUV )
{
dataLength = size.width*size.height+size.width*size.height/2;
}
else
{
dataLength = size.width*size.height;
}
try
{
in... |
b496fdc0-d1fa-43fd-8d34-17b14a8f6694 | public void setSuspended(boolean suspended)
{
threadSuspended=suspended;
fillColors();
repaint();
} |
fac473f3-35d4-497c-8635-e4dd694e4195 | boolean getSuspended()
{
return threadSuspended;
} |
f79b8d89-40a1-410e-8202-396168037ac9 | boolean getEndOfFile()
{
return endOfFile;
} |
fd726704-c18f-4ef9-ad84-b1d3b86acd17 | public void run()
{
while(!readData())
{
fillFastColors();
repaint();
try
{
sleep(1);
if (threadSuspended)
{
synchronized(this)
{
while (threadSuspended)
wait();
}
}
}
catch (InterruptedException ie)
{
System.err.prin... |
edb8a0f3-4b1f-4b09-bd10-4b473f30e0f8 | void fillFastColors()
{
if(showY&&showU&&showV)
{
rgbImage=YUVViewer.calculateFastColoredRGBImage(size.width,
size.height,
yData,
uData,
vData,
rgbImage
);
}
else
{
rgbImage=YUVViewer.calculateFastRGBImage(showY,
showU,
showV... |
b5739af4-6baf-497a-a144-d5892da70d1a | void fillColors()
{
rgbImage=YUVViewer.calculateRGBImage(showY,
showU,
showV,
size.width,
size.height,
yData,
uData,
vData,
rgbImage
);
if(scale>1)
{
scaledRGBImage=YUVViewer.resizeRGBImage(scale,
size.w... |
b63d44eb-ca6b-4feb-9780-abb0374655bd | public void setScale(int s)
{
scale=s;
setSize(new Dimension(size.width*scale,size.height*scale));
scaledRGBImage=null;
scaledImage=null;
scaledRGBImage=new int[size.width*scale*size.height*scale];
if(scale>1)
{
scaledRGBImage=YUVViewer.resizeRGBImage(scale,
size.width,
size.height,
... |
f50a856b-9b15-4532-ae81-24ab2299c483 | public void setY(boolean enabled)
{
showY=enabled;
fillColors();
repaint();
} |
b0020c4d-7ec8-43be-b3cc-8240688e4429 | public void setU(boolean enabled)
{
showU=enabled;
fillColors();
repaint();
} |
02d390a3-dba4-4be1-85d3-660584c7faa9 | public void setV(boolean enabled)
{
showV=enabled;
fillColors();
repaint();
} |
034144d3-953c-40f7-a2ef-ec6bf234f7e2 | public void dispose()
{
super.dispose();
rgbImage=null;
scaledRGBImage=null;
bufferedImage=null;
scaledImage=null;
} |
0ceceffd-b6b9-487f-9f8b-5ce20dc0dede | public void locationUpdate(Point difference)
{
setLocation(difference.x+lastLocation.x,difference.y+lastLocation.y);
Toolkit.getDefaultToolkit().sync();
repaint();
} |
55f75f15-0876-4bc1-9e52-5028ba99115d | public void updateLastLocation()
{
lastLocation = getLocation();
} |
2f7b04b4-7ffb-4dd6-a27f-8dcb58abb446 | public void mouseDragged(MouseEvent mouseEvent)
{
lastLocation = getLocation();
setLocation(lastLocation.x - startPoint.x + mouseEvent.getPoint().x, lastLocation.y - startPoint.y + mouseEvent.getPoint().y);
Toolkit.getDefaultToolkit().sync();
repaint();
} |
768d911b-dea5-419e-89bc-6bbd0990b014 | public void mousePressed(MouseEvent mouseEvent)
{
startPoint=mouseEvent.getPoint();
} |
75a942c3-4358-48fa-bddf-cc36629c5c7f | public void mouseReleased(MouseEvent mouseEvent)
{
// System.out.println("released");
} |
042b09f1-bf9f-4461-aae5-28dd5d92a24b | public void mouseEntered(MouseEvent mouseEvent)
{
// System.out.println("entered");
} |
215102cb-4988-45c5-b8f6-146bf6e237c9 | public void mouseExited(MouseEvent mouseEvent)
{
// System.out.println("exited");
} |
76571a2a-b492-4d8a-80c0-14118bf4fc3e | public void mouseMoved(MouseEvent mouseEvent)
{
// System.out.println("moved");
} |
30bbd6ca-d2a1-4a0d-99c7-a56f3c1c0912 | public void mouseClicked(MouseEvent mouseEvent)
{
// System.out.println("clicked");
} |
573715d5-c88f-4bd7-8e37-8291370eeb1f | public MainFrame()
{
super();
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try
{
jbInit();
}
catch(Exception e)
{
e.printStackTrace();
}
} |
09e23f30-3058-426c-9728-c6cc5eaa76da | void jbInit()
{
contentPane = (JPanel)this.getContentPane();
contentPane.setLayout(borderLayout1);
this.setTitle(Title);
//Menu File
jMenuFile.setText("File");
jMenuFile.setMnemonic(KeyEvent.VK_F);
getAccessibleContext().setAccessibleDescription("File");
jMenuTools.setText("Tools");
jMenuFile.setMnemonic(... |
115bd9b4-2256-4766-94ee-f2af5eb0b039 | void setupRadioButtons()
{
for(int i = 0; i < lookAndFeelInfo.length; i++)
{
jRadioButtonMenueItem = new JRadioButtonMenuItem(lookAndFeelInfo[i].getName());
jMenuOptions.add(jRadioButtonMenueItem);
jRadioButtonMenueItem.setSelected(UIManager.getLookAndFeel().getName().equals(lookAndFeelInfo[i].getN... |
7ae7fb03-4ed5-4fd5-b9cb-8485e8bd52f7 | public void itemStateChanged(ItemEvent itemEvent)
{
JRadioButtonMenuItem jRadioButtonMenueItem2 = (JRadioButtonMenuItem)itemEvent.getSource();
if(jRadioButtonMenueItem2.isSelected())
{
info = (UIManager.LookAndFeelInfo)jRadioButtonMenueItem2.getClientProperty("UIKey");
try
... |
11a73284-1153-48c5-bd28-86ba4058f8c8 | void setupInternalFrame()
{
jInternalFrame.getContentPane().setLayout(new FlowLayout());
jButtonStepBack.setActionCommand("StepBack");
jButtonStepBack.setToolTipText("step one frame back");
jButtonPlay.setActionCommand("Play");
jButtonPlay.setToolTipText("play");
jButtonStepForeward.setActionCommand("StepFore... |
fc587713-2cf1-4841-87df-dbc88e28981d | void startupViewer()
{
if(firstTime)
{
jInternalFrame.setVisible(true);
firstTime=false;
}
else
{
if(play!=null)
{
play.setSuspended(true);
if(play.getSuspended()==true)
{
play=null;
}
}
jDesktop.remove(yuvViewer);
yuvViewer.dispose();
yuvViewer=nul... |
2cdbf1aa-fe0b-4556-abc6-0b641cfd5f1f | public void jMenuFileOpen()
{
JFileChooser jFileChooser=new JFileChooser();
ExtensionFileFilter extensionFileFilter=new ExtensionFileFilter("yuv");
jFileChooser.addChoosableFileFilter(extensionFileFilter);
jFileChooser.addChoosableFileFilter(new ExtensionFileFilter("sqcif"));
jFileChooser.addChoosableFileFilte... |
b9f15045-0863-4c0d-90ad-50e72c6669b9 | public void setYUVDimension(Dimension dimension)
{
yuvDimension=dimension;
} |
da61eba7-82c1-441f-91ca-54ebfc3b4134 | public void setColorSpace(int cc) {
colorSpace = cc;
} |
d90a1230-5285-4481-a905-09e51beec351 | public void setFrameNumber(int frameNumber)
{
Integer Int=new Integer(frameNumber);
frameText.setText(Int.toString());
} |
7c6bfeb2-08fd-4d55-b24a-9da37025f62b | public void jMenuHelpAbout()
{
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
dlg.setResizable(false);
dlg.setModal(true);
dlg.pack();
dlg.setVi... |
b76ffd91-a33c-4a5d-8827-c8004cd1ffbf | public void jMenuFileExit()
{
System.exit(0);
} |
611b923e-12e8-4d81-8ffa-2e110102524d | public void actionPerformed(ActionEvent ae)
{
String command = ae.getActionCommand();
if(command.equals("Exit"))
{
jMenuFileExit();
}
else if(command.equals("Open"))
{
jMenuFileOpen();
}
else if(command.equals("Scale 1:1"))
{
if(yuvViewer!=null)
{
yuvViewer.setScale(... |
176da30e-6b1f-4c18-84d5-08f9d52fc9e6 | protected void processWindowEvent(WindowEvent we)
{
super.processWindowEvent(we);
if (we.getID() == WindowEvent.WINDOW_CLOSING)
{
jMenuFileExit();
}
} |
ba8efe63-35ca-4052-bcff-8ce6aeee8054 | public void enableYUVCheckboxes(boolean y, boolean u, boolean v)
{
jCheckBoxMenuItemShowY.setEnabled(y);
jCheckBoxMenuItemShowU.setEnabled(u);
jCheckBoxMenuItemShowV.setEnabled(v);
} |
0171b9c5-f297-44e6-8231-45ddd0406d53 | public SettingsDialog(MainFrame parent)
{
super(parent);
this.parent=parent;
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try
{
jbInit();
}
catch(Exception e)
{
e.printStackTrace();
}
} |
b3f04243-cac4-4961-b75b-1370b0ad5bf5 | private boolean confirmMessage(String confirmMsg)
{
int ret;
ret = JOptionPane.showConfirmDialog(this,confirmMsg,POPUP_CONFIRM_HEADLINE,JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE);
if (ret == JOptionPane.OK_OPTION)
{
return true;
}
else
{
return fa... |
f0ea2365-cd5b-4494-972c-10d59fd8ef61 | private void errorMessage(String errorMessage)
{
JOptionPane.showMessageDialog(this,errorMessage,POPUP_ERROR_HEADLINE,JOptionPane.WARNING_MESSAGE);
} |
499b03e6-79e3-407e-879e-25478495f0b7 | private void jbInit() throws Exception
{
this.setTitle("Settings only 4:2:0 enabled!");
sqcifButton.addActionListener(this);
qcifButton.setMnemonic(KeyEvent.VK_Q);
qcifButton.addActionListener(this);
qcifButton.setSelected(true);
sifButton.setMnemonic(KeyEvent.VK_S);
... |
504cc4c6-7a55-4662-b025-1c77e03033d4 | void setConstraints(int x,int y,int top,int left,int bottom,int right,int anchor)
{
gBC.gridx=x;
gBC.gridy=y;
gBC.insets=new Insets(top,left,bottom,right);
gBC.anchor=anchor;
} |
3851d44c-6d4d-4c11-908b-e3e091df1901 | protected void processWindowEvent(WindowEvent e)
{
if (e.getID() == WindowEvent.WINDOW_CLOSING)
{
cancel();
}
super.processWindowEvent(e);
} |
79fb30c7-e1d8-4255-ac03-3f2d718e1a1e | void cancel()
{
dispose();
} |
b02f059c-5a23-4cf6-b250-c4c0c28ffde8 | public void actionPerformed(ActionEvent e)
{
if (e.getSource() == buttonCancel)
{
cancel();
}
else if (e.getSource() == buttonOK)
{
if(validateSettings())
{
parent.setYUVDimension(dimension);
parent.setColorSpace(colorspace);
cancel();
}
else
{
System.out.printl... |
e56ddcd8-3774-469a-8b2d-971f68f68378 | private boolean validateSettings()
{
if(sqcifButton.isSelected())
{
dimension=SQCIF;
}
else if(qcifButton.isSelected())
{
dimension=QCIF;
}
else if(sifButton.isSelected())
{
dimension=SIF;
}
else if(cifButton.isSelected())
{
dimension=CIF;
}
else if(cif4Bu... |
a725c38f-82d3-4645-800c-ba2763aa98ab | public static void main( String[] args )
{
System.out.println( "Hello World!" );
} |
2dee55d7-bd86-4ee0-8d59-b03b7e8eb25b | @Before
public void before() throws DocumentException {
document = new SAXReader().read(getClass().getResourceAsStream(
"users.xml"));
} |
f70db66c-ad46-4da0-82d4-89e6acdce188 | @Test
public void test() {
String username = "hehe";
String password = "hehepass";
Element node = (Element) document.selectSingleNode("//user[@username='"
+ username + "' and @password='" + password + "']");
if (node != null) {
System.out.println("success!");
} else {
System.out.println("failure!")... |
e4fd0caa-c074-451d-aa7f-55456ad67381 | @Before
public void before() throws DocumentException {
document = new SAXReader().read(getClass().getResourceAsStream(
"books.xml"));
} |
d7a15bc1-1099-4b14-904c-aff343cdc5e5 | @Test
public void test4() {
Element bookElement = (Element) document.getRootElement()
.elements("book").get(2);
bookElement.element("name").setText("Java EE");
} |
fe2d2abb-bf07-4381-b107-3874cb58a164 | @Test
public void test3() {
Element cElement = document.getRootElement().element("book")
.element("c");
cElement.getParent().remove(cElement);
} |
99a064b0-5e40-427c-bfdb-7adfa54ed5ed | @SuppressWarnings("unchecked")
@Test
public void test2() {
Element bookElement = document.getRootElement().element("book");
List<Element> elements = bookElement.elements();
Element cElement = DocumentHelper.createElement("c").addAttribute(
"info", "d");
elements.add(4, cElement);
} |
a658c918-13fa-42a6-ad04-10aff368b631 | @Test
public void test() {
document.getRootElement().element("book").addElement("a")
.addAttribute("info", "b");
} |
2ba86b86-9804-4b75-aaad-9b899164efe1 | @After
public void after() throws IOException {
OutputFormat format = OutputFormat.createPrettyPrint();
format.setEncoding("utf-8");
XMLWriter xmlWriter = new XMLWriter(new FileOutputStream(PATH), format);
xmlWriter.write(document);
xmlWriter.close();
} |
41ee0c17-3237-4ffe-b7d2-d83a16d5430f | @Before
public void before() throws DocumentException {
document = new SAXReader().read(getClass().getResourceAsStream(
"books.xml"));
// document = new SAXReader().read(getClass().getClassLoader()
// .getResourceAsStream("com/flyingh/dom4j/books.xml"));
} |
c703e54d-7d96-4819-98ce-637ce9061499 | @Test
public void test8() throws IOException {
document.getRootElement().element("book").addElement("info")
.addAttribute("haha", "hehe");
OutputFormat format = OutputFormat.createPrettyPrint();
format.setEncoding("UTF-8");
XMLWriter xmlWriter = new XMLWriter(new OutputStreamWriter(
new FileOutputStrea... |
4574a01f-2eb4-4140-bc8a-de6fd18148f0 | @Test
public void test7() throws IOException {
document.getRootElement().element("book").addElement("name")
.setText("hello world");
OutputFormat format = OutputFormat.createPrettyPrint();
format.setEncoding("UTF-8");
XMLWriter xmlWriter = new XMLWriter(new FileOutputStream(PATH), format);
xmlWriter.writ... |
3e402de7-97e8-4992-b0b6-5609ee53acf6 | @Test
public void test6() {
System.out.println(Charset.defaultCharset());
} |
e630c1ad-1257-4482-833b-930047081876 | @Test
public void test5() throws IOException {
document.getRootElement().element("book").addElement("price")
.setText("99.9");
FileWriter writer = new FileWriter(PATH);
System.out.println("writer encoding:" + writer.getEncoding());
XMLWriter xmlWriter = new XMLWriter(writer,
OutputFormat.createPrettyPr... |
28b6bfd5-4621-489d-a471-0839f2d9b20e | @Test
public void test4() throws IOException {
document.getRootElement().element("book").addElement("price")
.setText("99.9");
new XMLWriter(System.out, OutputFormat.createPrettyPrint())
.write(document);
System.out.println("*************");
new XMLWriter(System.out, OutputFormat.createCompactFormat())... |
5517625d-569d-446c-a8ea-6011dbe6318b | @Test
public void test3() {
Attribute selectSingleNode = (Attribute) document.getRootElement()
.selectSingleNode("//books/book/@id");
System.out.println(selectSingleNode.asXML());
System.out.println(selectSingleNode.getName());
System.out.println(selectSingleNode.getValue());
} |
43e603b6-9747-4c9b-a14b-a7eecf33062c | @SuppressWarnings("unchecked")
@Test
public void test2() {
List<Element> selectNodes = document.getRootElement().selectNodes(
"//books/book/name");
for (Element element : selectNodes) {
System.out.println(element.getText());
}
} |
41730c2d-b9e1-4307-91fb-457aee72da82 | @SuppressWarnings("unchecked")
@Test
public void test() {
List<Element> books = document.getRootElement().elements("book");
if (books.size() < 1) {
return;
}
Element secondBook = books.get(1);
System.out.println(secondBook.attributeValue("id"));
System.out.println(secondBook.elementText("name"));
Sys... |
6f4a8755-91a6-4693-a5ec-47fb196c4483 | @Before
public void before() throws DocumentException {
document = new SAXReader().read(getClass().getResourceAsStream(
"books.xml"));
} |
73653f1d-32bb-444d-ad4f-a0125a8a3db7 | @Test
public void test() throws DocumentException {
System.out.println(document.selectSingleNode("//name").getText());
} |
9764143d-b333-449d-ac6d-623e291b513b | public AppTest( String testName )
{
super( testName );
} |
84f5bded-4e00-4f29-b07c-009120050c84 | public static Test suite()
{
return new TestSuite( AppTest.class );
} |
e8917fcb-62fc-4b22-be45-e2fae6e2698f | public void testApp()
{
assertTrue( true );
} |
9e6b6e44-a503-4ab5-89b3-25ce9e1a8206 | public SimpleRunCPE(String args[]) throws Exception {
mStartTime = System.currentTimeMillis();
// check command line args
if (args.length < 1) {
printUsageMessage();
System.exit(1);
}
// parse CPE descriptor
System.out.println("Parsing CPE Descriptor");
CpeDescription cpeDesc =... |
61cb5ac7-ca5c-48c9-8dba-6b8d98c3b0c1 | private static void printUsageMessage() {
System.out.println(" Arguments to the program are as follows : \n"
+ "args[0] : path to CPE descriptor file");
} |
3dacd99f-48d6-46b4-8c62-fa49936fc27a | public static void main(String[] args) throws Exception {
new SimpleRunCPE(args);
} |
4f51894c-4ba2-4085-babd-7e9cd399e7ce | public void initializationComplete() {
System.out.println("CPM Initialization Complete");
mInitCompleteTime = System.currentTimeMillis();
} |
f52cd0b1-3386-4d66-9ea7-a00c419883f7 | public void batchProcessComplete() {
System.out.print("Completed " + entityCount + " documents");
if (size > 0) {
System.out.print("; " + size + " characters");
}
System.out.println();
long elapsedTime = System.currentTimeMillis() - mStartTime;
System.out.println("Time Elapse... |
84619caf-5af4-46b7-a688-74a5f0b1071d | public void collectionProcessComplete() {
long time = System.currentTimeMillis();
System.out.print("Completed " + entityCount + " documents");
if (size > 0) {
System.out.print("; " + size + " characters");
}
System.out.println();
long initTime = mInitCompleteTime - mStartTime... |
2b8739cd-85b5-49c5-b032-1a4be6f0d631 | public void paused() {
System.out.println("Paused");
} |
90fe81c4-abbd-4611-9ddb-307d845bdc1f | public void resumed() {
System.out.println("Resumed");
} |
0ff73b63-3082-4b0b-b9df-6379e5ce62be | public void aborted() {
System.out.println("Aborted");
// stop the JVM. Otherwise main thread will still be blocked waiting for
// user to press Enter.
System.exit(1);
} |
208b9e65-a1eb-404e-b1f4-d32abbabd7b5 | public void entityProcessComplete(CAS aCas, EntityProcessStatus aStatus) {
if (aStatus.isException()) {
List<Exception> exceptions = aStatus.getExceptions();
for (int i = 0; i < exceptions.size(); i++) {
((Throwable) exceptions.get(i)).printStackTrace();
}
return;
}... |
84325b93-f7a5-42cd-97b9-657dc440dd2f | public void initialize() throws ResourceInitializationException {
file = new File((String) getConfigParameterValue("input"));
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.