Help > Install New Software > Find the source url from http://www.eclipse.org/ajdt/downloads/ corresponding your eclipse version
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
/* | |
给出一个tree, 每一个node都有一个value, 问tree里面相同value的node连接成最长路径的大小(edge的数量). | |
tree是要自己建的, 输入是两个array, 第一个array表示每个node的value, 第二个array表示所有的边 | |
例如[1,1,1], [1,2,1,3] -> 2, 说明这个tree有3个node, value都是1, 然后node1和node2有边, node1和node3也有边, 最长的路径是2 -> 1 -> 3或者反过来, 总共两条边, 输出2 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <map> | |
#include <vector> | |
#include <algorithm> |
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
apt-get update | |
apt-get install openssh-server | |
mkdir /var/run/sshd | |
chmod 0755 /var/run/sshd | |
/usr/sbin/sshd | |
useradd --create-home --shell /bin/bash --groups sudo username ## includes 'sudo' | |
passwd username ## Enter a password |
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
#include <bits/stdc++.h> | |
using namespace std; | |
const int MAXN = 30005; | |
struct Edge { | |
int to, d, l; | |
Edge(int to=0, int d=0, int l=0): | |
to(to), d(d), l(l) {} | |
}; | |
vector<Edge> g[MAXN]; | |
int64_t ret = 0; |
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
#include <stdio.h> | |
#include <vector> | |
using namespace std; | |
vector<int> A; | |
int func() { | |
A.push_back(3); | |
A.push_back(4); | |
return 5; | |
} |
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.util.*; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Map; | |
import java.util.TreeMap; | |
public class Main { | |
static class MEdge { | |
int x, y; |
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
package bsh; | |
import org.junit.Test; | |
public class MemoryTest { | |
static public double printUsage() { | |
double cap = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); | |
cap /= 1048576; | |
System.out.printf("Usage %f MB\n", cap); |
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.util.*; | |
public class Main { | |
static class Point implements Comparable<Point> { | |
long x; | |
long y; | |
public Point(long x, long y) { | |
this.x = x; |
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
SMBIOS.reflectHost = "TRUE" | |
hypervisor.cpuid.v0 = "FALSE" |
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
package persistent; | |
import java.util.Scanner; | |
public class Persistent { | |
public static interface PStack<T> { | |
public boolean isEmpty(); | |
public long size(); |