Shortcut | Description |
---|---|
Ctrl+Shift+P | command prompt |
Ctrl+Alt+P | switch project |
Ctrl+P | go to file |
Ctrl+G | go to line |
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
/* global api */ | |
class encn_LDOCE5MDX { | |
constructor(options) { | |
this.options = options; | |
this.maxexample = 6; | |
this.word = ''; | |
} | |
async displayName() { | |
return '朗文英汉5词典(MDX)'; |
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
using System; | |
using System.Collections.Specialized; | |
using System.IO; | |
using System.Security.Principal; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Web; | |
using System.Web.Configuration; | |
using System.Web.Hosting; | |
using System.Web.SessionState; |
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
# 启动远程调试 | |
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -jar kindle-push-1.0.0-jar-with-dependencies.jar | |
# 运行可执行 jar | |
java -jar kindle-push.jar | |
# 执行指定 class 的 main 函数 | |
java -cp kindle-push.jar kindle.MailSender.main |
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
##### Use the contents of a file to replace a string using SED | |
# You can use the `r` command. | |
# Reference: https://stackoverflow.com/a/6790967/1673077 | |
# Example: use the contents of fileA.txt to replace the line that contains 'china' in fileB.txt | |
sed -i -e '/china/{r fileA.txt' -e 'd' -e '}' fileB.txt |
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
// 1. Convert List to Array | |
private String[] toString(List<String> list) { | |
String[] as = new String[list.size()]; | |
as = list.toArray(as); | |
return as; | |
} |
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
location ~* ^/remote-files/(http[s]*://)(.*?)/(.*) { | |
# Do not allow people to mess with this location directly | |
# Only internal redirects are allowed | |
internal; | |
# nginx has to be able to resolve the remote URLs | |
resolver 8.8.8.8; | |
# Location-specific logging | |
#access_log /usr/local/etc/nginx/logs/internal_redirect.access.log main; |
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 class Helper | |
{ | |
/// <summary> | |
/// Runs a method on a type, given its parameters. This is useful for calling private methods. | |
/// </summary> | |
/// <returns>The return value of the called method.</returns> | |
public static object RunStaticMethod(System.Type t, string strMethod, object[] aobjParams, Type[] types) { | |
BindingFlags eFlags = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic; | |
return RunMethod(t, strMethod, null, aobjParams, eFlags, types); | |
} |