Y******e 发帖数: 20256 | 1 马里好像TD/INT 比例还是挺高的,他靠扔球混饭吃的,INT多一点还可以原谅。就是大
赛总是犯昏,要上NFL,这样的mentality不太好的QB混不久。Pryor这点还可以,不过
和JT的保守打法关系更大。 |
|
s**********l 发帖数: 8966 | 2 arkansas上场就有个傻叉endzone int以后努力跑了10码出了边线,关键这之前bama也
是endzone
int但是马上就跪地了,这厮还不记得。 |
|
s******3 发帖数: 7297 | 3 MSU的QB Kirk Cousins本场对Iowa扔出了三个INTs
尤其是上半场的2个 直接导致Spartan的崩盘
他本人在赛后是这么说的
"On those three interceptions, I was trying to do too much. Iowa's defense
is a bend-but-don't-break defense, and when you're only getting a few
yards at a time, and you get a chance to chuck it deep, you always want to
try to force it there. Iowa's defense got the better of me on that one."
听起来Iowa的defense颇有些诱敌深入的味道
这种情况究竟是DL刻意布下的局 还是Cousins自己心态没有放平? 好大喜功 贸然长
传?
Denard Robinson在play MSU之前也只有1次INTs 但那场比赛也有三次
MSU的DL是否... 阅读全帖 |
|
i**w 发帖数: 787 | 4 DL用不着布什么局,我们OL不能把自己的跑攻立起来,他们只要专注防传球就好了。
Cousins那几个长传的确是犯了错误,一个是往double couverage扔球,再就是还都仍在
接球手的后面,这样他们不int都难。主要是第一个int,被他们return之后,直接崩盘
了。 |
|
l*****8 发帖数: 16949 | 5 前面至少还有三个可能被int了。这个PSU的QB简直就是int 机器。 |
|
d********g 发帖数: 11948 | 6 整场没有INT 关键一个INT!!!!!oh yeah!!!!!! |
|
c*******0 发帖数: 5247 | 7
不怕人说事后诸葛亮,我当时看他倒地就给我家LD说,野猪危险了。不是怀疑Mallet的
状态,而是实在不敢新人野猪的wr
事实上也是,那个int之前又是一个drop ball,否则可能就没那个INT了。Mallet当时
估计也打红眼了 |
|
S****u 发帖数: 2998 | 8 “这些INT中,最不理解的就是OU那个和IOWA第一个,都是在自己红区,1ST AND 10,
然后打传不打跑,就悲剧了。这种INT是最伤的,对方直接或轻松得分,DEFENSE士气也
受挫,从此整个球队就GO SOUTH了。”
这应该是你们教练CALL的问题吧 |
|
R*******r 发帖数: 104 | 9 You have to setup your formula first.
What will be rounded to floor int, ceiling int, and .5?
Nobody can give you an answer without that first. |
|
g*****g 发帖数: 34805 | 10 most java programs do not use input from console that's why its
support is not strong, for int you can convert from double
by (int)double_number. Scanner is a new solutino in java5
方 |
|
m******t 发帖数: 2416 | 11
There isn't a simple answer to this question. While it is safe to say int[]
is faster than most if not all the List implementations, the actual
difference depends the implementations, e.g., random access with ArrayList
is O(c), and O(n) for LinkedList. |
|
b******y 发帖数: 9224 | 12 basically, the int[] array stores the int values, the Integer[] array only
stores the pointers to the Integer objects. |
|
j******n 发帖数: 108 | 13 其实我倒不一定非要转换成 int[]
基本目的就是后面的操作要把这些int一个个读出来,做一些运算。
我看 IntBuffer 也提供了 get put 之类的方法,不知道背后的原理
是怎么样的。最后结果够快就好。我测测吧。 |
|
d********i 发帖数: 8 | 14 这是今天的电话面试问题:
问:
struct test{
char a;
int b;
};
这个STRUCT 多大,我回答是: 假设CHAR 一个字节, INT 4个字节,理论上讲应该5个字节
,但是COMPILER应该会做调整, 有PADDING, 所以很多情况是8个字节. 最好用SIZEOF()
来确定而不是自己来算.
我后来用GCC写了小程序, 是8个字节,不过面试官好象不相信我. 我有说错吗? |
|
t****t 发帖数: 6806 | 15 Holy Standard
4.4 Qualification conversions [conv.qual]
Clause 4, Note:
[Note: if a program could assign a pointer of type T** to a pointer
of type const T** (that is, if line //1 below was allowed), a pro-
gram could inadvertently modify a const object (as it is done on
line //2). For example,
int main() {
const char c = 'c';
char* pc;
const char** pcc = &pc; //1: not allowed
|
|
s*******d 发帖数: 59 | 16 int main() {
const char c = 'c';
char* pc;
const char** pcc = &pc; //1: not allowed
*pcc = &c;
*pc = 'C'; //2: modifies a const object
}
const char **
是说char 是const,还是说char* 是const? |
|
g****p 发帖数: 94 | 17 写一个程序要求用户输入一个数字,存成int
如果int长度是32bit的话,怎么知道用户是不是输入了一个大于32bit范围的数字呢?
多谢! |
|
c********x 发帖数: 84 | 18 that is easy,
1. you convert the string to int,
2, you convert the int back to a string,
3, compare these two strings, if they are the same, then no overflow,
if they are not the same, then.... |
|
e*****w 发帖数: 144 | 19 C++貌似可以用模板:
#include
template
std::size_t GetTheSizeofMemory(const T &t) {
return sizeof(t);
}
int main() {
int num[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
std::cout << GetTheSizeofMemory(num) << std::endl; // 40
} |
|
e*****w 发帖数: 144 | 20 如果是下面的原型,那肯定没戏了:
int GetTheSizeofMemory(int *buffer); |
|
b*********n 发帖数: 1258 | 21 64 bit下的int也是4 bytes?
那就和32 bit下的int一样了,对吗? |
|
M*m 发帖数: 141 | 22 char *a = "12";
int j = (int)a;
j is 134514482, what is going on here? how does c convert "12" to this
number? |
|
b***i 发帖数: 3043 | 23 对,不能先定义reference,在检查指针。
似乎c++如果随意改变reference的源是没有问题的,但是没有实现。是这样吗
比如
int &x=y;
....
..
if (...) return;
int &x=z;
... |
|
t****t 发帖数: 6806 | 24 reference一旦在初始化时被绑定, 就不能更改. 以后的赋值就对被引用的那个对象做.
如果用两次
int&x=y;
int&x=z;
就是重复定义了(这个随便想想也知道吧?) |
|
b***y 发帖数: 2799 | 25 ☆─────────────────────────────────────☆
alfven (rik) 于 (Wed Dec 3 15:56:16 2008) 提到:
我要处理一些c string 的 stream, 举个例子:
char* a = "A20081203B 500MITBBS 2000"
要求把其中的“20081203”,“500”,“2000”转换成整数。我现在做的是memory
copy到另外一个char 数组,然后再用atoi()函数:
char b[9];
b[8] = '\0';
memcpy(&b[0],&a[1],8);//拷贝
int c = atoi(b);
因为要求速度,有没有什么办法可以避免拷贝这一步?比如可以Atoi(&a[1],&a[8])之
类的。
谢谢。。。。。
☆─────────────────────────────────────☆
leonjld (三天打鱼) 于 (Wed Dec 3 16:23:02 2008) 提到:
int c=0
while (p=a+1;isdigit(*p);p++) // |
|
c**a 发帖数: 316 | 26 第一种实现:
template
bool isint()
{
return typeof(T) == typeof(int);
}
第二种 实现
template
bool isint()
{
return false;
}
template<>
bool isint()
{
return true;
}
我觉得两种都对哇。
可是答案只有一种是对的。 |
|
I*******e 发帖数: 1879 | 27 ☆─────────────────────────────────────☆
ccca (cc) 于 (Sun Feb 15 21:40:43 2009) 提到:
swap(x,y);
不算
☆─────────────────────────────────────☆
SuperString (阳阳加油) 于 (Sun Feb 15 21:51:11 2009) 提到:
用 ^
☆─────────────────────────────────────☆
ccca (cc) 于 (Sun Feb 15 21:53:18 2009) 提到:
Yep. That is the answer, could u please elaborate.
I really dont know how to do it.
int x = rand();
int y = rand();
x = x^y; // does not work
☆─────────────────────────────────────☆
oHo (glasses) 于 (Sun |
|
s***t 发帖数: 70 | 28 const int n=10;
int a[n];
the above is not part of ANSI C, but is it part of C standard 99? |
|
s*****w 发帖数: 1527 | 29 1. for this code,
ostream& operator << (ostream& s, int cnt)
{
s << cnt;
return s;
}
i got
'operator <<' is ambiguous
why ? this is in VS 2005
if i change "int cnt" to "char c", it compiles.
2. also why ostream << overload has to return "ostream&" not "void" ?
i thought i'm passing in ostream&s anyway,
so when i use
ofstream f("myfile");
f<<55;
i don't see why the return "ostream &" got used.
many thanks ! |
|
z****e 发帖数: 2024 | 30 刚才试了试,发现int (*) [5]和 int (*) [10]是不一样的。 |
|
z****e 发帖数: 2024 | 31 #include
#include
#include
using namespace std;
后面用了abs()
error: call of overloaded ‘abs(double)’ is ambiguous
/usr/include/stdlib.h:691: note: candidates are: int abs(int)
没办法,把using namespace std;去掉,然后一个一个的using。编译通过了。
我估计是用了stdlib里边的abs,但是精度太差了。
怎么调用一个take double 的abs() 呢? |
|
g*********s 发帖数: 1782 | 32 //assuming s has the unknown numbers of integers.
stringstream ss (s);
vector v;
int num;
while ( ss >> num )
v.push_back(num); |
|
j*****I 发帖数: 2626 | 33 大侠能否讲讲一个compiler看到这个expression 怎么开始分析的?
elements有以下这些,
int
*
a
[]
第一个比较清楚. 第二个好像既不是那么清楚了. 那个element先被读,那个后被读呢? |
|
D*****r 发帖数: 6791 | 34 我觉得是先;,然后int, 然后[], 然后(),然后*,然后a
具体的照着parser规则走一遍,画出Abstract syntax tree就明白了。
www.lysator.liu.se/c/ANSI-C-grammar-y.html
呢? |
|
i***h 发帖数: 12655 | 35 需要用一个float存整数:
int i = 0x24240102;
float f = static_cast(i);
std::cout << std::hex << static_cast(f) << std::endl;
结果出来是:
24240100
尾巴上那个02变成00了.
为什么? |
|
t****t 发帖数: 6806 | 36 union {
int i;
float f;
};
reinterpret_cast<> is to convert between pointers and integral types. no
float allowed.
using float* to access int* (no matter cast with reinterpret_cast or (type)
cast) is undefined, don't try that. it is subtle and not easy to discover,
but will blow up eventually. |
|
a***n 发帖数: 538 | 37 int i = 0x24240102;
float f = *reinterpret_cast(&i);
std::cout << std::hex << *reinterpret_cast(&f) << std::endl; |
|
h*****f 发帖数: 248 | 38 casting to void* to trick the compiler not to do anything:
int i = 0x24240102;
float f = *(float*)(void*)(&i);
std::cout << std::hex << *(int*)(void*)&f << std::endl; |
|
N******K 发帖数: 10202 | 39 这么说来 用 unsigned int 很成问题 |
|
t****t 发帖数: 6806 | 40 有warning你还抱怨什么. 不管是把int转成unsigned还是反过来, 都会有问题的. |
|
k**********g 发帖数: 989 | 41
Firstly, signed and unsigned int have a "common interval".
From zero to INT_MAX (0 .. 2147483647)
When both operands are within this common interval, comparison result will
be correct regardless of each operand's type, and/or the coercion rule.
Therefore, one only needs to check that each operand's value is within this
common interval (prior to coercion). This is how the machine code is
typically generated in languages that have integer range checking.
It is very simple to test this. Just test ... 阅读全帖 |
|
N******K 发帖数: 10202 | 42 这么说来 用 unsigned int 很成问题 |
|
t****t 发帖数: 6806 | 43 有warning你还抱怨什么. 不管是把int转成unsigned还是反过来, 都会有问题的. |
|
k**********g 发帖数: 989 | 44
Firstly, signed and unsigned int have a "common interval".
From zero to INT_MAX (0 .. 2147483647)
When both operands are within this common interval, comparison result will
be correct regardless of each operand's type, and/or the coercion rule.
Therefore, one only needs to check that each operand's value is within this
common interval (prior to coercion). This is how the machine code is
typically generated in languages that have integer range checking.
It is very simple to test this. Just test ... 阅读全帖 |
|
g*******u 发帖数: 3948 | 45 好像这样就行了 ,,
vecot> v;
.....
vecot> * p = &v; |
|
w****6 发帖数: 796 | 46 1)use a pointer:
foo(&p);
void foo(vector> *p) {... }
2) use a reference:
foo(p);
void foo(vector> &ref) {... } |
|
g*******u 发帖数: 3948 | 47 是的 用第一种比较方便。
可以在一个class里面声明一个 vector> *p
然后 让 p 指向一个 vector> 。这就是我当时要做的:) |
|
b***i 发帖数: 3043 | 48 C++里面,如果有一个函数
const int foo()
{
return 5;
}
或者是一个对象
const Object bar()
{
...
}
这里const干啥用的?
我同事说只能赋值给常值变量,比如const int i = foo();但是我试了,好像可以随便。
我觉得他和 const Obj& obj = bar_();混了,如果是返回一个引用。这个时候我们不
希望变量随便改写引用的内容。 |
|
b***i 发帖数: 3043 | 49 不用const也行吧?
比如
int foo()
{
return 5;
}
也不能foo()=6啊
我说过我理解const Obj& foo(),不理解const int foo() |
|
r**h 发帖数: 175 | 50 大概了解了下,虽然是和int'l有关的,但是基本都是个人税。以后能转到int'l
corporate这块么?有同学做这个的吗?前景如何?谢谢。 |
|