Skip to content

Instantly share code, notes, and snippets.

USE test;
CREATE EVENT PROF ON SCHEDULE EVERY 1 SECOND DO INSERT INTO test.PROF(COMMAND,HOST,STATE,INFO) SELECT COMMAND, SUBSTRING(HOST,1,INSTR(HOST,':')-1) as HOST, STATE, INFO FROM INFORMATION_SCHEMA.PROCESSLIST WHERE DB='product' AND Command!='Sleep'AND STATE IS NOT NULL;
SET GLOBAL event_scheduler = ON;
nohup python ./filter.py
class MindlessClient{
...
if (request.invalid())
{
String requestLoggedUUID = FileLogger.persistFile(request.getOutputStream());
String configurationFileUUID = FileLogger.persistFile(Configuration.toString());
LOG.error("Request invalid. UUIDs request: "+requestLoggedUUID +", configuration: "+configurationFileUUID );
// no guarantees, that files are successfully saved. we don't bother, anyway
}
...
<log4j:event logger="RESOURCE_ANOMALY" timestamp="1325028851405" level="WARN" thread="main">
<log4j:message><![CDATA[Cannot close opened file]]></log4j:message>
<log4j:throwable><![CDATA[java.lang.IOException: Disk Quota Exceeded
at MainClazz.generateLogMessage(MainClazz.java:43)
at MainClazz.main(MainClazz.java:30)
]]></log4j:throwable>
<log4j:properties>
<log4j:data name="ADDRESS" value="127.0.0.1"/>
<log4j:data name="UserAgent" value="Wget/3.0.1"/>
</log4j:properties>
int main(void){
int a[3302],b=3301,*c=a,d,e,f;
for(e=b; --e; *c++=1)
;
*c=2;
for(d=2001; d--; printf("%05d",f)) {
for(c=a, e=b; e; f/=e--){
f += *c * 1e5;
*c++ = f%e;
}
The benefits of transactions have been known in the database community for a long
time [2]. Transactions offer a simple programming model that takes much of the pain out
of concurrent programming. Programmers do not have to worry about deadlock, livelock,
data consistency, atomicity, priority-inversion, or lock placement – in fact they barely have
to think about concurrency at all [14].
@altmind
altmind / jquery.color.blink.html
Created June 5, 2012 07:45
jquery color blinking
<!doctype html public>
<!--[if lt IE 7]> <html lang="en-us" id="home_page" class="no-js lt-ie9 lt-ie8 lt-ie7 liquid1000"> <![endif]-->
<!--[if IE 7]> <html lang="en-us" id="home_page" class="no-js lt-ie9 lt-ie8 liquid1000"> <![endif]-->
<!--[if IE 8]> <html lang="en-us" id="home_page" class="no-js lt-ie9 liquid1000"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en-us" id="home_page" class="no-js liquid1000"> <!--<![endif]-->
....
class Employee {
String firstName, lastName
Employee(firstName, lastName){
this.firstName=firstName
this.lastName=lastName
}
}
..