Time of Update: 2018-12-04
//例3-12 用imageROI增加某範圍的像素值#include "stdafx.h"#include <cv.h>#include <highgui.h>int main(int argc, char** argv){IplImage* src;if (argc==7&&((src=cvLoadImage(argv[1],1))!=0)){int x=atoi(argv[2]);int y=atoi(argv[3]);int
Time of Update: 2018-12-04
//3-16 CvFileStorage結構,資料通過CxCore資料存放區函數訪問typedef struct CvFileStorage{... //hidden fields}CvFileStorage; 3-17 寫入簡單的資料和結構#include "stdafx.h"#include <cv.h>#include <highgui.h>int main(int argc,char** argv){CvFileStorage*
Time of Update: 2018-12-04
1、問題分析:要實現的功能是”ImageView被載入進了一個絕對布局對象中,並通過不斷地設定LayoutParam來改變其位置“。其中ImageView中的圖片是以方法setBackgroundDrawable載入的。而用此方法,在過去有一段時間圖片可以顯示,但是現在顯示不出來了。我不清楚是什麼原因導致的,於是上網查了些資料,發現其他人也遇到了類似問題,他們並非都是用setBackgroundDrawable載入的。所以,我嘗試用其他方法載入圖片。2、解決方案:用setImageDrawabl
Time of Update: 2018-12-04
顯示透明圖片的方法匯總方法1:用Canvas的drawARGB方法。@Overridepublic void onCreate(Bundle savedInstanceState){super.onCreate(savedInstanceState);//建立一張圖片。Bitmap bm = Bitmap.createBitmap(20, 20, Config.ARGB_4444);//給圖片繪製顏色,其中第一個參數為透明度設定。Canvas cvs = new
Time of Update: 2018-12-04
其實只需要記住一點,Action是無傳回值的,Func是由傳回值的,他們可以直接使用委託,也可以使用拉姆達運算式:Func<string, bool> fn = TsetMothod; Response.Write(fn("123")); Response.Write("<br />"); //Func<string, string> ssFun = delegate(string s) {
Time of Update: 2018-12-04
假如一個xml檔案如下:<?xml version="1.0" encoding="utf-8"?><!-- 注意: 除了手動編輯此檔案以外,您還可以使用 Web 管理工具來 配置應用程式的設定。可以使用 Visual Studio 中的“網站”->“ASP.NET 配置” 選項。 設定和注釋的完整列表在 machine.config.comments 中,該檔案通常位於 \Windows\Microsoft.NET\Framework\
Time of Update: 2018-12-04
看了一個部落格系統的原始碼,裡面的這種設計覺得挺好,我不懂設計模式,反正用反射處理了,摘錄分享下。public class UserInfo : IComparable<UserInfo> { public int CompareTo(UserInfo other) { if (this.Displayorder != other.Displayorder) return
Time of Update: 2018-12-04
SNK,作為程式尾碼的時候,是.net中的強密匙加密檔案!當你把一個程式集放進GAC(全域組件快取)時,就要加強名(也就是簽名),在GAC中的程式集可以被所有程式引用訪問(相當於以前COM組件在註冊表裡註冊一樣),如果不放進GAC,剛所有使用這個程式集都要複製這個程式集(也就是私用組件),所以用不用強名要看情況而定.如果不是 要把.dll共用 可以不使用強名 強式名稱是為了你的Dll檔案的安全,一般我們的dll檔案,隨便在哪只要引用就可以用 但如果用了強式名稱的話,dll
Time of Update: 2018-12-04
這個方法時常會用到,而且很有效。TryGetValue:擷取與指定的鍵相關聯的值比如我們讀取一個xml檔案,讓後將其寫入到Dictionary中儲存: private static Dictionary<string, string> SqlKeyValues = null; /// <summary> /// 必要使用者欄位及別名 /// </summary> internal static void
Time of Update: 2018-12-04
using factory;namespace MyWebSiteTest{ public partial class linqtest : System.Web.UI.Page { static List<Customer> customers; static List<Product> products; static List<Order> orders; public static
Time of Update: 2018-12-04
button的背景設為selector,selector的圖片使用9patch,button的text文字變形或者消失。原因是9patch有自己的padding,所以button中要設定padding屬性。設定完就ok了。========================網友文章========================================因為需求的緣故,需要對liview顯示項目做黑白相間的處理:其實就是在函數public View getView(int position,
Time of Update: 2018-12-04
public :彙編偽指令,用於說明程式模組中的某個標號是可以被其他程式模組調用的。格式是public 標號extrn:彙編偽指令,用於說明程式模組中用到的標號是其他程式模組的。格式是extrn 標號:類型,類型有near,far,byte,word,dword等。這兩個偽指令是互相補充的,這些標號是需要在前面先集中申明的。注意,這裡還要明確一個定義,什麼是程式模組?程式模組是指一個完整的獨立的程式。這裡用一個例子來講一下,兩個程式模組——test:assume cs:codepublic
Time of Update: 2018-12-04
1.先來看個例子: /* * Dictionary是表示鍵和值的集合,Dictionary<(TKey, TValue>)>泛型類提供了從一組鍵到一組值的映射。 * 字典中的每個添加項都由一個值及其相關聯的鍵組成。通過鍵來檢索值的速度是非常快的,接近於 O(1), * 這是因為 Dictionary<(TKey, TValue>)
Time of Update: 2018-12-04
文章目錄 1、不含字母2、含有字母3、提交版 很久之前寫的,今天放在這裡。1、不含字母#include <iostream>#include <stdio.h>//8個二進位(2個十六進位)數轉換成十進位數,不含a-f。即00-99的轉換int transfer_0(int x){int y;//結果int temp;//臨時值y=x%10;//個位元temp=(x%100-y)/10;//十位元y+=temp*16
Time of Update: 2018-12-04
Dictionary<int, Dictionary<string, string>> dict1 = new Dictionary<int, Dictionary<string, string>>();Dictionary<int, Dictionary<string, string>> dict2 = new Dictionary<int, Dictionary<string, string>>(
Time of Update: 2018-12-04
/* 例 2.1 從磁碟載入並顯示映像1、開啟Visual Studio 2005,檔案->建立->項目->其他語言 ->Visual C++->控制台應用程式->命名2-1->全部預設2、添加庫檔案。項目->屬性->配置屬性 ->連結器->輸入->活動(win32)下的附加依賴項,添加 cv200d.lib cvaux200d.lib cxcore200d.lib cxts200d.lib
Time of Update: 2018-12-04
class ClientStruct { public string ID = "ID"; public string Name = "Name"; public string Company = "Company"; public string CreatedDate = "CreatedDate"; }public string[,] infoArr = new string[
Time of Update: 2018-12-04
之前偶爾會在開啟eclipse後遇到錯誤:Conversion to Dalvik format failed with error 1,對這個問題的處理也是潦草解決:在從網上尋找了一個方法無效後,立即建立一個項目,然後將出問題的項目中的資料右鍵copy到一個新項目中,“Config Build Path...—>Add External JARS...”問題解決,但我認為有些繁瑣。
Time of Update: 2018-12-04
//例4-1 用滑鼠在視窗中畫矩形#include "stdafx.h"#include <cv.h>#include <highgui.h>#include <stdlib.h>void my_mouse_callback(int event,int x,int y,int flag,void* param);CvRect box;bool drawing_box=false;void draw_box(IplImage* img,CvRect rect){
Time of Update: 2018-12-04
1.在excel中添加圖片,可以用插入-檔案中的圖片的方式進行,但是這樣插入的圖片太大,如法放入一個儲存格中。2.把圖片插入批註裡,是個很好的方法。3.國產的免費辦公軟體wps的excel不支援在批註中插入圖片的操作。4.在批註中插圖片的操作是這樣的: 右擊目標儲存格,選擇“添加批註”,刪除批註輸入框中所有文字,接著滑鼠移動到批註輸入框的邊線,當指標變成十字箭頭時,單擊滑鼠右鍵選擇“設定批註格式”→“顏色與線條”