由买买提看人间百态

topics

全部话题 - 话题: objects
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
f*******n
发帖数: 12623
1
No, all generics are erased after compiling. There is no T. Anything you can
get you must get from stuff that you have at runtime.
Think about it, after type erasure your class looks like this:
public class GenericReflection
{
private Object object;
//---- get/set ---
public void setObject( Object v ){ object=v; }
public Object getObject(){ return object; }
//---- is it possible to get the class for the object? ----
public Class getObjectClass()
{
Class retval = null;

if... 阅读全帖
f*******n
发帖数: 12623
2
No, all generics are erased after compiling. There is no T. Anything you can
get you must get from stuff that you have at runtime.
Think about it, after type erasure your class looks like this:
public class GenericReflection
{
private Object object;
//---- get/set ---
public void setObject( Object v ){ object=v; }
public Object getObject(){ return object; }
//---- is it possible to get the class for the object? ----
public Class getObjectClass()
{
Class retval = null;

if... 阅读全帖
r*****3
发帖数: 143
3
中文名: Objective-C 编程 (第3版)
原名: Programming in Objective-C, 3rd Edition
作者: Stephen G. Kochan
图书分类: 软件
资源格式: PDF
版本: 英文文字版/更新EPUB版本
出版社: Addison-Wesley Professional
书号: 978-0321711397
发行时间: 2011年
地区: 美国
语言: 英文
简介:
内容介绍:
This unique approach to learning, combined with many small program examples
and exercises at the end of each chapter, makes Programming in Objective-C
ideally suited for either classroom use or self-study. While the Objective-C
language itself has gone through minimal changes since... 阅读全帖
r*****3
发帖数: 143
4
来自主题: Programming版 - You Don’t Know JS: this & Object Prototypes
No matter how much experience you have with JavaScript, odds are you don’t
fully understand the language. This concise, in-depth guide takes you inside
JavaScript’s this structure and object prototypes. You’ll learn how they
work and why they’re integral to behavior delegation—a design pattern in
which objects are linked, rather than cloned.
Like other books in the “You Don’t Know JS” series, this and Object
Prototypes dives into trickier parts of the language that many JavaScript
programmers si... 阅读全帖
c**********r
发帖数: 41
5
平时都潜水,有个关于objective evidence的问题上版请教各位,还请各位不吝指点一
下。
我PhD期间做的research经过我老板开的一家小公司商业化了,但是由于各种原因没有
objective evidence证明这家小公司的产品是基于我的research(虽然事实上是)。我
们没有patent,所以提供patent这条路是行不通了。公司的主页上说明做的XXX产品,
虽然关键词跟我的publication吻合,但是毕竟没有提到我的名字不好说这是直接rely
on我的研究。主页有一些技术性的照片是从我的publication里拿出来的,但是太
technical了,很难在PL说清除这些照片就是来自我的publication,公司的产品rely
on我的research。小公司的老总就是我老板(我不是公司雇员),但是同样没法直接引
申到公司的技术就是我的research。实在不甘心自己的技术确实被商业化了,却找不到
objective evidence证明这一点。希望版上各位有经验的前辈提供一下有参考价值的思
路,指点一下如何挖掘我的技术被这家小公司商业化的objectiv... 阅读全帖
l*******w
发帖数: 61
6
见 //Q:处。
我想不出什么高招可以完成 getObjectClass() ... 惭愧。。。也许是做不到的?
请教各位高见。谢谢。
------------------------------
public class GenericReflection
{
private T object;

//---- get/set ---
public void setObject( T v ){ object=v; }
public T getObject(){ return object; }

//---- is it possible to get the class for the object? ----
public Class getObjectClass()
{
Class retval = null;

if( object!=null ) retval = (Class) object.getClass();
else
{
//Q: can the class ... 阅读全帖
l*******w
发帖数: 61
7
见 //Q:处。
我想不出什么高招可以完成 getObjectClass() ... 惭愧。。。也许是做不到的?
请教各位高见。谢谢。
------------------------------
public class GenericReflection
{
private T object;

//---- get/set ---
public void setObject( T v ){ object=v; }
public T getObject(){ return object; }

//---- is it possible to get the class for the object? ----
public Class getObjectClass()
{
Class retval = null;

if( object!=null ) retval = (Class) object.getClass();
else
{
//Q: can the class ... 阅读全帖
t****t
发帖数: 6806
8
来自主题: Programming版 - const object
no no no, usually if g++ and VC has different result, VC is wrong.
according to standard 8.5 clause 9,
9 If no initializer is specified for an object, and the object is of (
possibly cv-qualified) non-POD class type (or array thereof), the object
shall be default-initialized; if the object is of const-qualified type, the
underlying class type shall have a user-declared default constructor.
Otherwise, if no initializer is specified for a nonstatic object, the object
and its subobjects, if any, ... 阅读全帖
M******8
发帖数: 15
9
08年申请的J1-Waiver, 当年也批准了,今年夏天突然又来问要以前的DS-2019表,就给
他们寄过去了,现在又来信说从没收到过No Objection Statement,觉得很奇怪,今天
查DOS的在线Waiver Status发现自己的Status上有两栏,一栏是2008年的,显示
Favorable Recommendation. 奇怪的是还有一栏No Objection,状态显示pending,并
Request No Objection Statement。
第一栏的No Objection是2008年5月收到的No Objection Statement,6月份发来的批准
信。
第二栏的No Objection显示的是2010年7月又申请的DS-3035, 可本人08年申请了Waiver
后,09年就换成了H1签证,怎么会又申请J1-Waiver呢?
怎么办呢?请各位大虾帮忙!
b***e
发帖数: 39
10
【 以下文字转载自 JobHunting 讨论区 】
发信人: babie (我是养纯种草履虫的贵族), 信区: JobHunting
标 题: Job Openings: Data Warehouse Architect/ETL/Business Objects Architect/Developer
发信站: BBS 未名空间站 (Mon Nov 8 14:52:59 2010, 美东)
Our company is a global fortune 100 located in Midwest having several IT
positions available. These positions are not entry-level positions. Please
email me with your resume or if you have any questions at dyadmstaffing@
gmail.com if you are interested in any of them. These are exempt full time
posi... 阅读全帖
c*****s
发帖数: 49
11
来自主题: Programming版 - 请教显示object name的问题(c++)
Thanks all for your answers. Indeed I need to pass something else other than the object name.
blueivan, you are right, I do need a data member -- found some lecture notes
used the same method.
I later realize that even within "catch", I have no way to display the
object name even the object address has been passed by exception. Then I
realize in reality, the identifier for the object is always some attribute,
not the object name (or address). This attribute is what should be printed
out in the e... 阅读全帖
f****4
发帖数: 1359
12
来自主题: Programming版 - objects status snapshot怎么做
问题描述:
一个容器,大概有40万+的objects,对object有get/set/delete/add操作;这些操作要
求尽快完成。还有几个操作(long run tasks),要求对整个容器所有objects做遍历
,遍历过程会很长(有些费时间的业务处理),这几个操作的要求就是只对snapshot做
。就是说一旦开始遍历,后面来的set/delete/add操作完全不关心,等到这次操作结束
下次再处理。
这些long run tasks会增加。支持多线程。每个object的get/set操作很频繁。
我能想到的就是一旦long run task开始跑了,到它完成前对所有发生的object操作全
部更新在临时对象上。等task结束了,和容器里的对象同步。好处是实现方便,坏处是
内存太浪费了,同步浪费时间。没讲清楚:因为task太耗时间,直接对每个object拷贝
一份更快,但内存就费得更多了。。。
有啥好的点子?
c*******0
发帖数: 5247
13
来自主题: Programming版 - ios 8下用objective-c ?

这都是什么和什么啊。runs in Objective-C runtime和compile to Objective-C这两
个概念是不一样的。Swift运行慢不慢和Objective-C没关系。
另外写side project不用Objective-C问题不大。serious company project不管你是7
还是8,都不可能不碰Objective-C的。大部分目前是pure Objective-C或者mix
b***e
发帖数: 39
14
Our company is a global fortune 100 located in Midwest having several IT
positions available. These positions are not entry-level positions. Please
email me with your resume or if you have any questions at dyadmstaffing@
gmail.com if you are interested in any of them. These are exempt full time
positions with competitive pay. We will offer relocation,a complete benefit
package, including 401K/ESOP, pension, health, life and dental insurance.
Data Warehouse Architect
We are looking for a hard cor... 阅读全帖
m***i
发帖数: 213
15
我能想到的临时办法,就是把object里外倒置一下
把原来在object之外的页面内容,用object来显示,把object里的内容,放在object之外
这样servlet返回的顺理成章

frame
s******e
发帖数: 493
16
来自主题: Java版 - Java Object 一定在 Heap 里吗
I doubt that a simple yes or no will be able to answer this question
correctly.
Java objects basically can be divided into class object and instance object.
All instance objects are saved in the heap. Even for a static member of a
class. In such a case, only the class variable will be in permgen. But all
class objects will be in permgen.
If my memory is correct, JMM spec mentions four types of memory space: stack
, heap, permgen and code cache.
j*******e
发帖数: 2168
17
来自主题: Programming版 - question about desk band object
我按Paul Dilascia的方法写了个desk band object http://blog.csdn.net/snaill/archive/2006/03/29/642893.aspx.
XP上注册,运行,注销完全正常。
在Vista上遇到了两个问题。
1)注销问题 (failed to unregister)
band object需要自己写注销,用到了ATL的ResourceUnregister。这个function在Vista
上出错,unknown error 0x80040201.
我的解决方法是通过直接删除有关的registry tree来实现。
不知有什么别的解决方法?
2)显示问题
在XP上注册成功后,桌面的Toolbars里出现这个object,而且自动显示;
Vista上,桌面的Toolbars里有这个object,但却没有自动显示。需要通过
手动选取Toolbars ->“desk band object”才显示。
同样,注销后,XP上自动消失;Vista上需要reboot才会消失。
原因是SHLoadInProc这个function failed o
c**********e
发帖数: 2007
18
Question: In what two ways can an object of type A be automatically
converted into an object of B in C++?
The answer: .... (the first method omitted)
Another method is needed if we wish to be able to convert into objects of
type B when the class declaration is not accessible, for example, suppose B
was the type double: we cannot write a new constructor for doubles. This is
done by defining an operator in the class A whose name is B so we include
the line
operator B() const;
in the class declar... 阅读全帖
B*******t
发帖数: 1797
19
来自主题: NextGeneration版 - 关于security object
四个月checkup回来,医生的note里讲说不要让宝宝吃奶时间太长。因为时间长了的话
,宝宝很容易把奶瓶当成security object。建议我们另外找些东西来充当security
object。目前我家小牌还没有显现出对任何其它东西有特殊的兴趣。我想统计一下各位
美妈,你家宝宝有没有什么security object。是什么,多大开始对这个object表现出
兴趣或依赖的?
请美妈们踊跃响应!谢谢。
s******g
发帖数: 111
20
各位好:
因为我向DOS邮寄材料的时间比较晚。现在推算,在DOS 收到我的中国使馆发
给他们的no objection letter 之后,我的材料才到DOS。现在的问题是,在dos上查询
我的case number的时候,只显示收到了费用等材料,没有显示收到我的no objection
letter.
我的问题是:DOS以后会发现我的no objection letter 吗?我用不用给DOS
打电话,让他们给我查找一下我的no objection letter ?谢谢!
x*j
发帖数: 271
21
来自主题: Literature版 - Hash Table---the Bucket World of an Object
Hash Table---the Bucket World of an Object
一个对象的桶世界
In computer science, a hash table is a data structure that map keys to
objects using a hash function. In an ideal world, each key is assigned to a
unique bucket, resulting a single object in each bucket. When two or more
objects are in the same bucket, this is called a collision. If the hash
table has too many collisions, rehashing is needed.
迷迷糊糊醒来的时候,桶世界依旧没有什么变化,只有胸前变了的钥匙... 阅读全帖
X*****r
发帖数: 2521
22
【 以下文字转载自 EE 讨论区 】
发信人: Xfilter (支持南开的兄弟们), 信区: EE
标 题: 请问有那种optimization是解决变化的objective function的?
发信站: BBS 未名空间站 (Mon Jan 21 19:32:06 2008), 站内
发信人: Xfilter (支持南开的兄弟们), 信区: Mathematics
标 题: 请问有那种optimization是解决变化的objective function的?
发信站: BBS 未名空间站 (Mon Jan 21 19:31:57 2008), 转信
就是objective function是time varying的
有没有那种optimization或者其他的数学model是deal这种time varying objective fu
nction的?
多谢多谢!
l*******G
发帖数: 1191
23
来自主题: Database版 - object-oriented database设计咋样?
main problem with objects is it is quite easy to grow the object structure
out of control, then memory allocation, copy and paste etc become
substantially slower! Yes it is more natural, more human friendly, easier
to code, however much less compute architecture friendly. This is why
sequential data has great advantage over objects on performance.
I wish one day, memory and cache itself is object oriented.
l*u
发帖数: 9
24
来自主题: Java版 - Object scope question
Can anybody give me the answer for the following question? Thanks.
1. How do you check if a object is out of scope?
2. How do you clean unreference object when you are out of object scope?
3. Is finalize() the last one function was called before you are out of object
scope.
f****n
发帖数: 208
25
来自主题: Java版 - 问个Object.hashCode()的问题
Let me guess what the interviewer want to know one by one:
1) It's java convention that if you override equals method, you should also
override hashcode method. In real situation, it is always true. Otherwise
you don't override either.
2) I think the default hash function should give memory address instead of
constant, because it is much more efficient. So default equals and hashcode
compare the same thing.
3) Constant returned hashcode method is OK (compliable), but actually not a good choice. ... 阅读全帖
c**********e
发帖数: 2007
26
【 以下文字转载自 JobHunting 讨论区 】
发信人: careerchange (Stupid), 信区: JobHunting
标 题: C++ Q74: How to return a combination of a class A object, a class B object and an int
发信站: BBS 未名空间站 (Sat Apr 30 22:26:36 2011, 美东)
How to make a function, which returns a class A object, a class B object and
an integer? Thanks.
L********t
发帖数: 3
27
来自主题: Programming版 - OOP胜出是因为object而不是class
标题本身的逻辑没有问题,就好像图灵奖不叫图灵妈妈奖一样。
这个标题其实有更深的含义: object
是好东西,但class拖后腿。
大规模的程序一般来说需要大量的稍有智能的,能克隆的马仔。一方面,OOP能提供这
样的马仔,并且是三大范式(OOP, PP, FP)中唯一有这个能力的; 但另一方面,class对
写大规模的程序,有负面的作用。
比如在一个单机系统里,你要给amazom下个订单,你一定要有amazon相关object的
reference才能做到,因为这是OOP的object之间交流的唯一方式,然后这个object的类
型,就是class,和所有间接牵连到的个各种类型,都得包含进来。
描述这种情况,说得最好的是: you wanted a banana but what you got was a
gorilla holding the banana and the entire jungle.
在一个单机系统里,OOP做大了都有问题,在多机系统里就更不行了。所以OOP只能在限
制的范围内使用,它们之间用企业技术web service, queue, database 等阻隔... 阅读全帖
g******t
发帖数: 11249
28
object:subject
objective:accusative
l**a
发帖数: 11
m***a
发帖数: 2262
30

object 目的,例如,你加入海军的目的是什么?
objective 目标,例如,你今年的目标是什么?
x********e
发帖数: 35261
31
object是对象,objective是抽象概念,目标或者对象

发帖数: 1
32
Object对象
Objective目标
以上是最常用的用法
d********f
发帖数: 43471
33
“First one of these we’ve seen,” said Judge August Bonativa.
“Not a U.S. citizen, not counted.” said Supervisor of Elections Susan
Bucher, according to the transcript.
It was at this point where lawyers representing Democratic gubernatorial
candidate Andrew Gillum and Sen. Bill Nelson, D-Fla., issued objections --
although they did not give reasons for those objections. The objections were
noted, but the vote was still not counted.
法盲大法官,法盲律师,表示不要拿法律做挡箭牌,走过路过都能投过
c**********e
发帖数: 2007
34
How to make a function, which returns a class A object, a class B object and
an integer? Thanks.
s**********g
发帖数: 1
35
第一次发帖子,谢谢你们关注~ 因为很喜欢apple所以很珍惜他家onsite的机会,如果
有人面过ios sdk或者ios framework的sde/sdet我想请教一下经验啊~ 希望大家来说
一说。我很想知道他们会不会考很多objective c或者让你用objective c写一些东西..
....还有问design和test会不会多。谢谢啦~
先来说一下电面吧
我大概是表现欠佳,所以一共有三轮电面,隔了一段时间,只能尽量回忆
p1.
聊简历,为什么想来apple,为什么想来ios framework组,问了一些objectivec的概念
1.一个byte数里面有多少个1,要优化至constant time
2.测试一个api,这个api是用来播放一个audio的,参数只有一个audio类型
3.还有一个算法貌似是关于两个array的,不难
P2.
问objectivec的优点,和C++的区别,还有一些objective c的概念
我记得第二面基本就没有问什么算法和数据结构,问我五年之内的规划,问了问我的
project
P3.
hashmap讨论了很久,问实现,问collisi... 阅读全帖
S*********y
发帖数: 445
36
来自主题: Postdoc版 - No Objection Letter问题向大家请教
6月1日发出的大使馆通知说中方通过,6月9日美方显示收到No Objection Letter,向
大家请教:收到No Objection Letter后,Department of State Decision还是显示
Pending吗?我的还是显示pending,到最终批准中间会有哪些状态变化呢?非常感谢!
还有一个问题是中国大使馆会同时给我们的住址寄送一份No Objection Letter吗?一
直没有收到,多谢!
s*********1
发帖数: 131
37
我的no objection letter 在8月份就寄给了美国这边,中国领事馆教育组网站公布的8
月份那批就有我,而且我也已经收到了中国领馆教育组的回执。但是问题是我给美国这
边寄的材料和fee都是比no objection letter之后到达的美国部门,所以一直到现在我
的waiver状态还是显示没收到no objection letter,但是其他东西都收到了, 请问我
该怎么办?打电话就让我发传真,可是发了有用么?该发什么内容呢?
l***a
发帖数: 5114
38
来自主题: PhotoForum版 - related objects exercise
刚才发现一个超奇葩的静物摆拍:Peter Fischli & David Weiss
后来看了介绍,原来如此啊。。。。
Influenced by Dada, Surrealism, Pop, and Conceptual art, Fischli and Weiss's
prolific production defies easy categorization. Though their art often
involves a dialogue between opposites, such as order and chaos, work and
leisure, or the everyday and the sublime, a fresh, childlike spirit of
discovery forms a common denominator to their work. Fischli and Weiss revel
in transforming materials and leading audiences to new perspectives on
f... 阅读全帖
j****e
发帖数: 245
39
来自主题: PsychoAnalysis版 - Objectives of psychotherapy (转载)
【 以下文字转载自 Psychology 讨论区 】
发信人: JGrace (奕儿), 信区: Psychology
标 题: Objectives of psychotherapy
发信站: BBS 未名空间站 (Fri Apr 20 17:23:25 2007)
There is a little paragraph on objectives of psychotherapy from the
psychodynamic approach in Nancy McWilliams'book, Psychoanalytic Case
Formulation. I think it might be helpful to post it here. :-)
Enjoy the spring!
Objectives of therapy: the disappearance or mitigation of symptoms of
psychopathology, the development of insight, an increase in one’s sense of
ag
r****y
发帖数: 26819
40
开始时为什么用objC,应该是和历史有关的问题。
http://lowendmac.com/orchard/05/next-computer-history.html
Work on NeXTstep pressed on through 1986 and 1987. It was relatively easy
for the developers to port Mach and BSD to the new hardware platform, but it
proved more difficult for the group to create the new servers that would
differentiate NeXTstep from its competition. Objective-C and Display
PostScript were the two most ambitious project.
In order to have an object oriented operating system, an object oriented
pr
s*******0
发帖数: 367
41
有大虾帮忙看看这个问题。我在网上renew 一个license, 到最后pay 的时候,点击“
pay and submit”的时候出现了这样的提示“object reference not set to an
instance of an object”,没有办法付款了。这是怎么回事啊?
试了IE, google Chrome, and firefox, 都是在最后出现了这样的提示,导致付款无法
进行。大家知道怎么解决这个问题吗?
非常感谢!
n********6
发帖数: 1511
42
来自主题: Database版 - SQL SERVER 面试题, find the objects
Original table: TT(ColumnAA, ColumnBB)
New table: TT(ColumnAA, ColumnBB, ColumnCC)
Further question:
By following the answers, you can find out the related objects which used
the tableTT. However, there are still too many objects.
New business requirement: Find out the objects which use the ColumnBB in
existing logic.
f*****e
发帖数: 57
43
来自主题: Java版 - what's inside an java object?
Coming from c++ world, I am confused :->
A c++ object contains all the data members and the vtable(if exists). The
methods are just like c function sitting somewhere, with the difference of
taking an addition hidden arguement(this). There is only one copy of each
method, which is shared by all the objects of the same class.
Is a java object the same? It's not clear to me, and I couldn't google the
right answer. The few java developers I asked, they seems not care about the
mechanics(typical ja
c*****t
发帖数: 1879
44
Learn the reflection API for the #2. From the class name string,
you can get the Class object, from which you can obtain the Constructor
objects. Then you can invoke one of the constructors to generate
the object.

gui
s***e
发帖数: 122
45
来自主题: Programming版 - 问个object suicide问题
first, in your main function, you should make the derived object with new
operator, such as:
derived * pD = new derived();
pD->f();
and then, the base part of the object is deleted. And that's why you should
put a virtual destructor in base, in that case the whole object is deleted.
c*****s
发帖数: 49
46
来自主题: Programming版 - 请教显示object name的问题(c++)
初学,应该是特别基本的问题,但找不到理想的方法.
在一个class的member function中有没有任何方法可以显示invoke这个function的
object的name?
需要这个是因为在handle exception的时候需要显示对哪个object的操作导致
exception(习题要求 Your exceptions should pass along the identity of the
stack that caused the exception)
唯一能想到的就是stack class里加个stack_name data member. Construct的时候保证
和object name一致.但感觉这个方法太不智能了.有没有更好,更常用的方法?
非常感谢!
A*********l
发帖数: 2005
47
reference is just another name of the object, so you can't re-bound it.
What you did is probably assign the second object to the original object
that the reference points to.

give
r*******n
发帖数: 3020
48
来自主题: Programming版 - Linux and Shared object
3.4. Creating a Shared Library
Creating a shared library is easy. First, create the object files that will
go into the shared library using the gcc -fPIC or -fpic flag. The -fPIC and
-fpic options enable ``position independent code'' generation, a requirement
for shared libraries; see below for the differences. You pass the soname
using the -Wl gcc option. The -Wl option passes options along to the linker
(in this case the -soname linker option) - the commas after -Wl are not a
typo, and you mus... 阅读全帖
n****1
发帖数: 1136
49
来自主题: Programming版 - OOP里面的Object其实是actor
OOP的粉丝们喜欢吹鼓一切皆对象, 对象都有自己的method, 就像有自己的独立人格。
譬如BankAccount是对象, 它有deposit/withdraw/query这些method, 甚至连True/
False这俩也是对象。 但其实这些都是死物, 它们自己不会动的, 而是被一些特殊的
对象: 活对象来使用, 像Banker这种。
这些活对象的却应该有自己的动作(method), 而且除此之外, 每个活对象还都需要有
独立运作空间。 换句话说, 每个对象都应该有自己独立的thread。 而传统的c++/
java/python这些oop都是把object和thread两个概念完全正交分离的, 结果就是在
multithread中很难搞懂object与thread之间错综复杂的关系, 所以程序员讨厌多线程
, 写出来的最robust的架构都是单线程的。
而每个活对象独占一线程, 同时把线程这玩意完全abstract out的思想, 正是Erlang
/Scala所提倡的actor model. 而Erlang/Scala的风靡正说明了object和thread两个概
念其实是应... 阅读全帖
n****1
发帖数: 1136
50
来自主题: Programming版 - OOP里面的Object其实是actor
没错, actor是object
但我的point是:
只有actor才值得用object的概念来建模. 其他的"object"不过是普通的encapsulated
data struct罢了。
拥有"独立人格"的东西最难建模与分析了,因为数学上是non deterministic, 甚至某
些actor可能等价于一个turing machine. 所以从程序复杂度的角度, 也应该尽量减少
actor的数量。 AKA, 不要抱着万物皆活物的思想写程序。
还有,这个actor和FP一毛钱关系也没有. 你也提醒过我, golang也用类似于actor的
goroutine, 而把thread api废掉了.
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)