Time of Update: 2018-12-04
1.計算兩點之間的距離公式:a2+b2=c2(勾股定理) 2D:3D:電腦實現:2D距離Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->float Distance2D(Point2D p1,Point2D p2){ float dx=p1.x-p2.x; float dy=p1.y-p2.y; float
Time of Update: 2018-12-04
1.圓的碰撞檢測圓的碰撞條件:當兩個圓相切或者相交時,我們認為兩個圓應該開始發生碰撞。數學表示:電腦中的實現:兩圓之間的碰撞Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->bool CollisionBetweenCircles(circle c1,circle c2){ bool hit; float distanceOfCenter=
Time of Update: 2018-12-04
我們通常使用的笛卡爾座標系統,角點通常在(0,0),即原點。初始邊在x軸正半軸,終邊與初始邊成夾角。初始邊逆時針旋轉為正值,順時針旋轉為逆值。 數學表示:角度:degree=radian*180/π 弧度:radian=degree*π/180π≈3.141592654例如:120◦轉換為弧度為2π/3電腦中的實現:#define RadToDeg 57.29577951f#define DegToRad
Time of Update: 2018-12-04
#import <AVFoundation/AVFoundation.h>void CBLediOS::turnOnLed(){ AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo]; if ([device hasTorch]) { [device lockForConfiguration:nil]; [device
Time of Update: 2018-12-04
Introduction Sometimes we need to rotate image in user control.I override OnPaint method, and use Graphics.RotateTransform to rotate image.Source Code protected override void OnPaint(PaintEventArgs e){ e.Graphics.SmoothingMode =
Time of Update: 2018-12-04
http://itunes.apple.com/cn/app/toilet-war/id415891931?mt=8在廁所大戰中,我是利用常量的方式來弄int MaxNpcNumber[][] { { 1, 1, 1, 1, 1, 1}, { 2, 2, 2, 2, 2, 2}, { 3, 3, 2, 2, 3, 3}, { 4, 4, 3, 3, 4, 4},
Time of Update: 2018-12-04
http://www.cocoachina.com/gamedev/program/2010/0726/1925.html http://www.cocoachina.com/iphonedev/sdk/2010/0726/1924.html 想不到我的文章居然被收錄到Cocoa
Time of Update: 2018-12-04
1 隨機數的使用 標頭檔的引用 #import <time.h> #import <mach/mach_time.h> srandom()的使用 srandom((unsigned)(mach_absolute_time() & 0xFFFFFFFF)); 直接使用 random() 來調用隨機數2 在UIImageView 中旋轉映像 float
Time of Update: 2018-12-04
這是我大學三年級時,學習Win32 SDK後,自己開發的一個打字練習程式很簡單的練習,隨機出現英文字母,並往下掉 /*一個很基本的打字練習程式,以前學校程式設計比賽的題目。會出現英文字母往下掉,按相同的消掉。用SDK打,想練習一下計時器的用法。有設計得分和落下速度增快的功能。若要compile此程式碼,請用VC++新增專案。選擇Win32Application,在插入程式碼。*/#include <windows.h>#include
Time of Update: 2018-12-04
在論壇看到有人問一個問題,問題是如何製作顯示縮圖,然後按下button後,再另一個Win Form顯示出原圖因此做了個小範例,示範怎麼利用pitturebox達成這功能 Form1
Time of Update: 2018-12-04
這是大二時期的作業是用VB6.0開發的一個聊天室的範例 VERSION 5.00Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"Begin VB.Form frmChat BorderStyle = 1 '單線固定 Caption = "雙人聊天室" ClientHeight = 4485 ClientLeft = 45
Time of Update: 2018-12-04
簡介想必用過Mac OSX的人,必定對於下面那個工具列很有印象這個範例是我自己製作的一個.NET window form User Control,依照Max OSX的工具列樣式做的範例下載代碼using System;using System.Collections.Generic;using System.ComponentModel;using System.Drawing;using System.Data;using System.Linq;using
Time of Update: 2018-12-04
在IPhone SDK開發範例大全中,有很多的範例碼下面這段範例碼,示範了兩張圖片的交換,以及放大縮小的動畫動畫效果請參照 #import <UIKit/UIKit.h>#define IMAGE_VIEW_1 100#define IMAGE_VIEW_2 101#define BIGRECT CGRectMake(0.0f, 0.0f, 320.0f, 435.0f)#define SMALLRECT CGRectMake(130.0f, 187.0f, 60
Time of Update: 2018-12-04
今天在論壇看到一個問題,是問如何列印winform的某塊地區想一想我從來沒玩過列印相關的功能,就嘗試了一下我的思路是要列印某個區塊,那就將那個區塊當成圖片列印下來就好了搜尋了一下列印的範例,以及用GDI擷取視窗解決了這個問題下面是列印的,我列印出視窗rect(30,30,100,100)這個範圍 原始WinForm: 印表機列印結果: using System;using System.Collections.Generic;using System.ComponentModel;using
Time of Update: 2018-12-04
今天投資了一台Samsung galaxy
Time of Update: 2018-12-04
SQL Lite參考資料 http://blog.chinaunix.net/u1/49022/showart_387902.html OOP in C http://accu.informika.ru/acornsig/public/articles/oop_c.html http://stackoverflow.com/questions/351733/can-you-write-object-oriented-code-in-c http://ldeniau.web.cern.ch/
Time of Update: 2018-12-04
所見,這隻是用photoshop簡單拉一拉然後隨意弄出來的測試圖做了工具之後,要把圖直接轉換成ios使用就很方便,雖然不多,但畢竟也切了11張小圖出來如果要轉換成iOS一般顯示跟Retina Display支援可是要一張一張弄,很麻煩的轉換工具情境建立好之後,就簡單的把圖片載入,並對於相對應的事件處理,就完成了關卡選擇這頁是要測試IAP(在應用程式內購買)所做的一頁,大概就是像這樣簡單的弄個測試用的範例先驗證代碼的基本架構跟功能,剩下之後再來慢慢加
Time of Update: 2018-12-04
決定把CloudBox開源了!分享給大家,CloudBox是iOS/Android的跨平台架構。這個範例顯示了憤怒鳥中,那種可滑動收納按鈕的元件請用xcode或eclipse編譯程式代碼/* * CBSlideBar.h * CloudBox Cross-Platform Framework Project * * Created by Cloud on 2012/4/8. * Copyright 2012 Orz. All rights reserved. * */#include "
Time of Update: 2018-12-04
這段代碼示範如何讀取iphone的Address book就透過AddressBook相關的SDK取出就行了 ABAddressBookRef addressBook = ABAddressBookCreate();CFArrayRef allPeople = ABAddressBookCopyArrayOfAllPeople(addressBook);CFIndex nPeople =
Time of Update: 2018-12-04
Introduction I will demo some sample to present how to send SMS in iphone programming. Sample 1 The easiest way is this demo. [[UIApplication sharedApplication] openURL: @"sms:12345678"]; HTML links:<a href="sms:" mce_href="sms:">Launch Text