为什么不用360Into呢?

后使用快捷导航没有帐号?
1289查看7回复
在线时间20 小时积分6404UID1521帖子精华7主题阅读权限100注册时间最后登录
升级&&0%当前用户组为 天外来客当前积分为 6404, 升到下一级还需要
点。UID1521帖子精华7主题阅读权限100银毫11104 EXP5760 注册时间最后登录
How did I come into this world?(下次有小孩問你時,不用再害羞了,這個解答非常好)
&Monday morning....need double expresso, and a joke to start with...
&週一早上....正在沖泡著濃郁的咖啡,一個有趣的對話發生了
&&Daddy? How did I come into this world?&
&「爹地,我是怎麼來到這世界的?」
&&Well, my child, some day I'll have to tell you& anyway.&
&「哦,兒子啊,總有一天我會讓你知道的。」
&&So why not today? Please!&
&「拜託!為什麼今天不行?」
&&OK, but listen carefully.&
&「好吧,你仔細聽著!」
&&Mom and Dad met each other in a cyber cafe.
&「你媽和我在網咖相遇而認識
&In the restrooms of that cyber cafe,dad connected to mom.
&並在網咖的洗手間你媽和我使用了超連結,
&Mom at that time made some downloads from dad's memory stick.
&那時你媽從我的隨身插硬碟下載一些資料,
&When dad finished uploading we discovered we used no firewall.
&當我完成上傳時,我們發現我們沒有使用防火牆
&Since it was too late to cancel or delete,
&因此,想要取消或刪除都已為時太晚,
&nine months later we ended up with a virus.&
&就這樣,九個月以後我們被一個病毒所終結
英文還是比較有感覺~~~~~~~~~
小波子 该用户已被删除
提示: 作者被禁止或删除 内容自动屏蔽
在线时间288 小时积分83374UID112帖子精华63主题阅读权限100注册时间最后登录
毕业已1+1+1+1+1+1年
UID112帖子精华63主题阅读权限100银毫 EXP40434 注册时间最后登录
洗手间...男的还是女的/
万言万当,不如一默
有时候不需要非要靠辩论去驳倒他,因为脑残是永远驳不倒的。
面对脑残,最好的方式是无视他,然后默默的唾弃他。
网络世界最大的怂包就是那些披着马甲口无遮拦污蔑侮辱挑衅的人,对自己的行为都没胆量负责的人,有什么资格说去为国为民。
不和没家教的人说话。
在线时间82 小时积分3109UID971帖子精华5主题阅读权限100注册时间最后登录
UID971帖子精华5主题阅读权限100银毫5275 EXP3093 注册时间最后登录
建议下载时一定注意安装firewall
在线时间20 小时积分6404UID1521帖子精华7主题阅读权限100注册时间最后登录
升级&&0%当前用户组为 天外来客当前积分为 6404, 升到下一级还需要
点。UID1521帖子精华7主题阅读权限100银毫11104 EXP5760 注册时间最后登录
我的本本一直沒有firewall的說~~
在线时间9 小时积分4011UID9553帖子精华0主题阅读权限70注册时间最后登录
贵客, 积分 4011, 距离下一级还需 989 积分
升级&&50.55%当前用户组为 贵客当前积分为 4011, 升到下一级还需要 989 点。UID9553帖子精华0主题阅读权限70银毫96075 EXP3332 注册时间最后登录
原帖由 shuaigercm 于
13:48 发表
洗手间...男的还是女的/
这个问地好啊:lol
在线时间18 小时积分52607UID2591帖子精华35主题阅读权限100注册时间最后登录
琴无弦潜水ing
升级&&0%当前用户组为 天外来客当前积分为 52607, 升到下一级还需要
点。UID2591帖子精华35主题阅读权限100银毫2034 EXP7687 注册时间最后登录
原帖由 喝汽水的猪 于
13:56 发表
我的本本一直沒有firewall的說~~
那快有这个问题了:):lol:lol:lol:lol
在线时间11 小时积分28227UID5117帖子精华2主题阅读权限100注册时间最后登录
升级&&0%当前用户组为 天外来客当前积分为 28227, 升到下一级还需要
点。UID5117帖子精华2主题阅读权限100银毫343398 EXP1596 注册时间最后登录
这个回答可以借鉴
委员会勋章
委员会勋章
杰出贡献勋章
杰出贡献勋章
参与论坛活跃任务
状元勋章勋章
永久水王勋章
永久水王勋章
一周年纪念章
一周年纪念章
二周年纪念章
二周年纪念章
三周年纪念章
三周年纪念章
四周年纪念章
四周年纪念章
五周年纪念章
五周年纪念章
六周年纪念章
六周年纪念章
栈庆特别参与勋章
栈庆特别参与勋章
晚会特别参与勋章
晚会特别参与勋章
&&&&& Copyright &
Powered by
&&&&请勿发布违反中华人民共和国法律法规的言论,会员观点不代表梅陇客栈官方立场。
&&&&&&&&&&&&&&&&&&&&GMT+8,加花瓣为微信好友趁着我暂时不用engaged into “research”_regulus吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:20贴子:
要做的事有两件打基础。解构和重构。
<div class="clearfix BAIDU_CLB_AD BAIDU_CLB_AD_pb" id="BAIDU_CLB_AD_">
咦?是说专业方面么……
登录百度帐号我的游戏推荐游戏
后查看最近玩过的游戏
使用签名档&&
为兴趣而生,贴吧更懂你。或C++为什么不用delete代替delete[]?
总结:一直想不通c++为什么多此一举,呵呵,前几天给Bjarne Stroustrup大师写了一份信,第二天就收到回复了,自己再仔细琢磨了一下,终于好像弄明白了:-)
我的理解是这样的,无论new还是new[ ],C++的确知道返回的这个指针它指向多大的内存块,否则它就不可能正确地释放掉这块内存了。但是delete需要知道的不仅仅是指针指向多大的内存,而更重要的是要知道指针指向的数组中有多少个对象,知道了对象数量才能依次一一调用它们的析构函数。那么,下面的代码会产生什么样的结果??
int * pArray = new int[100];
delete&& pA&&&&&&&&&& //本来应该是&& delete [ ] pA
根据上面的解释,我们不难想象,上述代码错误的原因并不是因为它只释放掉第一个元素的空间而没有能完全释放整个pArray所指的内存。 也就是说,在内存释放上不存在问题。问题出在在这里只对第一个元素调用了析构函数,而其他99个元素并没有被妥善地析构掉。呵呵,这才是真正的问题所在!! 当然对于整数类型来说并不会导致什么问题,但假如在每个对象中都分配了额外的资源,那么不调用对象的析构函数可就会导致严重的后果了&&
那使用delete[ ]有什么用?这要从new[ ]说起,在new一个数组时,编译器会悄悄地在内存中保存一个整数用来表示数组中元素的个数。这样在使用delete[ ]时,编译器就会生成读取这个整数的代码,然后逐个调用析构函数。如果使用delete,则编译器只当作指针所指的是单个对象。再说了,new单个对象时,编译器也不会悄悄记录数组中元素的个数。呵呵,从这也可以感觉出C++的设计风格和宗旨,决不多费一点手脚,单个对象我就不记录长度,只有是数组时我才记录!:-)
下面是我给Bjarne Stroustrup的邮件及他的回信。在此对Bjarne Stroustrup大师平易近人的风范再次表示钦佩!!
& Hi, Dr. Stroustrup
& Firstly,Thank you for your great invention, the c++ programming language is
& really a great job, it gives me a lot of help in my study, it makes my work much
& more convenient!
& Well, today ,I run into a confused problem about delete and delete[], so I
& wonder if you could give me some explanation or tips. I simply can't understand
& why c++ don't treat them in the same way. In other words, I think there is no
& need for delete[].
& For example, &delete [] ps&, many textbooks just say that the operator
& delete[] is used to tell the compiler that the pointer &ps& refers to an array,
& but not a single object. Of course, I know that, but the thing is that I think
& the c++ compiler is totally clever enough to figure out whether &ps& points to a
& single object or an array. There is no need to bother the programmer to point it
& out explicitly.
No. The compiler cannot know.
void f(int* p)
&&&& // or maybe delete [] p?
&&&& int* q = new int[70];
&&&& f(q);
&&&& f(q);
separately compile those two functions an the compiler had no way of
knowing how many ints p points to.
& It's no doubt that the compiler knows the size of storage to which is pointed
& by &ps&. Otherwise, it's impossible for c++ to deallocate the memory properly.
& OK, now that the compiler exactly knows how many bytes is allocated there and
& which type the object is, it can compute how many object are there, I mean,
& & number of object = number of bytes allocated / sizeof(object type) &
& Ok, after that, c++ may call destructor iteratively to destroy each object in
& the array and then deallocates the memory.
It is a bit trickier than that. Many allocators allocates space for at
least N ints when you ask for new int[N]. It is not uncommon for an
allocator to allocate more to minimize fragmentation.
& I don't know if I have made my question clear:-) In conclusion, I think a
& single object is just a special case of an array, so c++ is supposed to deal
& with them in the same way. There is no need for us to differentiate delete and
& delete[].
The snag is that many allocators (at least traditionally) just keep
track of the number of bytes allocated (rounding the allocation up to
something convenient). With destructors, the compiler has to know how
many objects are there (not just how much space is allocated). Some
implementers use (or used) two different layouts for individual objects
and arrays - the array layout (only) included an object count.
& In fact, I know certainly this is my misunderstanding. if not that, the c++
& committe should have changed the c++ syntax:-) I just hope to get some
& convincing explanation.
& Thank you, really appreciate for your help!
& Supermonkey,China,Nankai University
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:128484次
积分:2693
积分:2693
排名:第4796名
原创:138篇
转载:72篇
评论:38条
(1)(1)(2)(1)(1)(1)(1)(1)(1)(1)(7)(2)(3)(6)(25)(12)(10)(2)(7)(5)(8)(10)(11)(2)(3)(3)(8)(22)(25)(3)(26)ABAP Dialog 为什么用自定义OK_code 而不用系统变量sy-ucomm - skewen - ITeye技术网站
博客分类:
Reading Function Codes
In each PAI event that a user triggers by choosing either a pushbutton on the screen or an element in a GUI status, the corresponding function code is placed into the system field syst-ucomm or sy-ucomm and placed in the OK_CODE field (as long as the function code is not empty). Empty function codes are placed in neither the sy-ucomm field nor the OK_CODE field.
In your ABAP programs, you should work with the OK_CODE field instead of sy-ucomm. There are two reasons for this: Firstly, the ABAP program has full control over fields declared within it, and secondly, you should never change the value of an ABAP system field. However, you should also always initialize the OK_CODE field in an ABAP program for the following reason:
In the same way that the OK_CODE field in the ABAP program and the system field sy-ucomm receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field syst-ucomm in the PBO event. Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen
is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). An empty function code does not influence the fields and the old content is transferred.
In your application programs, the first step in PAI processing should be to save the function code in an auxiliary variable and then initialize the OK_CODE field. You can then read the function code from the auxiliary variable (for example, using a CASE structure), and control the program flow from there.
The OK_CODE field can have a different name on each screen. However, common practice is to use the same name for the field on each screen of an ABAP program. You then only need one field in the ABAP program, with the same name, into which the function code is placed, and from which you can read it.
Global data declarations:
DATA: ok_code LIKE sy-ucomm,
save_ok LIKE sy-ucomm.
Your ABAP program must contain a field with the same name as the OK_CODE field on the screen. To specify the type, you should refer to the system field sy-ucomm, since this always corresponds to the type of the OK_CODE field on the screen. At the same time, you should declare an appropriate auxiliary variable.
PAI module:
MODULE user_command_100 INPUT.
save_ok = ok_code.
CLEAR ok_code.
CASE save_ok.
ENDMODULE.
In the first PAI module, you should assign the contents of the OK_FIELD to the auxiliary variable and then clear the OK_CODE field and carry on working with the auxiliary variable.
浏览: 21896 次
来自: 成都
还是不行,只是工程名报错 里边没报错!!!
感觉不错,学习下
学习学习了
有一个疑问,绘制分针和时针时,画了多次,这是为了增加线的粗度么 ...
非常不错,代码看起来善心悦目
正在学习中
同时也发现了一个不足 ...

我要回帖

更多关于 为什么不用360 的文章

 

随机推荐