a******u 发帖数: 239 | 1 I think my answers to Question 7 and 8 are correct, but they said they are
not correct, why?
I already tested the code by Visual C++ (c compiler).
Thank you very much.
Line in file Contents
30 int * someIDs, theFirst, *r;
110 someIDs =GetSomeIDs(); /* defined below */
111 theFirst = someIDs [0];
112 r= ReorderIDs(someIDs);
113-150 /* we want to use ‘theFirst’ and ‘r’ here*/
499 /*-------- GetSomeIDs-----*/
500 int * GetSomeIDs()
501 {
502 int ids[8];
503-5... 阅读全帖 |
|
c**t 发帖数: 2744 | 2 Can any nHibernate expert let me know what's wrong with the following? I
alwasy got Acccount.ListAttr as null; when do "foreach(var a in Account.
ListAttr)" I got invalid cast error: can't cast ISet to IList..
I have Account.hbm.xml as follows:
...
..
and Account.cs has:
public virtual ISet ListAttr {get; set; }
..
Also have SomeOtherClass.hbm.xml:
...
阅读全帖 |
|
i***0 发帖数: 8469 | 3 Line in file Contents
30 int * someIDs, theFirst, *r;
110 someIDs =GetSomeIDs(); /* defined below */
111 theFirst = someIDs [0];
112 r= ReorderIDs(someIDs);
113-150 /* we want to use ‘theFirst’ and ‘r’ here*/
499 /*-------- GetSomeIDs-----*/
500 int * GetSomeIDs()
501 {
502 int ids[8];
503-550 /* The ids are defined here */
551 return ids;
552 }
1. Is GetSomeIDs() a reasonable function?
2. Is there a different way to write line 500 which preserves the same
effective prototype? If so |
|
P*******b 发帖数: 1001 | 4 【 以下文字转载自 Programming 讨论区 】
发信人: snowyrose (好好学习天天向上), 信区: Programming
标 题: [合集] C coding problems
发信站: BBS 未名空间站 (Mon Mar 1 13:56:18 2010, 美东)
☆─────────────────────────────────────☆
merriam (爱我所爱,珍惜拥有!) 于 (Sun Jan 3 16:02:31 2010, 美东) 提到:
what the correct int * GetSomeIDs() should be like? Thanks
30 int * someIDs, theFirst, *r;
110 someIDs =GetSomeIDs(); /* defined below */
111 theFirst = someIDs [0];
112 r= ReorderIDs(someIDs);
113-150 /* we want to use ‘theFirst’ an |
|
f********1 发帖数: 228 | 5 【 以下文字转载自 Programming 讨论区 】
发信人: falcon8241 (falcon), 信区: Programming
标 题: A weird C programming language--Return a pointer to array
发信站: BBS 未名空间站 (Wed May 29 13:54:54 2013, 美东)
A question I encountered during the interview. Could anyone give me some
idea.
The key issue is I was asked to modify line 500, which is the function
declaration...
Is there a different way to write line 500 which preserves the same
effective prototype? If so, what is it?
Line in file
Code:
30 int * someIDs, theFirst,... 阅读全帖 |
|
s*******e 发帖数: 664 | 6 ☆─────────────────────────────────────☆
merriam (爱我所爱,珍惜拥有!) 于 (Sun Jan 3 16:02:31 2010, 美东) 提到:
what the correct int * GetSomeIDs() should be like? Thanks
30 int * someIDs, theFirst, *r;
110 someIDs =GetSomeIDs(); /* defined below */
111 theFirst = someIDs [0];
112 r= ReorderIDs(someIDs);
113-150 /* we want to use ‘theFirst’ and ‘r’ here*/
499 /*-------- GetSomeIDs-----*/
500 int * GetSomeIDs()
501 {
502 int ids[8];
503-550 /* The ids are defined |
|
f********1 发帖数: 228 | 7 A question I encountered during the interview. Could anyone give me some
idea.
The key issue is I was asked to modify line 500, which is the function
declaration...
Is there a different way to write line 500 which preserves the same
effective prototype? If so, what is it?
Line in file
Code:
30 int * someIDs, theFirst, *r;
110 someIDs =GetSomeIDs(); /* defined below */
111 theFirst = someIDs [0];
112 r= ReorderIDs(someIDs);
113-150 /* we want to use ‘theFirst’ and ‘r’ here*/
499 /*--------... 阅读全帖 |
|
c**t 发帖数: 2744 | 8 using profile, I figured what went wrong. I have Account.hbm.xml as
...
The issue was nHibernate always passes in "Account_Id" for my sql-query...
it's not SomeId. |
|
r****y 发帖数: 26819 | 9 用不用jquery不重要。dom选取一样可以document.getElementById("someid").value。 |
|
r****y 发帖数: 26819 | 10 用不用jquery不重要。dom选取一样可以document.getElementById("someid").value。 |
|
c**t 发帖数: 2744 | 11 easy fix:
td1.setAttribute("id", "someId"); //add
..
td1.setAttribute("ondragstart", "drag(event)"); //replace didn't work line
.. |
|