Skip to content

Instantly share code, notes, and snippets.

@voquanghoa
voquanghoa / Thi.md
Last active November 27, 2017 04:58

Bài tập C# cơ bản

Viết một chương trình quản lý sinh viên sử dụng giao diện console (hoặc Window form), có những chức năng sau:

  • Hiển thị menu chọn
  • Nhập dữ liệu từ giao diện
    • Nhập danh sách môn học (Id, Tên môn học, trọng số khi tính điểm trung bình)
    • Nhập danh sách giáo viên (Id, Tên, Quê Quán, Ngày sinh, 1 môn học sẽ dạy ID) --> Nhập Tên, Quê quán, ngày sinh --> chọn môn học --> save
    • Nhập danh sách lớp học(Id, Tên Lớp, Id giáo viên chủ nhiệm) --> Nhập tên lớp --> chọn giáo viên từ danh sách --> save
    • Nhập danh sách sinh viên (Id, Tên, Lớp, Quê Quán, Ngày sinh) --> nhập tên, quê quán, ngày sinh --> chọn lớp từ danh sách --> save
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace ModelEasy
{
public class IgnoreInputAttribute : Attribute
{
public static class ArrayExtension
{
public static void ForEach<T>(this IList<T> list, Action<T> action)
{
foreach (var obj in list)
{
action(obj);
}
}
}
@voquanghoa
voquanghoa / SuggestComboBox.cs
Last active March 10, 2024 11:07
C# SuggestCombobox
public class SuggestComboBox : ComboBox
{
#region fields and properties
private readonly ListBox suggestionListBox = new ListBox { Visible = false, TabStop = false };
private readonly BindingList<string> suggBindingList = new BindingList<string>();
private Expression<Func<ObjectCollection, IEnumerable<string>>> propertySelector;
private Func<ObjectCollection, IEnumerable<string>> propertySelectorCompiled;
private Expression<Func<string, string, bool>> filterRule;
package voon.truongvan.chines_exercise.model;
import java.util.ArrayList;
/**
* Created by Vo Quang Hoa on 12/22/2015.
*/
public class Question {
private String question;
private ArrayList<String> answers;
@voquanghoa
voquanghoa / cert_convert.sh
Created July 11, 2016 16:59 — forked from jmervine/cert_convert.sh
openssl: convert cert from p7b to crt (or cer)
openssl pkcs7 -print_certs -in old.p7b -out new.crt
# openssl pkcs7 -print_certs -in old.p7b -out new.cer