This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST http://121.199.52.14:8380/coupon/issue/bydiscounttypeid? | |
content-type: application/json;charset=UTF-8 | |
accept: */* | |
cache-control: no-cache | |
pragma: no-cache | |
user-agent: Java/1.8.0_171 | |
connection: keep-alive | |
[ { "mebId" : 1384835410, "disType" : 92, "appName" : "open-api", "beginDate" : 1544457639762, "endDate" : 1552233639762} ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import re | |
import subprocess | |
from sys import argv | |
reload(sys) | |
sys.setdefaultencoding("utf-8") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--from http://sqlblog.com/blogs/john_paul_cook/archive/2009/08/24/using-the-processes-query-outside-of-activity-monitor.aspx | |
/* ACTIVITY MONITOR */ | |
/* Processes */ | |
SELECT | |
[Session ID] = s.session_id, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GRANT ALL PRIVILEGES ON *.* TO 'ztpms_user'@'12.97.103.46' IDENTIFIED BY 'xxxxxpassword' WITH GRANT OPTION; | |
flush privileges; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config merge.renormalize true # prevents unnecessary merge conflicts, http://stackoverflow.com/a/12194759/23566 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://rusanu.com/2014/02/24/how-to-analyse-sql-server-performance/ | |
White Papers: | |
Waits and Queues White-Paper (2005) http://technet.microsoft.com/en-us/library/cc966413.aspx | |
Waits and Queues after 2005 - http://msdn.microsoft.com/en-us/library/ms179984.aspx | |
sys.dm_exec_requests What is executing right now | |
sys.dm_os_waiting_tasks Currently waiting tasks | |
sys.dm_os_wait_stats Aggregated statistics about all wait types | |
sys.dm_exec_query_stats runtime execution statistics for most queries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void init() { | |
registerBeanDefinitionParser("annotation-driven", new AnnotationDrivenBeanDefinitionParser()); | |
registerBeanDefinitionParser("default-servlet-handler", new DefaultServletHandlerBeanDefinitionParser()); | |
registerBeanDefinitionParser("interceptors", new InterceptorsBeanDefinitionParser()); | |
registerBeanDefinitionParser("resources", new ResourcesBeanDefinitionParser()); | |
registerBeanDefinitionParser("view-controller", new ViewControllerBeanDefinitionParser()); | |
registerBeanDefinitionParser("redirect-view-controller", new ViewControllerBeanDefinitionParser()); | |
registerBeanDefinitionParser("status-controller", new ViewControllerBeanDefinitionParser()); | |
registerBeanDefinitionParser("view-resolvers", new ViewResolversBeanDefinitionParser()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private BeanDefinition registerHandlerMapping(ParserContext context, @Nullable Object source) { | |
if (context.getRegistry().containsBeanDefinition(HANDLER_MAPPING_BEAN_NAME)) { | |
return context.getRegistry().getBeanDefinition(HANDLER_MAPPING_BEAN_NAME); | |
} | |
RootBeanDefinition beanDef = new RootBeanDefinition(SimpleUrlHandlerMapping.class); | |
beanDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); | |
context.getRegistry().registerBeanDefinition(HANDLER_MAPPING_BEAN_NAME, beanDef); | |
context.registerComponent(new BeanComponentDefinition(beanDef, HANDLER_MAPPING_BEAN_NAME)); | |
beanDef.setSource(source); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* TOP SLOW REQUESTS */ | |
/* time is in microseconds */ | |
SELECT creation_time | |
,last_execution_time | |
,total_physical_reads | |
,total_logical_reads | |
,total_logical_writes | |
, execution_count | |
, total_worker_time | |
, total_elapsed_time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void countExpiredUser() throws IllegalAccessException { | |
final Field mappedStatements = ReflectionUtils.findField(Configuration.class, "mappedStatements"); | |
mappedStatements.setAccessible(true); | |
final Map<String, MappedStatement> stringMappedStatementMap = | |
(Map<String, MappedStatement>)mappedStatements.get(config); | |
stringMappedStatementMap.forEach( | |
(k, v) -> { | |
if (StringUtils.isNotBlank(k) && k.startsWith(namespace)) { | |
final SqlSource sqlSource = v.getSqlSource(); |