Time of Update: 2015-08-14
標籤:電腦 電腦科學 C語言的有符號與無符號,二進位整數的擴充與截斷 前一節說了整數的表示方式,,也就是無符號編碼與補碼編碼.這一屆說一下二進位整數的擴充與截斷,這部分內容與C語言掛鈎.so,我們先看以下C語言的有符號和無符號數. C語言中的有符號數和無符號數有符號數和無符號數的本質區別其實就是採用的編碼不同,前者採用補碼編碼,後者採用無符號編碼. 在C語言中,有符號數和無符
Time of Update: 2015-08-14
標籤:之前熟悉C的時候寫著玩的,就當做筆記用吧:#include<stdio.h>#include<stdlib.h>#include<string.h>#include<math.h>#define MAX 8void print_r(int *arr,int len);static void usage(void){ printf("-s selection sort\n" "-b
Time of Update: 2015-08-13
標籤:http://www.cnblogs.com/warensoft/archive/2011/12/09/warenosoft3d.html 上面這篇文章很好解釋了。簡單記錄一下:1. 聲明 注意 DLL 一定要放到bin 目錄底下,否則會提示找不到。 如果使用了指標要使用 unsafe 關鍵字,聲明一個DLL 開放的函數 函數名、參數要保持一直。 [DllImport("dll_test.dll", CallingConvention =
Time of Update: 2015-08-11
標籤: 1 // 2 // main.cpp 3 // Test.cpp 4 // 5 // Created by mac on 15/8/11. 6 // Copyright (c) 2015年 bjsxt. All rights reserved. 7 // 8 #include<iostream> 9 #include<cstring>10 using namespace std;11 class Person //基類Person12 {13
Time of Update: 2015-08-10
標籤:c語言 xcode mac 最近一直使用Xcode學習OC,Swift,並開發iOS應用。閑來無趣,想在Mac上寫幾個C程式。以前在Windows中,我們常常使用VC++,Visual
Time of Update: 2015-08-09
標籤:c語言 記憶體 處理器 c語言執行流程 在ANSI C的任何一種實現中,存在兩種不同的環境:一、翻譯環境,在這個環境裡,原始碼被轉換為可執行檔機器指令;二、執行環境,它用於實際執行代碼。翻譯階段由幾個部分組成:一、組成程式的每個(有可能有多個)源檔案通過編譯過程分別轉換為目標代碼(object
Time of Update: 2015-08-08
標籤:實現一個鏈表的一系列介面,體會了指標的用法 list.h#ifndef LIST_INCLUDE#define LIST_INCLUDE#define T List_Ttypedef struct T *T;struct T{ T rest; void *first;};extern T List_append(T list, T tail);extern T List_copy(T list);extern T List_list(void *x,
Time of Update: 2015-08-09
標籤:c++
Time of Update: 2015-08-08
標籤:c++ stl 智能指標 一點都不智能的智能指標#include <iostream>using namespace std;template<typename T>class Auto{public:// 避免編譯器報錯,需要顯式類型轉換explicit Auto(T* data = NULL) : m_data(data) {}// 轉移拷貝Auto(Auto&
Time of Update: 2015-08-08
標籤:(一個)繼承製度的聲明:class Date {...};class Customer {public:...private:string name;Date lastTransaction;};class PriorityCustomer : public Customer {public:PriorityCustomer(const PriorityCustomer& rhs);PriorityCustomer& operator=(const
Time of Update: 2015-08-13
標籤: 1、向表單上添加如下控制項:MenuStrip menuStrip1, NotifyIcon ni_frmMain,Timer timer1, ContentMenuStrip cms_notify。其中notify中包含顯示、退出等。2、實現的代碼: #region 托盤相關代碼 #region 私人方法 處理表單的 顯示 隱藏 關閉(退出) /// <summary> /// 顯示 /// &
Time of Update: 2015-08-13
標籤:C#中的資料類型.分實值型別和參考型別兩大類. 實值型別:直接儲存資料的值,儲存在記憶體中的stack(堆棧)中 參考型別:儲存對值的引用,實際上儲存的就是一個記憶體的地址.參考型別的儲存分成兩塊,實際值儲存在託管堆(heap)中.實際值的記憶體位址儲存在stack中 當使用參考型別時先找到stack中的地址,再找到heap中的實際值. 也就是說儲存參考型別時要用到stack和heap,但使用參考型別時我們實際上只用到stack中的值,然後通過這個值間接的訪問heap中的值 C#
Time of Update: 2015-08-14
標籤:System.Text.StringBuilder sb = new System.Text.StringBuilder(text.Length); string filterText = "需要過濾的髒字 以|分開";//髒字
Time of Update: 2015-08-12
標籤: 實現托盤(工作列表徵圖與托盤表徵圖互斥),並且在點擊工作列表徵圖時實現的最小化與點擊最小化按鈕分離。具體如下:1、向表單上添加如下控制項:MenuStrip menuStrip1, NotifyIcon ni_frmMain,Timer timer1, ContentMenuStrip cms_notify。其中notify中包含顯示、退出等。2、實現的代碼://欄位: //當前子Form private CurrentForm childForm = null;
Time of Update: 2015-08-14
標籤: C#非同步方法呼叫執行轉於http://blog.csdn.net/wanlong360599336/article/details/8781477 using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Runtime.Remoting.Messaging; namespace
Time of Update: 2015-08-11
標籤:C#擷取當前系統時間2010-01-02 16:24--DateTime 數字型 System.DateTime currentTime=new System.DateTime(); 取當前年月日時分秒 currentTime=System.DateTime.Now; 取當前年 int 年=currentTime.Year; 取當前月 &
Time of Update: 2015-08-10
標籤:網上大部分的資料說的都是在apache和ng伺服器的情況下解決方案,但基本的思路都是添加回應標頭情境:頁面引用css檔案:<link href="http://www.tuohuangzu.com/content/Company_v2/register/css/font.css" type="text/css" rel="stylesheet"/>樣式中定義:@font-face { font-family:
Time of Update: 2015-08-14
標籤:五、類目Categorya、 類目的定義和類的定義相似。在.h檔案裡聲明,.m檔案裡實現方法。b、 定義類目的檔案命名規則:類名+類目名稱,如 “NSString + Revert”。@interface NSString (Extension)-(BOOL)validateEmail;@end@implemention NSString (Extension)- (BOOL)validateEmail{
Time of Update: 2015-08-14
標籤:四、NSDictionary和NSMutableDictionary1、不可變字典NSDictionary//字典的建立NSArray *array1 = [NSArray arrayWithObjects:@”zhangsan”,@”zhangfei”,nil];NSArray *array2 = [NSArray arrayWithObjects:@”lisi”,@”liping”,nil]
Time of Update: 2015-08-08
標籤: