CnvUtfConverter::ConverToUnicodeFormUtf8(src8, dest16);

CnvUtfConverter::ConverFromUnicodeToUtf8(dest8, src16);

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

静态库文件也称为“文档文件”,它是一些.o文件的集合。在Linux(Unix)中使用工具“ar”对它进行维护管理。它所包含的成员(member)是若干.o文件。

1      库成员作为目标

一个静态库通常由多个.o文件组成。这些成员(.o文件)可独立的被作为一个规则的目标,库成员作为目标时需要按照如下的格式来书写:

ARCHIVE(MEMBER)

注意,这种书写方式只能出现在规则的目标和依赖,不能出现在规则的命令行中!因为,绝大多数命令不能支持这种语法,命令不能直接对库的成员进行操作。这种表达式在规则的目标或者依赖中,它表示库“ARCHIVE”的成员“MEMBER”。含有这种表达式的规则的命令行只能是“ar”命令或者其它可以对库成员进行操作的命令。例如:下边这个规则用于创建库“foolib”,并将“hack.o”成员加入到库:

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


copy from: http://blog.sina.com.cn/s/blog_5df7dcaf0100be6w.html~type=v5_one&label=rela_nextarticle

从前,一个叫Brad Cox的人觉得是时候让编程更模块化一些.当时C语言是非常流行和强大的语言,Smalltalk 是一个优雅的面向对象语言.所以,基于C,Brad Cox增加了类Smalltalk的类和消息发送机制, Objective-C语言就诞生了.

Objective-C不是私有语言.相反,它做为一个开放标准被GNU C(gcc)所包含很多年了. Cocoa是用Objective-C开发的,大部分Cocoa开发也是使用Objective-C语言.

讲解c和面向对象基础需要用一整本书.相对于写一本书,这一章会简单介绍Objective-C语言.如果你有一定的C和面向对象基础,学习起来不会很难.我也建议你学习apple的Objective-C Language这本书.

创建,使用对象

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

control-F: 向右一个字符(forward)

control-B: 向左一个字符(backward)

control-P: 前一行(previous)

control-N: 后一行(next)

control-A: 去行首

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


copy from : http://blog.sina.com.cn/s/blog_5df7dcaf0100be6f.html~type=v5_one&label=rela_nextarticle 

很多的书一般会从一堆基本理论开始,但是我打算先指引你完成你的第一个Cocoa应用程序.当你完成它以后,一定是即激动又困惑. 这是就是学习理论的时候了.

 我们的第一个工程是一个有两个button的随机数获取程序.有一个文本框来显示所得到的随机数.这个简单的例子设计了怎样获得用户输入以及怎样输出.可能在这章中的一些讲解是简单了点,你会有很多的为什么.不过不要担心,我会在后面有很详细的说明.所以,先让我们开始吧.

XCode

Builder

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

1.png

第一章:什么是cocoa

1- 一点历史

 让我们从一个有意思的故事开始我们的cocoa旅程吧.很久前(我还没出生呢)有两个叫Steve的天才创建了一个公司,名为苹果电脑,这家公司成长的非常快,所以他们聘请了一个叫John Sculley的人来担任他们公司的CEO. 没想到的是,在一些矛盾冲突后,John Sculley居然把其中一个Steve的赶出了苹果公司,这个Steve就是现在大名顶顶的Steve Jobs. Jobs在离开苹果后组建了一个新的公司 Next Computer

 NeXT公司雇佣了一些有才华的工程师组建了一个小团队. 这个团队开发了自己的电脑,操作系统,打印机和一堆的开发工具.这些在当时那个年度都是超前的.不幸的是他们的硬件没有好的市场.在1993年,,工厂也关门了,NeXT Computer 也变成了 Next Software.

 操作系统和那些开发工具以NeXTSTEP为名继续在卖.可能一般的计算机用户都没有听过NeXTSTEP.但NeXTSTEP在某些领域很流行,并且有一些人一直在使用它来开发自己的应用程序.他们觉得NeXTSTEP能更快的让他们的想法能变成计算机实现.

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

It is often necessary to mix Open C with Active Objects. In particular, user interfaces are normally done with Active Objects. But if you want to call a blocking Open C function, such as the network communications functions, then you are faced with a problem. The blocking call will freeze your user interface until the call returns. If there is a non-blocking version of the call you could use a CTimer to repeatadly poll the function. But it is not battery efficient to have the periodic CPU activity involved in polling.

So you must turn to threads.


Okay.... here's pseudo code for a wrapper class around blocking calls named do_blocking_read_call and do_blocking_write_call. CMyCaller could be declared as a subclass of CBase.


The general idea is that the blocking calls are made from a new thread. The thread initializes then goes into a RSemapore::Wait. The main thread sets a command variable iCallerState and then calls RSemaphore::Signal to trigger the thread to execute the command. The two versions of RThread::Rendezvous are used together to coordinate with an Active Object.


After each Signal() the thread returns to the Wait state until the next Signal is given. A single thread with a repeating loop is used instead of creating and deleting a new thread each time.

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

1.Shared Memory

A crude and straightforward way to exchange information between threads is to use shared memory.


Thread entry point function takes one parameter, TAny *aPtr. This pointer can be used for any purpose. Often it is used to pass a pointer to a data structure or class instance that contains the information shared between threads. Because threads within a same process share the same memory address space, the data pointed to by that pointer can be used normally after casting it to the proper type, except that access to this data must be synchronized.


In Symbian OS 7.0s and earlier versions, the pointer given to the thread function can be changed afterwards by calling SetInitialParameter(TAny* aPtr) on the suspended thread. Platform security changes removed this function, so in the OS versions 7.0s onwards, the thread has to be created with function TInt RThread::Create(const TDesC &aName, TThreadFunction aFunction, TInt aStackSize, RAllocator *aHeap, TAny *aPtr, TOwnerType aType=EOwnerProcess). If aHeap is NULL, then the new thread uses the heap of the creating thread. If heap is not shared by giving it as a parameter, USER 42 panic may appear when trying to use the memory of another thread's heap.


Sharing the heap does not mean that the R-class sessions are shared between threads. This can be achieved, for example in the case of RFs, by calling the function RSessionBase::ShareAuto().

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

1. Login with root account

2. Edit /etc/samba/smb.conf file

2.1 "workgroup = xxx"( xxx is your workgroup of windows, ex. WORKGROUP )

2.2 "netbios name = yyy" ( yyy is your computer name of windows, ex. howard-laptop )

2.3 "smb passwd file = /etc/samba/smbpasswd"

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

Overview

This code snippet demonstrates how to use CEikLabel control, how to set font, how to set font color and how to wrap text in label.


MMP File.


Following library need to be added in mmp file.


LIBRARY        eikcoctl.lib gdi.lib

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

编辑相关

 * Ctrl+ ↓ Ctrl+↑ 在编辑区上下滚动(滚动滑块)
* Ctrl+ ← Ctrl + → 向前向后移动一个单词
* Ctrl+ Shift + ↓ Ctrl+ Shift + ↑ 向上向下移動一個段落(可以方便的在function中滚動,查到自己所屬的function)
* Ctrl+G 搜索工作区中的声明

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

RSocketServ gSocketServer;

RConnection gConnection;

RSocket fd;

TRequestStatus status = KRequestPending;

TInetAddr recvAddr;

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

1 2
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。