Warning: session_start(): open(/var/lib/php/sessions/sess_2t186g5kpenrfdm3qudrgn0eto, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!752
static JFrame frame;
static JTable table;
static JTextField tfCmd;
static JLabel status;
static JButton btnReload, btnClear;
static S submittedInput;
static volatile boolean searching;
static long lastSearch; // time of last search
static int searchDelay = 100;
static int maxResults = 100;
static int autoResearchInterval = 30000; // 30 secs
static L actionHistory = synchroList();
p {
frame = showFrame();
table = sexyTable();
ActionListener go = actionListener {
tfCmd.selectAll();
search(true);
};
btnReload = new JButton(isWindows() ? "Reload" : "\u27F3");
btnReload.addActionListener(go);
btnClear = new JButton("X");
btnClear.setToolTipText("Show latest");
btnClear.addActionListener(actionListener { tfCmd.setText(""); });
tfCmd = new JTextField;
JPanel controls = jflow(btnClear, btnReload);
JPanel north = centerAndEast(
withLabel("Search term:", tfCmd),
controls);
/*btnRun = new JButton("Run");
btnRun.addActionListener(actionListener {
run();
});*/
status = new JLabel(" ");
JPanel panel = northCenterAndSouth(north, table, status);
tfCmd.addActionListener(go);
frame.addWindowListener(new WindowAdapter {
public void windowOpened(WindowEvent e) {
tfCmd.requestFocus();
}
public void windowActivated(WindowEvent e) {
search(false);
}
});
installTimer(tfCmd, new Runnable() {
String lastContents;
boolean autoSearchOn = true;
public void run() {
String text = getInput();
if (text.equals(lastContents)) {
if (now() > lastSearch + autoResearchInterval ||
(!text.equals(submittedInput) && autoSearchOn && !searching))
search(false);
} else
lastContents = text;
}
}, searchDelay);
frame.add(panel);
frame.setBounds(100, 100, 500, 400);
search(false);
}
static S getInput() {
ret tfCmd.getText().trim();
}
static void search(String cmd, final boolean requestFocus) ctex {
searching = true;
try {
status("Searching " + quote(cmd) + "...");
if (empty(cmd)) cmd = "_";
//if (cbAll.isSelected())
//cmd += " type:runnable";
S page = loadPage("http://tinybrain.de:8080/tb/search.php?q=" + urlencode(cmd) + "&limit=" + maxResults + "&sort=modified");
Matcher m = Pattern.compile(">(#\\d+) - (.*?)
").matcher(page);
final new L