Proxy
System.setProperty("http.proxyHost", "localhost");
System.setProperty("http.proxyPort", "8888");
System.setProperty("http.proxyHost", "localhost");
System.setProperty("http.proxyPort", "8888");
findstr /s static *.java | findstr /v final | findstr /v ( | findstr /v import | findstr /v enum | findstr /v /r "static\ \{" | more
// It uses Jackson jr: https://github.com/FasterXML/jackson-jr
import com.fasterxml.jackson.jr.ob.JSON;
Map map = JSON.std.mapFrom(strJSON);
String foo = (String) map.get("Foo");
List bar = (List) map.get("Bar");
Map baz = (Map) map.get("Baz");
// See also: "Jackson Jr for casual JSON reading/writing from Java" https://medium.com/@cowtowncoder/jackson-jr-for-casual-json-reading-writing-from-java-f5d379d4bcb6#61e8
@Resource(lookup = "jdbc/foo")
private javax.sql.DataSource ds;
Do not use @Resource(name = "jdbc/foo") On the reference implementation (Glassfish) it will try to connect to Derby.
// MyComponent.java
import org.springframework.stereotype.Component;
@Component
public class MyComponent implements MyComponentInterface {
@EJB(mappedName = "java:module/MyEJB")
private MyEJB myEJB;
// ...
}
// MyEJB.java
import javax.ejb.Stateless;
@Stateless
public class MyEJB {
// ...
}
About java:module, see "32.4.1.1 Portable JNDI Syntax" on the Java EE 7 Tutorial.
Yes, they are allowed. https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_HTML_sections_and_outlines#Defining_sections
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>libs/</classpathPrefix>
<mainClass>org.foo.bar.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/libs
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
TBD
On Breakpoint properties / Actions section / Print Text, write {=variablename}
SELECT spid, hostname, program_name, loginame, login_time FROM master.dbo.sysprocesses WHERE loginame LIKE '%myloginname%'
TODO.
TODO.
find . -type f -and \( -not -name ".*" \) | wc -l
for f in *; do cd "$f"; mv * ..; cd ..; done
for f in *.zip; do unzip "$f"; done
shutdown /h /t 10 /c "Sleeping..." /d u:0:0
gpupdate /force
ROBOCOPY [from] [to] /E /R:1 /W:1 /NFL
File tab / Manage Documents / Manage Document button / Recover Unsaved Documents
%userprofile%\AppData\Local\Microsoft\Office\UnsavedFiles
%APPDATA%\KeePass\KeePass.config.xml