Sách – Trí tuệ nhân tạo và lập trình tiến hóa
Hôm nay, tôi xin chia sẻ với các bạn một tài liệu về lập trình tiến hóa trong lĩnh vực trí tuệ nhân tạo. Đó là quyển sách “Trí tuệ nhân tạo lập trình tiến hóa”: Tải về nosomovo (Sưu tầm)
Hôm nay, tôi xin chia sẻ với các bạn một tài liệu về lập trình tiến hóa trong lĩnh vực trí tuệ nhân tạo. Đó là quyển sách “Trí tuệ nhân tạo lập trình tiến hóa”: Tải về nosomovo (Sưu tầm)
//Minh hoa thuat Selection Sort #include<stdio.h> #include<conio.h> int Mang[10]={10,9,8,7,6,5,4,3,2,1}; int X; void SelectionSort(int mang[],int n) { int i,j,tam; for(i=0;i<n;i++) { int min=i; for(j=i+1;j<n;j++) if(mang[j]<mang[min]) min=j; tam=mang[i]; mang[i]=mang[min]; mang[min]=tam; } } void inday(int mang[],int n) { int vt; for(vt=0;vt<n;vt++) printf(“%d “,mang[vt]); } void main() { clrscr(); printf(“Day truoc khi sap xep\n”); …
// Tim kiem tuyen tinh (LinearSearch) #include<stdio.h> #include<conio.h> int LinearSearch1(int Day[],int n,int x) { int vitri=0; while(vitri<n&&Day[vitri]!=x) vitri++; if(vitri==n) return -1; else return 1; } int LinearSearch2(int Day[],int n,int x) { int vitri=0; while(vitri<n&&Day[vitri]!=x) vitri++; if(vitri==n) return -1; else return vitri; } int Mang[10]={1,2,3,4,5,6,7,8,9,10}; int X; void main() { clrscr(); …
//Minh hoa InsertSort chen truc tiep //Minh hoa thuat: InsertSort (Sap xep bang chen truc tiep) int Mang[20]={10,9,8,7,6,5,4,3,2,1}; void InsertSort(int mang[],int n) { int pos,i,x,vt; for(i=1;i<n;i++) { //gan gia tri phan tu thu i se duoc chen vao vi tri pos x=mang[i]; pos=i; //tim vi tri chen x while(pos>0&&x<mang[pos-1]) pos=pos-1; …
/* gia su da co 2 danh sach l1 va l2 va 2 ds nay da dc sap xep tang dan. toi chi demo phan tron 2 ds tang nay lai thoi. */ #include <stdio.h> #include <conio.h> typedef int ElementType; struct Node { ElementType Element; Node *Next; }; typedef Node …
/*———————————————- Chuong trinh doi co so he 10 ra co so n bat ky ———————————————–*/ #include <conio.h> #include <stdio.h> typedef int ElementType; struct Node { ElementType Element; Node *Next; }; typedef Node *Stack; typedef Node *Position; void MakeNullStack(Stack S) { S->Next=NULL; } Position Pop(Stack S) { return S->Next; } void …
/* —————————————————————————– – Su Dung Con Tro / ———————————————– a) nhap ds so nguyen b) Sap xep giam c) Tong cac so nguyen la so 9 phuong d) in ket qua vua tinh e) Sap xep theo phuong phap noi bot f) Tong cac so nguyen to trong danh sach …
/*————————————————— -Thuat Toan: Bubble Sort (Sap Xep Noi Bot) -Kieu: Pointer (Dung con tro). —————————————————-*/ #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <dos.h> struct Node { int Value; Node *Next; }; typedef Node *List; typedef Node *Position; // Tao DS Rong void MakeNullList(List L) { L->Next=NULL; } //Nhap DS void …
//Minh hoa thuat BubbleSort (sap xep noi bot) #include<stdio.h> #include<conio.h> int Mang[10]={10,9,8,7,6,5,4,3,2,1}; // ham in day so trong mang voi n phan tu void inday(int mang[],int n) { int vtin; for(vtin=0;vtin<n;vtin++) printf(“%d “,mang[vtin]); } void BubbleSort(int mang[],int n) { int i,j,xtam; for(i=0;i<n;i++) for(j=n-1;j>i;j–) if(mang[j]<mang[j-1]) //neu mang[j]>mang[j-1] thi doi cho { …
Bên dưới là các loại con trỏ chuột và hình ảnh của nó:
Để nối chuỗi trong mysql, chúng ta sử dụng hàm CONCAT. CONCAT(‘chuoi_1’, ‘chuoi_2’, ‘…’, ‘chuoi_n’) Ví dụ: CONCAT(‘no’,’so’,’mo’,’vo’) // Ket quả: nosomovo Để hiểu rõ hơn về nguyên tắt hoạt động của hàm các bạn xem hình bên dưới đây nhé. Nosomovo
Để khởi động lại hệ điều hành linux chúng ta sử dụng lệnh reboot để làm điều này. Lệnh này có cú pháp đơn giản sau: sudo reboot Trong đó: sudo: là chạy lệnh reboot với quyền Super Admin. sudo – Super admin do. reboot: Là lệnh khởi động lại …
In php, to receive data post from mobile application we use this code below: $data=file_get_contents(“php://input”); //receive data and set it to data varible $array_data=json_decode($data); //convert data from json type to array type Nosomovo
In mysql, to get sub string of the string we use SUBSTRING function. This substring function syntax below: SUBSTRING(string,start_position,length) Example: SUBSTRING(“nosomovo”,3,4) The result of this statement is “somo”. nosomovo
In mysql, to find position of the string in another string we use POSITION function. Here! Position function syntax: POSITION(substring IN string) Example: POSITION(“somo” IN “nosomovo”) The result of this statement is 3. Nosomovo
Bạn thực hiện một lệnh insert vào cơ sở dữ liệu và muốn kiểm tra trạng thái thêm có thành công hay không. Nhưng bạn chưa biết cách thực hiện. Đoạn code sau sẽ giúp bạn giải quyết vấn đề này nhé: return ($this->db->affected_rows() != 1) ? false : true; …
Để cài đặt thư viện gd cho php trên Ubuntu ta thực hiện các lệnh: sudo apt-get update sudo apt-get install php-gd sudo service apache2 restart Hy vọng hữu ích với bạn! Nosomovo
Bạn cần lấy chính xác kích thước màn hình của thiết bị? Để bạn thực hiện các bước tính toán tối ưu cho ứng dụng trong việc hiển thị? Trong C#, để làm việc này chúng ta sử dụng đoạn code bên dưới để lấy kích thước màn hình hiện …
Bản quyền © 2026 | Theme WordPress viết bởi MH Themes