2.git clone git://github.com/creationix/nvm.git ~/.nvm
3.echo ". ~/.nvm/nvm.sh" >> ~/.bashrc
4.重新開始新的terminal或用source載入環境變數
5.nvm install v0.10
nvm run v0.10 node.js
使用nvm執行node.js,上面的node.js可以換成你node.js的檔名
Android Programming
public class Java {
public static void main(String[] args) {
System.out.println("hello world");
}
}
static void Main(String[] args){
int age = 16;
if (age >= 18)
{
Console.WriteLine("成年");
Console.ReadKey();
}
else
{
Console.WriteLine("未成年");
Console.ReadKey();
}
}
static void Main(String[] args){
int age = 16;
if (age >= 18)
{
Console.WriteLine("成年");
Console.ReadKey();
}
else if (age < 18 && age >= 12)
{
Console.WriteLine("青少年");
Console.ReadKey();
}
else
{
Console.WriteLine("小孩");
Console.ReadKey();
}
}
static void Main(String[] args){
int choice = 1;
switch (choice)
{
case 1:
Console.WriteLine("A");
Console.ReadKey();
break;
case 2:
Console.WriteLine("B");
Console.ReadKey();
break;
case 3:
Console.WriteLine("C");
Console.ReadKey();
break;
default:
Console.WriteLine("不在選項中");
Console.ReadKey();
break;
}
}
static void Main(String[] args)
{
int i = 1, j = 2; //整數
float f = 1.2f; //單精準浮點數
double d = 3.14; //雙精準浮點數
char c = 'c'; //字元
string s = "hello"; //字串
bool b = true; //布林
}
using System;
namespace learn
{
class HelloWorld
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
//印出Hello World
Console.ReadKey();
}
}
}
static void Main()
{
}
static int Main()
{
return 0;
}
static void Main(String[] args)
{
}
static int Main(String[] args)
{
return 0;
}