Cách để thay đổi thói quen

1. Trước hết, bản thân phải quyết định thay đổi.

2. Gieo thói quen tốt: “Mảnh đất có nhiều cỏ dại để cải tạo nó ta nên trồng loại cây khác vào đấy”.

3. Giúp thói quen tốt phát triển: ta dùng thuật Kaizen, thực hiện 1 phút mỗi ngày.

4. Mỗi ngày gieo những suy nghĩ tích cực. (Có thể nói là nguyện trong tâm).

Ví dụ: Để đi bộ 30km thì trước đó ta phải có sự tập luyện. Mỗi ngày tập luyện với đoạn đường ngắn, sau đó tăng dần lên. Nếu không yêu cầu thời gian hoàn thành 30km thì ta chỉ việc đi bộ chậm rãi. (Đi chậm để giữ sức, như vậy mới đi được xa).

Sự thực về thành công của LINUX

1. Giúp tiết kiệm rất nhiều cho người dùng

– Mua máy mới cài LINUX thì giá thành thấp hơn nhiều.

– Máy cũ vẫn sử dụng bình thường (phần cứng).

– Các phiên bản cũ nhiều năm vẫn còn chạy tốt (phần mềm).

2. LINUX có nhiều phiên bản nhỏ gọn và nhẹ

– Puppy Linux dễ dàng cài trên ổ cứng hay USB.

– INX 1.1 chạy Live CD hoặc chạy trên USB ở dạng menu và command promt

3. Virút ít và bảo mật tốt

– Các tệp thực thi phải được phân quyền mới chạy được.

– Mọi tệp tin trong hệ thống đều hiện rõ mã nguồn ở dạng văn bản.

4. Các phiên bản của LINUX rất nhiều, đa dạng

– Giúp cộng đồng dùng máy tính có nhiều lựa chọn theo ý mình.

– Thể hiện sự cộng tác lẫn nhau giữa các lập trình viên trên toàn thế giới (tinh thần đoàn kết).

Sống lại các phiên bản Ubuntu cũ!

Trong bài này, mình làm sống lại bản Ubuntu 10.04

$sudo gedit /etc/apt/sources.list

Thay đổi như sau:

# deb cdrom:[Ubuntu 10.04.4 LTS _Lucid Lynx_ – Release i386 (20120214.2)]/ lucid main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to

# newer versions of the distribution.

deb http://old-releases.ubuntu.com/ubuntu/ lucid main restricted

deb-src http://old-releases.ubuntu.com/ubuntu/ lucid main restricted

## Major bug fix updates produced after the final release of the

## distribution.

deb http://old-releases.ubuntu.com/ubuntu/ lucid-updates main restricted

deb-src http://old-releases.ubuntu.com/ubuntu/ lucid-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

## team. Also, please note that software in universe WILL NOT receive any

## review or updates from the Ubuntu security team.

deb http://old-releases.ubuntu.com/ubuntu/ lucid universe

deb-src http://old-releases.ubuntu.com/ubuntu/ lucid universe

deb http://old-releases.ubuntu.com/ubuntu/ lucid-updates universe

deb-src http://old-releases.ubuntu.com/ubuntu/ lucid-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

## team, and may not be under a free licence. Please satisfy yourself as to

## your rights to use the software. Also, please note that software in

## multiverse WILL NOT receive any review or updates from the Ubuntu

## security team.

deb http://old-releases.ubuntu.com/ubuntu/ lucid multiverse

deb-src http://old-releases.ubuntu.com/ubuntu/ lucid multiverse

deb http://old-releases.ubuntu.com/ubuntu/ lucid-updates multiverse

deb-src http://old-releases.ubuntu.com/ubuntu/ lucid-updates multiverse

## Uncomment the following two lines to add software from the ‘backports’

## repository.

## N.B. software from this repository may not have been tested as

## extensively as that contained in the main release, although it includes

## newer versions of some applications which may provide useful features.

## Also, please note that software in backports WILL NOT receive any review

## or updates from the Ubuntu security team.

## deb http://old-releases.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse

## deb-src http://old-releases.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical’s

## ‘partner’ repository.

## This software is not part of Ubuntu, but is offered by Canonical and the

## respective vendors as a service to Ubuntu users.

## deb http://archive.canonical.com/ubuntu lucid partner

## deb-src http://archive.canonical.com/ubuntu lucid partner

deb http://old-releases.ubuntu.com/ubuntu lucid-security main restricted

deb-src http://old-releases.ubuntu.com/ubuntu lucid-security main restricted

deb http://old-releases.ubuntu.com/ubuntu lucid-security universe

deb-src http://old-releases.ubuntu.com/ubuntu lucid-security universe

deb http://old-releases.ubuntu.com/ubuntu lucid-security multiverse

deb-src http://old-releases.ubuntu.com/ubuntu lucid-security multiverse

Sau cùng là: (thay đổi xong nhớ lưu lại)

$sudo apt-get update

(Thực chất thay đổi “old-releases” là thay đổi link để cập nhật các gói cài đặt trong Ubuntu. Sau khi thay đổi như vậy, ta sẽ cài đặt được các phần mềm bằng Software Center hoặc bằng Terminal.)

Compile file in Ubuntu (nhanh, gọn, nhẹ)

Cài đặt trình soạn thảo gedit: sudo apt-get install gedit

1) .pas (sudo apt-get install fpc)

$fpc Hello.pas

$./Hello

2) .c (sudo apt-get install build-essential)

$gcc Hello.c -o Hello

$./Hello

.cpp (sudo apt-get install build-essential)

$g++ Hello.cpp -o Hello

$./Hello

3) .java (sudo apt-get install openjdk-6-jdk)

$javac Hello.java

$java Hello

4) .asm (sudo apt-get install as31 nasm)

$nasm -f elf32 Hello.asm //(hoặc elf64)

$ld -s -o Hello Hello.o

$./Hello

A) Hello.pas ($gedit Hello.pas)

program Hello;

uses crt;

begin

write(‘Hello World!’);

readln;

end.

B) Hello.c ($gedit Hello.c)

#include<stdio.h>

int main()

{

printf(“Hello World!”);

return 0;

}

Hello.cpp ($gedit Hello.cpp)

#include<iostream>

int main()

{

std::cout << “Hello World!\n”;

return 0;

}

C) Hello.java ($gedit Hello.java)

import java.util.*;

public class Hello

{

public static void main(String[] args)

{

System.out.print(“Hello World!”);

}

}

D) Hello.asm ($gedit Hello.asm)

section .text

global _start

_start:

mov edx, len

mov ecx, msg

mov ebx, 1

mov eax, 4

int 0x80

mov eax, 1

int 0x80

section .data

msg db ‘Hello World!’, 0xa

len equ $ – msg

GHI CHÚ NGÔN NGỮ:

.pas –> Pascal, .c và .cpp –> C/C++, .java –> Java, .asm –> Assembly