
Excel connection string in C#
string ConnectionString = “Provider=Microsoft.ACE.OLEDB.12.0; Data Source=” + “filename” + “; Extended Properties=\”Excel 12.0\”;”; Nosomovo
string ConnectionString = “Provider=Microsoft.ACE.OLEDB.12.0; Data Source=” + “filename” + “; Extended Properties=\”Excel 12.0\”;”; Nosomovo
Kết nối bằng quyền Windows: string m_ConnectString = “Data Source=” + “servername” + “;Initial Catalog=” + “databasename” + “;Integrated Security=True;”; Kết nối bằng quyền User: string m_ConnectString = “Data Source=” + “servername” + “;Initial Catalog=” + “databasename” + “;User Id=” + “username” + “;Password=” + “pasword” + “;”; Nosomovo
Để thực hiện cài đặt một website Nukeviet các bạn thực hiện như sau: Bước 1: Truy cập vào trang chủ nukeviet.vn chọn và tải bộ source phù hợp nhu cầu sử dụng. Bước 2: Giải nén file cài đặt vừa tải vào thư mục gốc chạy web, thường là www, …
Trong trường hợp bạn quên luôn tài khoản admin quản trị trang thì bạn có thể dùng cách sau để đặt lại password: Bước 1: Mở file includes/mainfile.php và thêm đoạn code sau vào cuối file: $username = ‘Username’; //Username cần đặt lại password $password = $crypt->hash(trim(‘Userpass’)); //Password mới if( …
/* Hàm chuyển nhiều mảng một chiều thành mảng 2 chiều Ví dụ: $arr_cacmang1chieu=array( ‘col_1’=>array(‘A’,’B’,’C’), ‘col_2’=>array(‘D’,’E’,’F’) ); Sau khi chuyển kết quả sẽ là: $arr_mang2chieu=array( 0=>array( ‘col_1’=>’A’, ‘col_2’=>’D’ ), 1=>array( ‘col_1’=>’B’, ‘col_2’=>’E’ ), 2=>array( ‘col_1’=>’C’, ‘col_2’=>’F’ ) ) */ function multiArrayTotwodimensionArray($array,$remotenullrow=false) { $arr_Return=null; $maxlen=0; if(!empty($array)) { //Count Max len of …
Để cấu hình tài khoản git sau khi đã cài đặt git vào máy chúng ta dùng 2 lệnh sau: git config –global user.email “you@example.com” git config –global user.name “Your Name” Nosomovo
Khi bạn chuyển website của mình từ host A sang host B và muốn đem ssl đã cài đặt bên host A sang host B thì cách thực hiện đơn giản như sau: – Tại host A,các bạn truy cập vào phần quản lý file tìm 3 file ssl.ca, ssl.cert, …
Để cài đặt Tiếng việt cho website WordPress chúng ta thực hiện với 3 bước như sau: Bước 1: Chọn Settings => Site Language là “Tiếng Việt” thay cho “English” hiện tại. Bước 2: Bấm Save Changes để lưu cài đặt lại. Bước 3: Chọn menu Bảng tin => Cập …
public class HttpUploadHelper { private HttpUploadHelper() { } public static string Upload(string url, UploadFile[] files, NameValueCollection form) { HttpWebResponse resp = Upload((HttpWebRequest)WebRequest.Create(url), files, form); using (Stream s = resp.GetResponseStream()) using (StreamReader sr = new StreamReader(s)) { return sr.ReadToEnd(); } } public static HttpWebResponse Upload(HttpWebRequest req, UploadFile[] files, NameValueCollection form) …
Lớp myRegistry bên dưới cung cấp cho ta các hàm thao tác với Registry của windows như: Đọc giá trị của 1 key. Đăng ký key và gi giá trị của key vào registry. Xóa key đã đăng ký. public sealed class myRegistry { /// <summary> /// Method is used to read …
Lớp Set bên dưới sẽ cung cấp cho chúng ta các hàm thực hiện các phép toán trên tập hợp như: Giao, hợp, hiệu: class Set { private string m_Set = “”; #region Contructors public Set(string str_set) { this.m_Set = str_set; } #endregion #region Properties public string SET { get …
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 …
Bản quyền © 2025 | Theme WordPress viết bởi MH Themes