Home » Archives for tháng 2 2014
Người đăng:
share-nhungdieuhay on Thứ Sáu, 28 tháng 2, 2014

Viết hàm đếm số lượng các giá trị phân biệt có trong mảngint demchusokhacnhau(int a[],int n){ int dem = 1; bool flag = false; for(int i = 0;i<n;i++){ [...]
More about →
Người đăng:
share-nhungdieuhay

Cho mảng một chiều các số nguyên. Viết hàm tìm số chẵn lớn nhất nhỏ hơn mọi giá trị lẻ có trong mảng.int timsochanlonnhat(int a[],int n){ int minle = 2147483647; // số nguyên lẻ lớn nhất int maxchan = -2147483648; [...]
More about →
Người đăng:
share-nhungdieuhay

Cho mảng một chiều các số nguyên. Viết hàm tìm chữ số xuất hiện nhiều nhất trong mảng.int timchuso(int a[],int n){ int temp[100]; int max = 0;int number = a[0]; // Khởi tạo giá trị 0 cho mảngfor(int j = 0;j<100;j++){ [...]
More about →
Người đăng:
share-nhungdieuhay on Thứ Sáu, 21 tháng 2, 2014

Tự động tạo mật khẩu ngẫu nhiên - PHP Password GeneratingPHP Code:<?phpfunction genPwd($length=6) { $password = ''; $possible = '23456789bcdfghjkmnpqrstvwxyz'; $i = 0; while [...]
More about →
Người đăng:
share-nhungdieuhay

PHP Code:class mysql{var $property = array( 'hostname' => 'localhost', 'database' => '', 'username' => '', 'password' [...]
More about →
Người đăng:
share-nhungdieuhay

Các hàm PHP xử lý chuỗi1: addcslashes :Trích dẫn chuỗi kí tự với những vạch chéo trong kiểu C- Cấu trúc :addcslashes(string with special characters);2: addslashes :Trích dẫn chuỗi kí tự với những vạch chéo- Cấu trúc : addcslashes(a [...]
More about →
Người đăng:
share-nhungdieuhay on Thứ Năm, 20 tháng 2, 2014

Câu lệnh truy vấn trong SQL Server 2005 (Select Command)Các lệnh và các mệnh đề cơ bản trong SQL Server 2005Lệnh SELECTSELECT là một lệnh truy vấn dữ liệu cơ bản trong SQL. Có rất nhiều mệnh đề con tuỳ chọn trong câu lệnh [...]
More about →
Người đăng:
share-nhungdieuhay

(VIGENERE CIPHER)///HÀM MÃ HÓAstatic void VigenereEncrypt(ref StringBuilder s, string key){ for (int i = 0; i < s.Length; i++) s[i] = Char.ToUpper(s[i]); key = key.ToUpper(); int [...]
More about →
Người đăng:
share-nhungdieuhay

(RAIL FENCE CIPHER)///MÃ HÓApublic static string Encrypt(int rail, string plainText){ List<string> railFence = new List<string>(); for (int i = 0; i < rail; i++) { [...]
More about →
Người đăng:
share-nhungdieuhay

///Hàm mã hóa Affine (Affine Encryption)/// e(x) = (ax + b)(mod m). Note: a & m là số nguyên tố cùng nhau.public static string AffineEncrypt(string plainText, int a, int b){string cipherText = "";char[] chars = [...]
More about →
Người đăng:
share-nhungdieuhay

///Ceasar Cipher/Ceasar Encriptionusing System;class Program{static string Caesar(string value, int shift) { char[] buffer = value.ToCharArray(); for (int i = 0; i < buffer.Length; i++){ // Letter. char letter [...]
More about →
Người đăng:
share-nhungdieuhay on Thứ Tư, 19 tháng 2, 2014

#include<iostream>#include<iomanip>using namespace std;int M[50][50];void NhapMaTran(int A[50][50], int n, int m){ for(int i=0;i<n;i++) for(int j=0;j<m;j++){ cout<<"\n A["<<i<<","<<j<<"]= [...]
More about →
Người đăng:
share-nhungdieuhay

#include<conio.h>#include<iostream.h>#define max 100/*Nhap ma tran*/void NhapMaTran(float A[max][max], int m, int n){ for(int i = 0; i<m; i++) for(int j = 0; j<n; j++) { [...]
More about →