Time of Update: 2015-12-18
標籤:C# 嘗試讀取或寫入受保護的記憶體,這通常指示其他記憶體已損壞。解決方案報錯 dll檔案應該是C++寫的。封裝了之後供我的C#程式調用,結果就提示了錯誤:嘗試讀取或寫入受保護的記憶體。這通常指示其他記憶體已損壞。錯誤類型為:System.AccessViolationException。解決辦法
Time of Update: 2015-12-09
標籤:需求:很多時候我們需要後台運行幾個Console來不停的計算資料,那麼部署到客戶服務器後,如果出現突發異常,程式掛掉了,那。。。? 解決方案:封裝了一個對後台運行程式不停監測的功能,如果發現程式有異常,但是進程還在,這個時候就Kill掉這個進程,重啟後台計算程式,這裡的計算程式均為"控制台運行程式"。 代碼如下: if (進程是否掛掉)
Time of Update: 2016-01-11
標籤:效果如,本人網上搜尋資料加上自己的研究終於實現了在combobox子項中加上刪除按鈕。一、表單中的代碼:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Runtime.InteropServices;
Time of Update: 2016-01-06
標籤:建立.XML檔案string xml = @"<?xml version=""1.0"" standalone=""no""?> <root> <person id=""1""> <name>Alan</name>
Time of Update: 2015-12-28
標籤:不賣關子,直接開門見山:C#中兩個問號的作用是判斷??左邊的對象是否為null,如果不為null則使用??左邊的對象,如果為null則使用??右邊的對象。比如:a = b ?? c,如果b為null,則a = c,如果b不為null,則a = b。下面一段代碼示範了這兩種情況: ?12345678910111213141516171819static void Main(string[] args){ NewFuck();
Time of Update: 2015-12-21
標籤://載入dll 建立類對象string sqlightAssembly = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "system.data.sqlite.dll"); Assembly lib = Assembly.LoadFrom(sqlightAssembly); foreach (Type t in lib.GetExportedTypes())
Time of Update: 2015-12-18
標籤:FolderForm.cs的代碼如下:using System;using System.Collections.Generic;using System.Diagnostics;using System.IO;using System.Text;using System.Windows.Forms;namespace HoverTree.Hewenqi{public partial class FolderForm : Form{public
Time of Update: 2015-12-20
標籤:註冊控制項首先要插入Flash就必須使用Flash控制項,在工具列右鍵選擇"選擇項…",然後在"COM組件"面板下點擊"瀏覽"按鈕,在本機電腦C:\WINDOWS\system32\Macromed\Flash\目錄裡選擇Flash10x.ocx(也有可能是Flash10v.ocx或flash10p.ocx),然後點擊確定就可以了。在CMD裡面輸入如下:regsvr32
Time of Update: 2015-12-13
標籤: 意圖 0 適用性 1 結構 2 實現 3 效果 4 參考 5 意圖動態給一個對象添加一些額外的職責。適用性動態為單個對象添加職責而不影響其他對象處理那些可以撤銷的職責(? 在某些功能不需要時刪除這些功能)當不能採用產生子類的方法進行擴充時結構實現設計一些飲料,這些飲料可以由顧客選擇添加各種佐料。先是飲料的抽象類別 abstract class Beverage { protected string Description =
Time of Update: 2015-12-12
標籤: private void button3_Click(object sender, EventArgs e) { System.Timers.Timer t = new System.Timers.Timer(500); //執行個體化Timer類,設定間隔時間為XX毫秒; t.Elapsed += new System.Timers.ElapsedEventHandler(theout); //到達時間的時候執行事件;
Time of Update: 2015-12-07
標籤:廠址:http://www.cnblogs.com/yunfeifei/p/4165351.html1.在C#中將圖片轉化成base64字串:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;namespace ConvertImgToBase64{ class Program { static void
Time of Update: 2015-12-04
標籤: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace StateMachine{ class Program { static void Main(string[] args) { //輸出十進位 - 二進位的值
Time of Update: 2015-12-07
標籤:1.C#中類是否支援多繼承?請說明原因。答:不支援,需要用介面來實現多繼承2.我們都知道一個類可以有多個建構函式,並且C#會在我們建立類的時候預設的提供一個無參的建構函式,當我實現了另外一個有參數的建構函式的時候,我還能調用無參數的建構函式嗎?請說明原因。答:不能,因為一旦你實現了一個建構函式,C#就不會再提供預設的建構函式了,所以需要自己手動寫入一個無參數的建構函式。3.請簡略描述重載和重寫的區別?答:方法重載提供了一個相同的方法但是方法簽名的參數不同的調用的實現。
Time of Update: 2016-01-03
標籤:#include <stdio.h>#include <conio.h>#include <stdlib.h> //system(); 這個指令須要用到此標頭檔#include <ctype.h> //toupper要用到#include <malloc.h> //在記憶體管理時用到的標頭檔void main(){int i;struct ListEntry{int number; //資料域struct ListEntry
Time of Update: 2016-01-03
標籤:好久沒上計蒜客和看書了……寫了個程式,驗證計蒜客說的內容#include <stdio.h>typedef struct student { int age; float height; } student;struct stuent { int age; float height; };struct student
Time of Update: 2016-01-01
標籤:C. New Year and Domino They say "years are like dominoes, tumbling one after the other". But would a year fit into a grid? I don‘t think so.Limak is a little polar bear who loves to play. He has recently got a rectangular grid
Time of Update: 2015-12-12
標籤:我的外部RTC是DS1339,驅動採用的是rtc-ds1307.c在核心裡選上了 <*> I2C support 以及 [*] Set system time from RTC on startup and resume &
Time of Update: 2015-12-10
標籤:一、概念 圖是由頂點的非空有限集合V(由N>0個頂點組成)與邊的集合E(頂點之間的關係)構成。邊沒有方向的圖成為無向圖,反之為有向圖 無向圖: 有向圖:二、圖的表示 常見的圖的儲存方法有兩種:鄰接矩陣儲存法與鄰接表格儲存體法 1、鄰接矩陣 鄰 接矩陣儲存法也稱為數組儲存方法,核心就是利用兩個數組來儲存一個圖,一個一維數組用來存放圖中的資料(頂點):vertex[0,1,2...,n- 1]另外一個二維數組用來儲存圖中頂點之間的相互關係(邊),稱為鄰接矩陣:A[
Time of Update: 2015-12-09
標籤:分類: 嵌入式 http://blog.chinaunix.net/uid-26435987-id-3082166.html(轉)/************************************************ NAME : MMU.C DESC : Revision: 2002.2.28 ver 0.0 ***************
Time of Update: 2015-12-06
標籤: 題目傳送門題意:問n位最小能整除47的數字分析:打表發現前面都是100000...,後兩位就是100000%47後到47的距離,就是快速冪求1000000%47的值,47-它就是後兩位#include <bits/stdc++.h>using namespace std;const int A = 47;int pow_mod(int x, int n, int p){int ret = 1;while (n){if (n & 1)ret = 1ll *