由买买提看人间百态

topics

全部话题 - 话题: overload
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
c**********e
发帖数: 2007
1
【 以下文字转载自 JobHunting 讨论区 】
发信人: careerchange (Stupid), 信区: JobHunting
标 题: C++ Q89: function template and overloading
发信站: BBS 未名空间站 (Fri Oct 14 19:45:23 2011, 美东)
What range of functions does a single function template define?
A. Related overloaded functions called function templates
B. Related overloaded functions called template functions
C. Unrelated overloaded functions called function template
D. Unrelated overloaded functions called template functions
c**********e
发帖数: 2007
2
来自主题: JobHunting版 - C++ Q89: function template and overloading
What range of functions does a single function template define?
A. Related overloaded functions called function templates
B. Related overloaded functions called template functions
C. Unrelated overloaded functions called function template
D. Unrelated overloaded functions called template functions
J*********n
发帖数: 370
3
来自主题: JobHunting版 - 关于polymorphism和overloading
不少书上将overloading说成是polymorphism的一种实现方式,但是wiki上有这段话
"Polymorphism is only concerned with the application of specific
implementations to an interface or a more generic base class. Method
overloading refers to methods that have the same name but different
signatures inside the same class. Method overriding is where a subclass
replaces the implementation of one or more of its parent's methods.
Neither method overloading nor method overriding are by themselves
implementations of polymorphism... 阅读全帖
w**********1
发帖数: 97
4
昨天问了一下fremont地区租房的情况
热心人指点warmspring地区,网上查了一下,租金比Mission San Jose的要便宜,而且
离LG上班的地方也相对近一些。
上学校的网页查了一下
发现warmspring地区两间学校 Leitch(K-2)和 Warm Springs(3-6) Elementary都有
overload情况处理办法,在版上搜了学习了发现,原来学校有overload的情况。
请指点一下以下几个问题:
1、2013年的K和一年级有overload的情况吗?
2、我和孩子现在在国内,打算年底过去,请问像我们这种情况应该是插班,有到美国
插班过的家长,有的话指点一下该怎么做,学校网页上只介绍了注册、overload及材料
,没说这种中途插班怎么处理?
3、关于租房,人还在国内,还没租房,在rent.com发现warmspring学区的公寓出租不
多,也挺贵的,打算赴美前再租,有什么好建议吗?主要是为了孩子上学!
e****i
发帖数: 2152
5
BY MICHELE TYDD
18 Jun, 2010 01:00 AM
An excavation company paid a heavy price yesterday for allowing a
dangerously overloaded truck to travel down one of the Illawarra's steepest
and busiest roads.
Even with a good measure of leniency, Cane Excavation Pty Ltd copped a $30,
000 fine for a breach of Roads and Traffic regulations.
The truck, which was ordered off Mt Ousley Rd after detection, was carrying
an 18-tonne excavator, an overload of 76 per cent.
"Potentially, there are not many worse pla... 阅读全帖
c**t
发帖数: 2744
6
来自主题: Java版 - Java banned operator overloading
【 以下文字转载自 Programming 讨论区 】
发信人: cogt (苦荆茶), 信区: Programming
标 题: Java banned operator overloading
发信站: BBS 未名空间站 (Thu Oct 27 09:15:36 2005), 转信
http://www-128.ibm.com/developerworks/java/library/j-pg10255.html?ca=dgr-lnxw01polymorphism
The Java? language has banned operator overloading, but upstart Groovy
says "bring it on!" Find out what you've been missing all these years, as
Andrew Glover walks you through everyday uses of Groovy's three categories of
overloadable operators in this fina
c**t
发帖数: 2744
7
来自主题: Programming版 - Java banned operator overloading
http://www-128.ibm.com/developerworks/java/library/j-pg10255.html?ca=dgr-lnxw01polymorphism
The Java? language has banned operator overloading, but upstart Groovy
says "bring it on!" Find out what you've been missing all these years, as
Andrew Glover walks you through everyday uses of Groovy's three categories of
overloadable operators in this final, regular installment of Practically
Groovy.
Many developers who started out using C++ will admit some nostalgia for
overload operators such as +
X****r
发帖数: 3557
8
来自主题: Programming版 - How to overload global new operator?
Your overloaded 'new' must be declared in every translation unit
of your program. In other words, every .cpp file need to include
the header which has the declaration directly or indirectly.
This is just like any other function you overload -- if the compiler
doesn't see your declaration, it won't know to use your overloaded
function.

the
header,
has
X****r
发帖数: 3557
9
来自主题: Programming版 - operator overloading (C++)
What's the problem then? Each class overloads the same operator
in the global space. These overloaded functions differ by their
parameter list. This is what 'overloading' supposes to do.
w*w
发帖数: 3
10
来自主题: Computation版 - Question about overloading in fortran90
I read a fortran90 book. It says subroutines and functions
can be overloaded in fortran90. But it seems this is not
true overloading. It can just realize polymorphism.
Say if I inherit a module from a parent module and I want
to overload a subroutine in the parent module but still
keepping the shape of the subroutine, i.e. arguments of the
subroutines are the same. Can this be done in fortran90?
v****r
发帖数: 20
11
而不是落后性
一字一义的那是落后的fortran语言,现代java语言,c++都可以overload,
究竟什么意思得靠上下关系推断
即使在人类知识体系中严格的数学领域,overload也广泛存在,比如,
乘法x运算符,这个x既可以用于“数”的乘法,也可以用于“矢量”叉乘,
更可以用于更加复杂的算子运算。。。从来没有人说这是不严密,妈的,
这恰恰是现代符号语言学最为先进的部分
S***e
发帖数: 4426
12
overload就是overload pay吧。貌似不能涨工资的说。。。

思问
independence study.....
x******a
发帖数: 6336
13
来自主题: JobHunting版 - 请问关于overloading << (转载)
【 以下文字转载自 Programming 讨论区 】
发信人: xiaojiya (xiaojiya), 信区: Programming
标 题: 请问关于overloading <<
发信站: BBS 未名空间站 (Wed Feb 27 11:59:50 2013, 美东)
I am working on the example in accelerated C++.
I have overloaded operator+= , operator+ , and operator<<.
the following code does not work.
I got "invalid operands to binary expression('ostream'(aka 'basic_ostream<
char>') and 'myString') when compiling the code.
myString s1="hello";
myString s2="world";
std::cout<< s1+s2 < it worked in the foll... 阅读全帖
s*******r
发帖数: 921
14
【 以下文字转载自 SanFrancisco 讨论区 】
发信人: stonedoor (捡到一分钱), 信区: SanFrancisco
标 题: Foster City的小学哪些有OVERLOADED问题?
发信站: BBS 未名空间站 (Sat Dec 5 19:47:42 2009, 美东)
准备搬家中,先给女儿找小学,再定住处.想问问在FC一带的大侠们,知道Foster City的
小学哪些有OVERLOADED问题(有给分配到SAN MATEO的差学校去的可能)?
比如说
Brewer Island Elementary School
Foster City Elementary School
Sandpiper Elementary School
多谢啦!
j*******1
发帖数: 352
15
Please refer to the website for overload status and information:
http://www.fremont.k12.ca.us/site/default.aspx?pageid=277
We were lucky that year did not have overload when we moved in middle of
school year. But I kept school a couple times every week to ensure there is
space available before I moved in. I strongly suggestion you call the school
office to ask current available space before you move in (to avoid the
disappointment).
s****e
发帖数: 19
16
来自主题: Java版 - override/overload/overwrite in Java
I just found out the difference between Override and Overload:
Overriding methods have the same method signatures while Overloading methods
have different method signatures.
But what's the deal with Overwrite? Or is there a term "Overwrite" in Java
at all?
p****s
发帖数: 32405
17
来自主题: Programming版 - 问个overloading new operator的问题
在C++里,
我尝试着自己定义一个new operator,
首先我这么来一把搞一个带三个参数的new:
#define mynew new (name, type, align)
然后我overload new 和new[]:
void *operator new(size_t size, const char *ModName, memPool_t *memType, size_t alignment) throw();
new[]的overload类似于上.
然后在code里call
pool = mynew(modName, memType, alignment) myPool;
(myPool为自定义的class)
编译的时候出错,compiler不认我定义的这个operator,说
undefined reference to `operator new(unsigned int,char const*,memPool*,unsigned int).
为啥不认呢? 不会是因为我自定义带三个参数的mynew类型和operator new里四个arg
相冲突吧?
X***X
发帖数: 302
18
我做overloading 时遇到的问题,头都大了。
#include
using namespace std;
using std::ostream;
using std::istream;
class Array{
friend ostream &operator<<( ostream &, const Array &);
friend istream &operator>>( istream &, Array &);
public:
Array(int=10);
Array(const Array &);
Array &operator=(const Array &);
Array &operator+=(const Array &);
int &operator[](int);
private:
int length;
int *ptr;
};
然后一个cpp的文件,定义overloading:
#include
t****t
发帖数: 6806
19
来自主题: Programming版 - one question about overloading operator delete
use ::operator delete() to delete void*, if you used ::operator new to
allocate it.
use free() to delete void*, if you used malloc to allocate it.
how did you get the memory? if you overload operator delete, you usually
have to overload operator new as well. in most cases they have to appear
together.
if you don't know what you are doing, better leave them alone. it's very
easy to mess up.

*.
j****i
发帖数: 305
20
来自主题: Programming版 - How to overload global new operator?
I have a large project with many source codes in c++. I have access to the
source.
How can I overload the global operator new? If I define "new" in a header,
how do I make
sure every class in the project will use that?
Currently I overloaded new in the cpp file that has main(), but it only has
effect on
the new operators in that file.
Any ideas?
j****i
发帖数: 305
21
来自主题: Programming版 - How to overload global new operator?
Great idea!
But when I do that, boost::shared_count.hpp gives me problem when I compile.
Here's the line in boost that doesn't compile:
new( static_cast< void* >( pi_ ) ) impl_type( p, d, a );
the error message is:
/usr/local/include/boost/smart_ptr/detail/shared_count.hpp:160: error:
expected type-specifier before 'static_cast'
Seems that the placement new does not like the overloaded new.
With the following overloaded new:
void * operator new(size_t size,
G****A
发帖数: 4160
22
来自主题: Programming版 - operator overloading (C++)
Can I claim an operator overloading function as a static member function?
What are the pros and cons for doing that, compared with a non-static
operator overloading member function?
m*4
发帖数: 1341
23
来自主题: Programming版 - c++ operator overloading question
第一个是在overload 圆括弧()这个operator, return type 是 T&. 实际上是在产生一
个"functor", 挺常见的。
第二个实际上是在overload conversion operator.
比如,你可以写:
operator int(){}
conversion operator declare 的时候不能有return type, 不能带argument, 必须是
member function.
属于很生冷的用法了。
n*w
发帖数: 3393
24
来自主题: Programming版 - Go不支持operator overload
官方的对缺operator overloading回答是 Regarding operator overloading, it
seems more a convenience than an absolute requirement. Again, things are
simpler without it.
z****e
发帖数: 54598
25
overload个大头啊
现在继承谁还拼命用啊?
dont make me guess
代码写得晦涩难懂就是屎坑的走向
谁接盘谁傻逼
s******y
发帖数: 215
26
来自主题: Faculty版 - 如何拒绝overload?
我的班上已经满了,可还是有好几个学生要求加入。 我不想overload的教书,应该用
什么合理的借口拒绝?谢谢。
k******e
发帖数: 720
27
刚报道工作两周后,被系主任安排另一门课,类似于independence study,系主任开学
的时候提到这个是给我extra pay的,但没有提到具体怎么extra pay,当时也没好意思问
但这属于overload了,本来这学期就四门课。。。又多门这个,各位前辈牛人,这种情
况是不是应该和系主任咨询下什么时候加工资呢,还是应该保持沉默呢
工资现在是按照报道前谈好的价钱在给,那时候就说一学期四门课,但现在又多一门independence study.....
谢谢前辈:)
F********y
发帖数: 7139
28
每年就指望这些补贴家用了。teaching school那点base salary很少的,我的overload
都快赶上base的20%了。
l****7
发帖数: 41
29
you can overload it as many times as you want.
p**o
发帖数: 380
30
来自主题: JobHunting版 - 关于polymorphism和overloading
polymorphism in CS includes 3 general forms(according to wikipedia):
1. ad-hoc polymorphism <- function/method overloading
2. parametric polymorphism
3. subtype polymorphism <-- OO crap you are talking about
to discuss more, you have to specify the programming language as
well.

method
polymorphism [2])”
m***t
发帖数: 122
31
Fremont学区应该是到每个学校去报名或插班报名,具体的操作可以问学校的秘书,至
于overload的问题,他们的回答通常是看往年的情况来预测今年,不能guarantee什么
的。你可以到三藩版去问问,那里应该fremont的家长更多些。
d****a
发帖数: 2901
32
overload is upload's dad who father the download
g*q
发帖数: 26623
33
【 以下文字转载自 Military 讨论区 】
发信人: gjq (不好啦,咕咚掉到井里啦), 信区: Military
标 题: Grindr In London Overloaded By Gay Olympic Athletes
发信站: BBS 未名空间站 (Mon Jul 23 16:54:08 2012, 美东)
If you were one of London's estimated 350,000 Grindr users trying to log
into the GPS-based gay dating App last week, you may have encountered some
difficulty, due, according to some, to the influx of Olympic athletes trying
to use the service.
In a July 19th post on the Grindr blog, App founder Joel Simkurai issued an
apology to us... 阅读全帖
k***r
发帖数: 13724
34
来自主题: pets版 - cuteness overload (转载)
【 以下文字转载自 Joke 讨论区 】
发信人: kejer (kejer), 信区: Joke
标 题: cuteness overload
发信站: BBS 未名空间站 (Fri Jul 11 17:35:03 2014, 美东)
c*******t
发帖数: 1095
35
我家有个UPS插在一个插座上,如果对面墙上的插座上用大功率的电器,我的UPS就完全
断电。插在UPS上的主机断电了,没有启动电池。 我以为UPS只是在没电的是紧急供电
,没想到有电的时候overload会断电。 这是UPS应有的操作么?
谢谢
R*******r
发帖数: 104
36
来自主题: Java版 - Java banned operator overloading
Valuable? I think not. There are too many confusions in operator overloading,
at the end of day, a.add(b) is ugly but tolerable, but inproper usage of a+b
can cost you entire day.

of
a**e
发帖数: 5794
37
来自主题: Java版 - override/overload/overwrite in Java
overriding是子类对父类method,overloading是同一个类中的method,
hiding是静态系统method

methods
n*****e
发帖数: 17
38
来自主题: Programming版 - operator() overloading 一问
我知道operator overloading 是不能参数一样的
可是这里有一个是constructor,所以不知道会不会有特别
我写了一个test program,好像没有问题,可是程序复杂了,好像有问题,很奇怪
如果要实现这样的两维数组想表示成p(i,j)或者别的某种形式,怎么做比较好?请大侠
帮忙!
test program 如下:
#include
#include "Point.h"
using namespace std;
int main() {
Point pt(2,2);
pt(1,1)=1.;
cout<<"pt[1][1]= "< cout<<"pt[0][0]= "< return 0;
}
先是结果为:
pt[1][1]=1
pt[0][0]=0
y***y
发帖数: 295
39
假设我的class MyClass overload了function call operator
MyClass::operator()(int, int);
我如何能够通过this调用这个operator呢?
试过this.operator ()(a, b);
在gcc下编译似乎不通过...
谢谢!!!
G*******n
发帖数: 2041
40
看到i++和++i的讨论,想到如果要overload他们,怎样declare才能把它们区分开呢?
c**********e
发帖数: 2007
41
What is the special case that distinguishes overloaded assignment from copy
constructor?
j***i
发帖数: 1278
42
来自主题: Programming版 - question overloading ++ error
I define the class UPint and overload ++ operator.
In the main function c=a++ will have a error but c=++a is fine , anybody
know the reason?
int main()
{ UPint a(1);
UPint c;
c=a++// this will produce a error
// error: no matching function for call
// to ‘UPint::UPint(const UPint)’
c=++a// fine
return 0
}
//////////////////
class UPint
{
public:
UPint(int x=0): value(x){};
UPint(UPint &rhs):value(rhs.value){};
UPint& operator=(const UPint &rhs);
UPint& op
x*******u
发帖数: 2074
43
来自主题: Programming版 - question overloading ++ error
UPint c; 这里调的是default constructor
c=a++; 这里先调你overload的++operator,然后再调assignment operator, which tak
e 前面++ operator的返回值作为参数
你的问题跟++ operator无关, 真正原因前面thrust以及compiler的error msg讲得很清
楚了, 是你没有一个take const UPint的assignment operator(or constructor)
某些compiler通得过我觉得是因为它们提供了const UPint的constructor
g**********1
发帖数: 1113
44
来自主题: Programming版 - one question about overloading operator delete
When I try to overload operator delete in C++, I need to delete some void *.
Thus I will get warning when I compile the source code. I wonder if there
is any way to avoid the warning.
Thank you.
g**********1
发帖数: 1113
45
来自主题: Programming版 - one question about overloading operator delete
When I read the book: thinking in C++. The chapter about overload new and
delete operators. I practice the code and found the warning. Also this book
metions that not deleting void *. Thus I want to know how to avoid this
problem.
Thank you.
y***a
发帖数: 840
46
来自主题: Programming版 - tempalte as the overloaded conversion operator
class WIDE {
...
template operator A () {
A a;
... A::static_member <---- line 20
}
}
template class NARROW{
static int const static_member;
...
}
WIDE wide;
NARROW<1,2> n12 = (NARROW<1,2>)(wide) <---- line 123
error message:
y.c: In member function ‘WIDE::operator A() [with A = int]’:
y.c:123: instantiated from here
y.c:20: error: ‘static_member’ is not a member of ‘int’
I tried to overload a type conversion operator which conve
f*******y
发帖数: 988
47
来自主题: Programming版 - c++ 里面 @ 不能 overload?
正解
这个经常拿来面试
就是只有本身是C++的operator你才能overload
e********e
发帖数: 250
48
来自主题: Programming版 - c++ 里面 @ 不能 overload?
据说空格都可以overload,
http://public.research.att.com/~bs/whitespace98.pdf
j****i
发帖数: 305
49
来自主题: Programming版 - C++ func overload question
#include
using namespace std;
class A
{
public:
void f(int) {cout << "FINT\n";}
void f(int, double j = 0) {cout << "FINTDOUBLE\n";}
};
main()
{
A a;
// a.f(3);
}
Without the commented line, the program compiles; with it, it reports error:
a.cpp: In function 'int main()':
a.cpp:14: error: call of overloaded 'f(int)' is ambiguous
a.cpp:7: note: candidates are: void A::f(int)
a.cpp:8: note: void A::f(int, double)
How to resolve this? And how
X****r
发帖数: 3557
50
来自主题: Programming版 - C++ func overload question
Yes, this is definitely not the recommended way to doing things.
But one shall never make two overloaded functions only
distinguishable by a default parameter to start with anyway :)
Actually I got this bad one-liner habit in Apple II BASIC days.
I did not realize that programs need structure until I started
to learn C and Pascal a few years later, but it was too late ;-)
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)