On this site, JavaScript is
REQUIRED
! Users, paid or unpaid, will get
NO SUPPORT
when attempting to use this site without JavaScript enabled.
Text
Stats/Embed/QR
New Text/Home
New Article/Home
Trending Texts
Latest Texts
Login
Signup
DumbtemplateCollectionWatcher.java
shawn
November 19, 2020 07:00AM EST
1.4KB
44
Never
Java
Public
CC BY-SA 4.0
https://github.com/sbe1/dumbtemplates/blob/master/src/main/java/shawnewald/dumbtemplates/DumbtemplateCollectionWatcher.java
(Esc to close)
Stats | Raw Text | Embed Code | QR Code
Text Statistics
Views:
44
Downloads:
14
Favorites:
0
Added to collections:
0
Clones:
7
Character Count:
1432
Word Count:
179
Size (KB):
1.4
Raw Text
package shawnewald.dumbtemplates; import java.util.Date; import java.util.TimerTask; import java.io.File; /** * Dumbtemplates - Watches TemplateCollection for changes. * @author Shawn Ewald
* Copyright (C) 2012,2013 Shawn Ewald * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ public abstract class DumbtemplateCollectionWatcher extends TimerTask { @Override public final void run() { final Long timestamp = new Date().getTime() - DumbtemplateConfig.templateCheckInterval; for (final File f : Dumbtemplate.getTemplateFiles(DumbtemplateConfig.templatePath)) { if (f.lastModified() > timestamp) { onChange(); break; } } } protected abstract void onChange(); }
Raw text url:
https://text.tl/ie1d/raw
Download Text (May not work with all browsers.)
Download text as file:
https://text.tl/ie1d/download
Embed Code: Text View
To embed this text in an iFrame, use the following code:
<iframe src="https://text.tl/ie1d/embed" style="border:none;width:100%;min-height:450px;"></iframe>
Or write your own code to grab the contents of the text embed url:
https://text.tl/ie1d/embed
QR Code
Text
Stats/Embed/QR
New Text/Home
New Article/Home
Trending Texts
Latest Texts
Login
Signup
Subscribe!