Class: com.intellij.openapi.fileTypes.impl.AbstractFileType Name: IDL Description: IDL Class: com.intellij.openapi.fileTypes.impl.AbstractFileType Name: JavaFX Description: JavaFX Class: com.intellij.openapi.fileTypes.impl.AbstractFileType Name: C++ Description: C/C++ Class: com.intellij.openapi.fileTypes.impl.AbstractFileType Name: C# Description: C# Class: com.intellij.openapi.fileTypes.impl.AbstractFileType Name: Perl Description: Perl Class: com.intellij.openapi.fileTypes.impl.AbstractFileType Name: AspectJ Description: AspectJ (syntax highlighting only) Class: com.intellij.openapi.fileTypes.impl.AbstractFileType Name: Haskell Description: Haskell Class: com.intellij.openapi.fileTypes.impl.AbstractFileType Name: PHP Description: PHP (syntax highlighting only) Class: com.intellij.ide.highlighter.ArchiveFileType Name: ARCHIVE Description: Archive Class: com.intellij.openapi.fileTypes.PlainTextFileType Name: PLAIN_TEXT Description: Text
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
public int getMaximumEatenDishCount(int N, int[] D, int K) { | |
// N must be less than D.length right? | |
if (N > D.length) { | |
throw new IllegalArgumentException("N must be less than or equal to D.length"); | |
} | |
int count = 0; | |
// LRU cache to store the last K dishes | |
Map<Integer, Integer> lastK = new LinkedHashMap<Integer, Integer>(K, 0.75f, false) { | |
@Override |
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
static int getUniformIntegerCountInInterval(long A, long B) { | |
int count = 0; | |
int lenA = String.valueOf(A).length(); | |
int lenB = String.valueOf(B).length(); | |
for (int i = lenA; i <= lenB; i++) { | |
String spacesOfLengthI = String.format("%" + i + "s", " "); | |
for (int j = 1; j <= 9; j++) { | |
Long uniformNumber = Long.valueOf(spacesOfLengthI.replace(" ", String.valueOf(j))); | |
if (uniformNumber >= A && uniformNumber <= B) { | |
count++; |
create a new chrome shortcut on your desktop and add --remote-debugging-port=9222 to the target. open it using the just created shortcut and go to http://127.0.0.1:9222/json/version
example: ws://127.0.0.1:9222/devtools/browser/1a59ad92-052d-4d44-b614-b6bf15999d10
Browser "Chrome/126.0.6478.114" Protocol-Version "1.3" User-Agent "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" V8-Version "12.6.228.19"
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
reg add HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32 /ve /d "" /f |
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
import io.netty.handler.ssl.util.InsecureTrustManagerFactory; | |
import io.netty.handler.ssl.util.KeyManagerFactoryWrapper; | |
import javax.net.ssl.KeyManager; | |
SslManagerBundle insecureSslManagerBundle = SslManagerBundle.of( | |
new KeyManagerFactoryWrapper(new KeyManager() {}), | |
InsecureTrustManagerFactory.INSTANCE); | |
insecureSslBundle = SslBundle.of(null, | |
null, |
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
ObjectPostProcessor<AuthenticationEntryPoint> authenticationEntryPointFilterPostProcessor = new ObjectPostProcessor<>() { | |
@Override | |
public <O extends AuthenticationEntryPoint> O postProcess(O authenticationEntryPoint) { | |
if (authenticationEntryPoint instanceof DelegatingAuthenticationEntryPoint delegatingAuthenticationEntryPoint) { | |
Field entryPointsField = ReflectionUtils.findField(DelegatingAuthenticationEntryPoint.class, "entryPoints"); | |
assert entryPointsField != null; | |
entryPointsField.setAccessible(true); | |
LinkedHashMap<RequestMatcher, AuthenticationEntryPoint> entryPoints = | |
(LinkedHashMap<RequestMatcher, AuthenticationEntryPoint>) ReflectionUtils.getField(entryPointsField, | |
delegatingAuthenticationEntryPoint); |
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
logging.level._org.springframework.web.servlet.HandlerMapping=DEBUG |
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
@ExceptionHandler(Exception.class) | |
public ResponseEntity<String> handleError(HttpServletRequest req, Exception ex) { | |
if (ex.getCause() instanceof SocketTimeoutException) { | |
return ResponseEntity.status(HttpStatus.GATEWAY_TIMEOUT).body(HttpStatus.GATEWAY_TIMEOUT.getReasonPhrase()); | |
} | |
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(HttpStatus.INTERNAL_SERVER_ERROR.getReasonPhrase()); | |
} |
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
org.apache.catalina.core.ApplicationDispatcher#wrapRequest |
NewerOlder