摘要:
public class FileHelper { #region 文件名/扩展名/路径名 /// <summary> /// 获取文件名 /// </summary> /// <param name="filepath"></param> /// <returns></returns> public static string GetFileName(string filepath) { return File.Exists(filepath) ... 阅读全文
摘要:
Private Sub Command1_Click() Dim H, x1, x2, m As Double x1 = Val(Text1.Text) x2 = Val(Text2.Text) If f(x1) * f(x2) < 0 Then Do m = (x1 + x2) / 2 If f(m) = 0 Then x1 = m x2 = m End If If f(x1) * f(m) > 0 Then... 阅读全文
摘要:
/// <summary> /// 统一ParameterExpression /// </summary> internal class ParameterReplacer : ExpressionVisitor { public ParameterReplacer(ParameterExpression paramExpr) { ParameterExpression = paramExpr; } public ParameterExpression ParameterExpres... 阅读全文
摘要:
/// <summary> /// 反转字符顺序 /// </summary> /// <param name="str"></param> /// <returns></returns> public static string EncodePassword(string str) { return str.Aggregate("", (current, s) => s + current); } 阅读全文
摘要:
const string str = "01001000 00110100 01110011 01001001 01000001 01000011 01001010 01001011 " + "01101110 01101100 01000001 01000001 01000001 00101011 00110001 01011010 " + "01000010 00110001 01010010 01010100 01010011 00110111 ... 阅读全文
摘要:
public class TestClass { public static void TestIt() { var ds = DateTime.Now; var list = new List<MA>(); list.Add(new MA { ma001 = "A", ma002 = "1" }); list.Add(new MA { ma001 = "A", ma002 = "2" }); list.Add(new MA { ma001 =... 阅读全文
摘要:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Typ 阅读全文
摘要:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta content="zh-cn" http-equiv="Content-Language" />&l 阅读全文
摘要:
通常,我们要在线程中更新UI的话,都会采用Invoke private void button1_Click(object sender, EventArgs e){ Thread asd = new Thread(new ThreadStart(DoProgressEnd)); asd.Start();} private void DoProgressEnd() { Invoke(new Action(() => { button1.Text = "准备就绪"; ... 阅读全文
摘要:
static void Main(string[] args) { /* * 命题:计算 加 减 乘 除,不含括号 */ var str = "8*8*8-100*2"; //计算乘法 str = Calc(str, '*'); str = Calc(str, '/'); str = Calc(str, '+'); str = Calc(str, '-'); ... 阅读全文