eclipse -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source https://spotbugs.github.io/eclipse/ -destination .\spotbugs
eclipse -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source https://spotbugs.github.io/eclipse/ -destination .\spotbugs
eclipse -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source https://ecd-plugin.github.io/update/ -destination .\ecd
eclipse -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source https://ecd-plugin.github.io/update/ -destination .\ecd
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt update | |
sudo apt install oracle-java8-installer | |
sudo update-alternatives --config java | |
sudo vim /etc/environment | |
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/go/bin:/home/xiongdahu/app/scala-2.12.6/bin" | |
JAVA_HOME="/usr/lib/jvm/java-8-oracle" | |
SCALA_HOME="/home/xiongdahu/app/scala-2.12.6" |
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns="http://maven.apache.org/POM/4.0.0" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 | |
http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>xiong.dahu</groupId> | |
<artifactId>scalamvn</artifactId> | |
<version>1.0-SNAPSHOT</version> |
# 1. change source.list in /etc/apt/ | |
sudo apt update && | |
sudo apt install openjdk-8-jdk-headless openjdk-8-jre-headless git unzip vim maven scala -y | |
#for multi java version | |
sudo update-alternatives --config java | |
sudo vim /etc/profile.d/xiongdahu.env.sh | |
#put these line in xiongdahu.env.sh | |
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
#PUT entinfoindex | |
{ | |
"settings": { | |
"number_of_shards": 1, | |
"number_of_replicas": 0, | |
"index": { | |
"analysis": { | |
"analyzer": { | |
"default": { | |
"tokenizer": "ik_smart" |
Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.
- Edit the
/etc/ssh/sshd_config
file by running the commandsudo vi /etc/ssh/sshd_config
and do the following- Change
Port
to 2222 (or any other port above 1000) - Change
PasswordAuthentication
to yes. This can be changed back to no if ssh keys are setup.
- Change
- Restart the ssh server:
sudo service ssh --full-restart
- With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
for i in *; do if [ ${i: -3} == ".md" ]; | |
then echo "--- | |
title: '"${i::-3}"' | |
date: 2019-01-01 | |
tags: | |
- java | |
- code | |
--- | |
$(cat $i)" > $i; |
#Note for Programming in Scala
##Chp.0 SBT & Scala Interpreter
-
Call scala interpreter by
sbt
.// enter scala interpreter
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" | |
"os" | |
"strings" |