This file contains hidden or 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
| import urllib | |
| import random | |
| import string | |
| for i in a: | |
| urllib.urlretrieve(i, ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(10))+".jpg") |
This file contains hidden or 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 String toString() { | |
| return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); | |
| } |
This file contains hidden or 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
| SET GLOBAL log_output = 'TABLE'; | |
| SET GLOBAL general_log = 'ON'; | |
| TRUNCATE mysql.general_log; | |
| SELECT * FROM mysql.general_log; |
This file contains hidden or 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
| @Bean | |
| public Filter logFilter() { | |
| CommonsRequestLoggingFilter filter = new CommonsRequestLoggingFilter(); | |
| filter.setIncludeQueryString(true); | |
| filter.setIncludePayload(true); | |
| filter.setMaxPayloadLength(5120); | |
| return filter; | |
| } |
This file contains hidden or 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
| mvn install -DskipTests | |
| mvn install -Dmaven.test.skip=true |
This file contains hidden or 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
| import java.io.ByteArrayInputStream; | |
| import java.io.File; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import org.apache.logging.log4j.LogManager; | |
| import org.apache.logging.log4j.Logger; | |
| import org.springframework.web.multipart.MultipartFile; |
This file contains hidden or 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
| function ab2str(buf) { | |
| return String.fromCharCode.apply(null, new Uint8Array(buf)); | |
| } |
This file contains hidden or 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
| string contentDisposition; | |
| if (Request.Browser.Browser == "IE" && (Request.Browser.Version == "7.0" || Request.Browser.Version == "8.0")) | |
| contentDisposition = "attachment; filename=" + Uri.EscapeDataString(fileName); | |
| else if (Request.Browser.Browser == "Safari") | |
| contentDisposition = "attachment; filename=" + fileName; | |
| else | |
| contentDisposition = "attachment; filename*=UTF-8''" + Uri.EscapeDataString(fileName); | |
| Response.AddHeader("Content-Disposition", contentDisposition); |
This file contains hidden or 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
| string contentDisposition; | |
| if (Request.Browser.Browser == "IE" && (Request.Browser.Version == "7.0" || Request.Browser.Version == "8.0")) | |
| contentDisposition = "attachment; filename=" + Uri.EscapeDataString(fileName); | |
| else if (Request.Browser.Browser == "Safari") | |
| contentDisposition = "attachment; filename=" + fileName; | |
| else | |
| contentDisposition = "attachment; filename*=UTF-8''" + Uri.EscapeDataString(fileName); | |
| Response.AddHeader("Content-Disposition", contentDisposition); |
This file contains hidden or 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
| SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST; |