Getting started:
Related tutorials:
| projects | |
| project-1 | |
| docs | |
| managements | |
| trong này là các file quản lý như wbs, tasklist, issue list.. | |
| requirements | |
| trong này là requirement của dự án | |
| resources | |
| trong này là các file design, hoặc các thư viện cần dùng, tool cần dùng nếu không dùng package management | |
| nếu làm .NET thì mình dùng nuget thì hầu như không cần dùng cái này. |
| [HttpPost] | |
| public ActionResult Index(IEnumerable<HttpPostedFileBase> files) | |
| { | |
| bool successUpload = false; | |
| string datetime = DateTime.Now.ToString("yyyyMMdd_hhmmss"); | |
| var path = Path.Combine(Server.MapPath("~/App_Data"), datetime); | |
| foreach (var file in files) | |
| { | |
| if (file?.ContentLength > 0) |
Getting started:
Related tutorials:
| public static long DirSize(DirectoryInfo d) | |
| { | |
| long size = 0; | |
| // Add file sizes. | |
| FileInfo[] fis = d.GetFiles(); | |
| foreach (FileInfo fi in fis) | |
| { | |
| size += fi.Length; | |
| } | |
| // Add subdirectory sizes. |
You can use Except:
List<car> list1 = GetTheList();
List<car> list2 = GetSomeOtherList();
List<car> result = list2.Except(list1).ToList();You probably don't even need those temporary variables:
List<car> result = GetSomeOtherList().Except(GetTheList()).ToList();Một ngày đẹp trời, install xong VM Ubuntu server, nhấn ifconfig và mãi nó chẳng chịu ăn cái IP 192.168.56.x như "bình thường" cho mà cứ dính chặt vô cái IP 10.0.2.x.
Vậy thì hãy thử bật cái lệnh này lên:
ip addr
Thật không may nếu như bạn thấy cái dòng lỗi này
mtu 1500 qdisc noop state down group default qlen 1000
Trong trường hợp đó, vậy thì "gọi hồn" cái network adapter dậy bằng 2 lệnh này thôi:
| List<Info> list = new List<Info>(); | |
| foreach (var file in files) | |
| { | |
| Info info = new Info() | |
| { | |
| FileName = Path.GetFileNameWithoutExtension(file), | |
| Duration = GetLength(file) | |
| }; | |
| list.Add(info); | |
| } |
| foreach (DataGridViewRow rw in this.dataGridView1.Rows) | |
| { | |
| for (int i = 0; i < rw.Cells.Count; i++) | |
| { | |
| if (rw.Cells[i].Value == null || rw.Cells[i].Value == DBNull.Value || String.IsNullOrWhiteSpace(rw.Cells[i].Value.ToString())) | |
| { | |
| // here is your message box... | |
| } | |
| } | |
| } |
| foreach(DataGridViewRow row in yourDataGridView.Rows) | |
| { | |
| foreach(DataGridViewCell cell in row.Cells) | |
| { | |
| //do operations with cell | |
| } | |
| } |
| // You can use an extension method: | |
| public static class StringExtension | |
| { | |
| public static string GetLast(this string source, int tail_length) | |
| { | |
| if(tail_length >= source.Length) | |
| return source; | |
| return source.Substring(source.Length - tail_length); | |
| } |