PIXNET Logo登入

夏天的雙重性格

跳到主文

雙重性格的夏天

部落格全站分類:生活綜合

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 10月 19 週五 201221:39
  • 買到寶MYBAO 開箱文初體驗分享


人生中第一台LCD掛了,這台LCD在我上大學的時候買的(2003)
其實修的話不如買一台新的,但還是有點捨不得(舊愛還是最美…),
於是…我燃起了要把它醫好的決心
在做了些功課知道要換什麼零件後!!!!
(繼續閱讀...)
文章標籤

pdyurfof 發表在 痞客邦 留言(0) 人氣(968)

  • 個人分類:生活
▲top
  • 7月 15 週四 201015:10
  • MapX5 載入Shp檔(中文亂碼)

public static MapXLib.LayerInfo AddShpLayer(string DataPath, string LayerName, AxMapXLib.AxMap Axmap)
        {
            #region 載入圖檔並傳回圖層
            MapXLib.LayerInfo linfo = new MapXLib.LayerInfoClass();
            MapXLib.LayerInfo li = new MapXLib.LayerInfoClass();
            MapXLib.LayerInfo newlayer = new MapXLib.LayerInfoClass();
            MapXLib.Dataset dt = null;
            MapXLib.Layer lyr = null;
            FileInfo file = new FileInfo(DataPath + LayerName + ".shp");
            if (file.Exists)
            {   
                linfo.Type = MapXLib.LayerInfoTypeConstants.miLayerInfoTypeShape;
                linfo.AddParameter("Name", LayerName + "shp");
                linfo.AddParameter("FileSpec", DataPath + LayerName + ".shp");
                linfo.AddParameter("CoordSys", Axmap.NumericCoordSys);
                linfo.AddParameter("AutoCreateDataset", true);
                linfo.AddParameter("DatasetName", LayerName);
                lyr = Axmap.Layers.Add(linfo, Axmap.Layers.Count);
                lyr.BeginAccess(MapXLib.LayerBeginAccessConstants.miAccessRead);
                dt = lyr.DataSets[1];
                linfo = null;
                MapXLib.Dataset ds = Axmap.DataSets.Add(MapXLib.DatasetTypeConstants.miDataSetLayer, lyr, LayerName + "2", 0, 0, 0, dt.Fields, false);
                li.Type = MapXLib.LayerInfoTypeConstants.miLayerInfoTypeNewTable;
                FileInfo tabfile = new FileInfo(Application.StartupPath + "\\temp\\" + LayerName + ".tab");
                if (tabfile.Exists)
                {
                    tabfile.Delete();
                    tabfile = new FileInfo(Application.StartupPath + "\\temp\\" + LayerName + ".map");
                    tabfile.Delete();
                    tabfile = new FileInfo(Application.StartupPath + "\\temp\\" + LayerName + ".id");
                    tabfile.Delete();
                    tabfile = new FileInfo(Application.StartupPath + "\\temp\\" + LayerName + ".dat");
                    tabfile.Delete();
                }
                li.AddParameter("FileSpec", Application.StartupPath + "\\temp\\" + LayerName + ".tab");
                li.AddParameter("Name", LayerName);
                li.AddParameter("Fields", ds.Fields);
                li.AddParameter("AutoCreateDataset", true);
                //newlayer.AddParameter("CoordSys", Axmap.NumericCoordSys);
                li.AddParameter("Features", lyr.AllFeatures);
                return li;
            }
            else { return null; }
            #endregion
        }
(繼續閱讀...)
文章標籤

pdyurfof 發表在 痞客邦 留言(0) 人氣(112)

  • 個人分類:程式
▲top
  • 6月 22 週二 201014:37
  • SQLServer 取代某欄位資料

update 資料表
set 欄位= replace(欄位, '被取代的值', '將取代的值')
where 欄位 like '%條件%'
(繼續閱讀...)
文章標籤

pdyurfof 發表在 痞客邦 留言(0) 人氣(627)

  • 個人分類:程式
▲top
  • 6月 15 週二 201014:36
  • SQLServer 利用 SQL 找出欄位值重覆的記錄

SELECT * FROM table GROUP BY id1, id2 HAVING count(*)>1
(繼續閱讀...)
文章標籤

pdyurfof 發表在 痞客邦 留言(0) 人氣(2,009)

  • 個人分類:程式
▲top
  • 6月 03 週四 201014:35
  • SQLServer 刪除預設值、修改資料欄位

刪除預設值
alter table person_commission drop DF_person_commission_pc_commission
修改欄位型態
alter table person_commission alter column pc_commission float
增加預設值
ALTER TABLE person_commission ADD  CONSTRAINT DF_person_commission_pc_commission  DEFAULT ((0))
(繼續閱讀...)
文章標籤

pdyurfof 發表在 痞客邦 留言(0) 人氣(2,016)

  • 個人分類:程式
▲top
  • 5月 31 週一 201014:33
  • C# 播放音效

 System.Media.SoundPlayer sp = new System.Media.SoundPlayer();
            sp.SoundLocation = @"C:\wav\lightning.wav";
            sp.Play(); // 撥放
            // sp.Stop(); // 停止
(繼續閱讀...)
文章標籤

pdyurfof 發表在 痞客邦 留言(0) 人氣(479)

  • 個人分類:程式
▲top
  • 5月 18 週二 201014:30
  • C# 在Crystal Reports 上加入圖片

//報表
CargBillReport CBR = new CargBillReport();
//新增一個欄位      
dt.Columns.Add("barcode",System .Type.GetType ("System.Byte[]"));
//圖片
byte[] img = System.IO.File.ReadAllBytes("C:\\Documents and Settings\\Administrator\\My Documents\\My Pictures\\Water lilies.jpg");
//加入圖片                    
dt.Rows[0]["barcode"] = img;
//填入報表          
CBR.SetDataSource(dt);
//預覽
 crystalReportViewer1.ReportSource = CBR;
(繼續閱讀...)
文章標籤

pdyurfof 發表在 痞客邦 留言(0) 人氣(1,936)

  • 個人分類:程式
▲top
  • 4月 20 週二 201014:28
  • C# base64加密與解密

//加密
public   static   string   Base64Encode(string   AStr)
{
        return   Convert.ToBase64String(Encoding.UTF8.GetBytes(AStr));
}
(繼續閱讀...)
文章標籤

pdyurfof 發表在 痞客邦 留言(0) 人氣(9,518)

  • 個人分類:程式
▲top
  • 4月 15 週四 201014:19
  • C# Byte[] TO Image 將byte陣列儲存為圖檔

filepath是要儲存的路徑
FileBS是圖檔的byte[]
 ------------------------------
            try
            {
               
                FileStream BFile = new FileStream(filepath, FileMode.Create); //開啟"D:\test.txt"          
                BFile.Write(FileBS, 0, FileBS.GetUpperBound(0) + 1);
                BFile.Flush();
                BFile.Close();
           
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString()+"在儲存圖層時");
            }
(繼續閱讀...)
文章標籤

pdyurfof 發表在 痞客邦 留言(0) 人氣(1,554)

  • 個人分類:程式
▲top
  • 3月 30 週二 201014:32
  • C# MD5加密

 //MD5加密
        private String MD5code(String str)
        {
            System.Security.Cryptography.MD5CryptoServiceProvider md5Hasher=new            System.Security.Cryptography.MD5CryptoServiceProvider();
            Byte[] data = md5Hasher.ComputeHash((new System.Text.ASCIIEncoding()).GetBytes(str));
            System.Text.StringBuilder sBuilder = new System.Text.StringBuilder();   
            for (int i=0 ;i< data.Length; i++){
                sBuilder.Append(data[i].ToString("x2"));
            }     
            return sBuilder.ToString() ;
        }
(繼續閱讀...)
文章標籤

pdyurfof 發表在 痞客邦 留言(0) 人氣(2,100)

  • 個人分類:程式
▲top
12»

最新文章

  • 買到寶MYBAO 開箱文初體驗分享
  • MapX5 載入Shp檔(中文亂碼)
  • SQLServer 取代某欄位資料
  • SQLServer 利用 SQL 找出欄位值重覆的記錄
  • SQLServer 刪除預設值、修改資料欄位
  • C# 播放音效
  • C# 在Crystal Reports 上加入圖片
  • C# base64加密與解密
  • C# Byte[] TO Image 將byte陣列儲存為圖檔
  • C# MD5加密

LovelyTime

文章精選

誰來我家

參觀人氣

  • 本日人氣:
  • 累積人氣: