由买买提看人间百态

topics

全部话题 - 话题: datatype
1 2 下页 末页 (共2页)
m****r
发帖数: 17
1
来自主题: Database版 - Does MS SQL 7 support SQL3 Datatype?
I am a newbie to MSSql 7.0, not sure it can support SQL3 Datatype like
structured type, UDT(User-Defined Type). I am very interested in this
feature, if it does, it`ll reduce a lot the complexity of my current
project.
Please help.
d**t
发帖数: 14
2
Hi,
When I use the follow statement in Visual Basic, the error message said it is
User-defined datatype. I don't know how to make them work. :-(
dim mydb as database
dim myTb as recordset
dim myWs as workspace
Could anybody give me any hints?
Thank you very much!
dgyt
y*l
发帖数: 334
3
来自主题: Database版 - image datatype in sql server
How to define the datatype of image in sql server?
Thanks.
d****n
发帖数: 1637
4
来自主题: Programming版 - 用c怎么实现generic stack (转载)
generic C 有两类,一类是 void *, 但是有转换消耗。
另一类是 C marco,但是难debug
对于你的要求,可变的size,当然要用C marco
///file gstack.c
#define _STACK_STRUCT(STACKNAME, DATATYPE) \
typedef struct STACKNAME { \
struct STACKNAME * next;\
DATATYPE value;\
}STACKNAME##_t;
#define __STACK_POP(STACKNAME, DATATYPE ) \
void pop_##STACKNAME( STACKNAME##_t *node ) \
{ \
;\
}
#define __STACK_PUSH(STACKNAME, DATATYPE ) \
void push_##STACKNAME( STACKNAME##_t *node ) \
{ \
... 阅读全帖
s*********t
发帖数: 1663
5
来自主题: JobHunting版 - 请问怎么用Class实现Stack
#ifndef STACK_H
#define STACK_H
#include
template
class AStack
{
Datatype* m_array;
int m_top;
int m_size;
public:
AStack( int p_size )
{
m_array = new Datatype[p_size];
m_top = 0;
m_size = p_size;
}
bool push( Datatype p_data )
{
if( m_size != m_top )
{
m_array[m_top] = p_data;
m_top++;
return true;
}
return false;
}
p***o
发帖数: 1252
6
来自主题: Programming版 - 一个partial specialization的问题

搞个traits,就是说把上面那个typedef T datatype换成
typedef typename traits::datatype datatype,然后full/partial
specialization traits这个类:
template class traits{typedef T datatype;};
g*****g
发帖数: 34805
7
编译本来就是一个很functional的例子,但一旦涉及到对现实世界建模就傻逼了。
OO语言大行其道,完全是因为更贴近人类理解的现实世界。
没有语言是完美的,但你的例子举来举去,还停留在一个方法的水平上。FP最大的弱点
之一:
It's very easy to add new functions for existing datatypes, but it's "hard"
to add new datatypes.
这意味着加新数据类型的时候,要在所有相关的function里面加东西。而OO则可以加一
个新类,而不改变原来的代码。毫无疑问,以对象组织代码
,要比以函数组织代码,更贴近人类的思维模式。所以FP永远都不会成为主流语言。OO
语言加一点FP的Feature,才是趋势。
从StackOverflow抄来的。
datatype Animal = Dog | Cat;
fun happyNoise(Dog) = "pant pant"
| happyNoise(Cat) = "purrrr";
fun excitedNoise(Dog) = "bark!"
| exci... 阅读全帖
gw
发帖数: 2175
8
来自主题: Programming版 - self defined data type problem
这样定义了数据类型
#ifdef USE_DOUBLES
typedef double dataType;
#else
typedef float dataType;
#endif
然后在程序中如果出现
std::complex x,y;
x=complex(2.0,0);
y = 2.0*x
就会有这样的问题:
Type no match for 'operator/' (operand types are 'std::complex' and '
double')
如何破?
r****y
发帖数: 26819
9
textmate对带template的c++代码indent不正确。比如:
template struct LinkedListNode {
dataType data;
LinkedListNode *next;
LinkedListNode (dataType d){
data = d;
next = 0;
}
};
就不会indent了。
f*******r
发帖数: 1086
10
来自主题: JobHunting版 - 请教amazon面试题
一个函数Node* Func(Node* list1, Node* list2)
输入是2个singly linked list,node datatype是int
有可能存在duplicate在input list中,要求返回一个
新的list包含在list1但是不在list2中的元素,同时要求
新的list没有duplicate。
要求,速度越快越好,可以用多余的mem。
我想了一下,最好是有一个hashtable可以记录哪些值在
list1里面,然后在loop list2去check删除那些相同的值,
有一个问题就是,这里的input datatype是int,我并不知道
数值范围,可能很大,这个题目要求coding,我应该如何建立
这样的一个hashtable? 如果用C/C++。
请大家给些建议,非常感谢了!
P*******b
发帖数: 1001
11
来自主题: JobHunting版 - 问个题目
You are given have a datatype, say X in C.
The requirement is to get the size of the datatype, without declaring a vari
able or a pointer variable of that type,And, of course without using sizeof
operator !
h********m
发帖数: 116
12
来自主题: JobHunting版 - 再问一个C的malloc( )
我还是不太清楚,比如说:如果我要动态生成一个size n的什么data type,我就直接
用定义,比如说 datatype[n]不就行了么,为啥要malloc(n*sizeof(datatype))呢?
M7
发帖数: 219
13
来自主题: JobHunting版 - 再问一个C的malloc( )
只有当n是const的时候,datatype[n]才行。
对于一般变量n, datatype[n]不能通过编译,因为compiler对n的大小一无所知,所以无
法在stack里生成数组。
malloc的数组在heap里.
s*****a
发帖数: 2735
14
谢water 和 wuyi。
我的问题可能不在textscan,应该是loop上太菜了(原谅我是新手,哈哈)
我还是考虑吧文件贴出来,请认识的帮看看,run run。
data file:
https://www.dropbox.com/s/83nd46ny7gunyhv/data.csv
test code:
https://www.dropbox.com/s/vvzfw6uhhgkekbd/test.m
————————————————————————————————————-
test code copy:(我两个方法都出错了,虽然能够正常读入)
%% input 1
fid_t = fopen(...
'C:\**\data.csv', ... % <------------- address
'r');
while ~feof(fid_t)
temp1 = fgetl(fid_t);
temp2 = regexprep(temp1, '"', '');
line = csv2cell(temp2);

if strcmp(... 阅读全帖
s*****c
发帖数: 36
15
来自主题: Database版 - question

CAST is a reversed word in SQL2 Standard. Generaly, it
should have two
argus: value and new data type. But in diffrent DBMSs, the
syntax maybe a little diffrent, so you'd better refer to
your server's documents. Convert is another funtion similar
with Cast.
For SQL Server, the syntax is: CAST(expression as datatype),
and it doesn't suporrt user-defined datatype in CAST.
p******n
发帖数: 874
16
来自主题: Database版 - Help about mysql
I am now working on rewrite some part of mysql DBMS and make it can
recogenize a new datatype (DNA sequence), I have donwload the source
code, but I can not find what I should do. I do not mean user defined
type(UDT) but some datatype imbed in the DBMS. Anyone can help me? I
need know what files I shoud do with and I really want to know the
relationship of the source file. Any hints and advises will be appreciated.
Thanks!!!
s*****g
发帖数: 17
17
来自主题: Database版 - SQL问题求救!!
In the result table, you may need an identity.
CREATE TABLE RESULT
(id int identity(1,1) not null,
value1 datatype,
value2 datatype
)
Then you can insert the values of value1 and value21.
INSERT INTO RESULT(value1, value2)
SELECT value1,value2
FROM A
Hope that it works.
r*********t
发帖数: 4
18
来自主题: Database版 - long and CLOB.. any differences?
Long is a legacy datatype of Oracle and being replaced by CLOB and BLOB. Long
can store up to 2G data and CLOB can store 4G. You can't use WHERE, GROUP BY,
DISTINCT and some other SQL clause for Long datatype. IMHO It's reasonable
that WAS doesn't provide backward compatibility to Long. But I am sure about
he ejb2.0 standard thingy, you sure the 'long' in it is the same thing of Long
in Oracle?
p****o
发帖数: 1340
19
来自主题: Programming版 - 一个partial specialization的问题
我定义了一个模板类:
template class myclass
{
typedef T datatype;
...
};
我希望当使用myclass的时候,这个datatype
的定义不是T,而是一个另外的类型S。我的问题是这个
是不是可行的?如果可以的话,syntax是什么呢?
我可以用full specialization的,不过这个类有好多
函数的,所以不想这样搞。google了半天也未果。
谢了!
t****t
发帖数: 6806
20
来自主题: Programming版 - 一个partial specialization的问题
不管是partial specialization还是full specialization,类都要重写过.
你倒是可以试着把datatype做成模板,比如说:
template struct datatype_trait
{
typedef T1 data_type;
};
template <> struct datatype_trait
{
typedef S data_type;
};
template class myclass
{
typedef typename datatype_trait::data_type datatype;
...
};
b***e
发帖数: 1419
s*****a
发帖数: 2735
22
来自主题: Computation版 - matlab 做不规则 数据输入,求教
谢了个小程序,用来读入不规则的data,能够读入,但是会报错。
应该是loop上太菜了(原谅我是新手,真不好意思)
我把文件贴出来,请认识的帮看看,run run。
这个问题困扰很久了,还有自己的方法可能真的有点笨,请指点,万分感谢。
data file:
https://www.dropbox.com/s/83nd46ny7gunyhv/data.csv
test code:
https://www.dropbox.com/s/vvzfw6uhhgkekbd/test.m
————————————————————————————————————-
test code copy:(下边两个方法都出错了,虽然能够正常读入)
%% input 1
fid_t = fopen(...
'C:\**\data.csv', ... % <------------- address
'r');
while ~feof(fid_t)
temp1 = fgetl(fid_t);
temp2 = regexprep(temp1, '"', '');
line = c... 阅读全帖
l**********1
发帖数: 5204
23
来自主题: Faculty版 - 工作中用什么软件?
Alternatively,
if number theory
pls try MAGMA
http://magma.maths.usyd.edu.au/magma/
from
http://www.dms.umontreal.ca/wiki/index.php?title=Magma&action=e
or
1
down vote
>>after SAGE try PARI/GP and then MAGMA
share|improve this answer
answered Oct 11 '09 at 0:21
Re original query:
>Best open-source Mathematica equivalent [closed]
>What is the best open-source equivalent for Mathematica? My requirements
are:
>(most important) Must be a real computer algebra system (CAS). Notably, I
don't want Matl... 阅读全帖
s*****r
发帖数: 773
24
来自主题: JobHunting版 - C++面试题目分享(2)
What is C++?
Released in 1985, C++ is an object-oriented programming language created by
Bjarne Stroustrup. C++ maintains almost all aspects of the C language, while
simplifying memory management and adding several features - including a new
datatype known as a class (you will learn more about these later) - to
allow object-oriented programming. C++ maintains the features of C which
allowed for low-level memory access but also gives the programmer new tools
to simplify memory management.
C++ use
J**9
发帖数: 835
25
no special meaning. you can use _ anywhere in a variable:
common use:
1) easier reading: data_type instead of datatype
2) typedef struct _my_struct_ {
int a;
int b;
} My_Struct;
3) #ifdef _FILE_HEAD_H_
j********x
发帖数: 2330
26
来自主题: JobHunting版 - 面试题:GetNumber and ReleaseNumber
Effect of different data structures
The designer of the priority queue should take into account what sort of
access pattern the priority queue will be subject to, and what computational
resources are most important to the designer. The designer can then use
various specialized types of heaps:
There are a number of specialized heap data structures that either supply
additional operations or outperform the above approaches. The binary heap
uses O(log n) time for both operations, but allows peeking... 阅读全帖
n**n
发帖数: 626
27
来自主题: JobHunting版 - Amazon面经
from Wikipedia,
In the programming languages C and C++, the unary operator sizeof is used to
calculate the size of any datatype, measured in the number of bytes
required to represent the type.
n**n
发帖数: 626
28
来自主题: JobHunting版 - Amazon面经
from Wikipedia,
In the programming languages C and C++, the unary operator sizeof is used to
calculate the size of any datatype, measured in the number of bytes
required to represent the type.
r**h
发帖数: 1288
29
Yelp这家第一轮HR Screen的时候,HR会问你一些CS方面的基础问题
个人根据自己被问到的经历和玻璃门上的面经总结了一下(实际上没有这么多题不过基
本上都在里面),希望对申请他家的各位有所帮助
1. size of unsigned integer
2. http port no.?
3. ssl full form? (Secure Socket Layer, Encrypt in Transportation layer)
4. use of grep and kill
5. the runtime of adding something to a linked list? O(N)
6. SSL和TLS(Transport Layer Security)的区别:TLS是SSL的升级版(TLS3.0 =
SSL1.0)TLS先handshake再secure
7. hashmaps, DNS(Domain Name System),
8. python native datatypes Boolean, Number, String, Byte, List, ... 阅读全帖
r**h
发帖数: 1288
30
Yelp这家第一轮HR Screen的时候,HR会问你一些CS方面的基础问题
个人根据自己被问到的经历和玻璃门上的面经总结了一下(实际上没有这么多题不过基
本上都在里面),希望对申请他家的各位有所帮助
1. size of unsigned integer
2. http port no.?
3. ssl full form? (Secure Socket Layer, Encrypt in Transportation layer)
4. use of grep and kill
5. the runtime of adding something to a linked list? O(N)
6. SSL和TLS(Transport Layer Security)的区别:TLS是SSL的升级版(TLS3.0 =
SSL1.0)TLS先handshake再secure
7. hashmaps, DNS(Domain Name System),
8. python native datatypes Boolean, Number, String, Byte, List, ... 阅读全帖
j****l
发帖数: 85
31
来自主题: JobHunting版 - Yelp电面小问题汇总
之前好像有人整理过了,但是找不到了,我综合了几个地方的整理了一下,贡献给大家
啦。感谢原作者。
Why Yelp?
Why would we hire you?
Ideal job at Yelp?
NETWORK
What is DNS?
protocol used to transfer message in HTTP application? TCP reliable
What is SSL?
Port number for HTTP? 80
What does HTML stand for?
What is the protocol used underneath FTP?
Difference between POST and GET?
UNIX
UNIX command to search for a specific text through files in a directory.
Find number of unique lines in a file.
signal for kill command? 9, SIGKILL
What is the comma... 阅读全帖
Y***e
发帖数: 1030
32
好像确实是用PostgreSQL。
题目第一句说 Background: schema, datatypes, and schema relationships。Assume
a PostgreSQL database
我应该到哪里找个server呢? 谢谢!
s*******e
发帖数: 261
33
来自主题: JobHunting版 - 请问这个Java 培训课程表
想申请entry -level Java developer position.
请问这个课程表是否覆盖基本的技能要求?
Topic Topic Details
JAVA History Of Java
Java DataTypes
Latest fetaures in JDK 1.5 and Above
Installation & Configuration Of java
First Program in Java using IDE (eclipse)
Oops - Concepts with Examples
Core Java Concepts
Java Threads
Exception Handling
Java IO
JDBC Concepts
Lab session
J2EE Introduction to J2EE Concepts
Introdu... 阅读全帖
g*c
发帖数: 4510
34
用map task算partition total
用reduce task算total和average
datatype是double
可否?
c******g
发帖数: 4460
35
3x。我知道怎么用html。这个我都知道。但是我怎么把sql的结果存到C#的variable里,
用array?what if datatype?换句话说,我html懂一点。c懂一点。c#基本白痴。。。
p*****y
发帖数: 421
36
来自主题: GunsAndGears版 - 上数据解释弹药厂是如何计算BC的
BC的计算分为两种,一种是计算,目前大部分弹药厂的BC是计算出来的,的确是大部分
。但是有一部分,购买了多普勒雷达,实测后,将数据输入到arrow tech公司的另一款
软件radar2000中,然后根据form factor来比照相应的军方的G1-G8来平均出一个BC。合
作的barnes是这么做的,但是他们只给出一个BC,Lupha也是用多普勒。应该说一般大
的公司多多少少都为应用多普勒雷达。
计算非常简单,这里就不截图了。如果打开prodas软件,将子弹的各种数据像填报一样
填到他们的单子里,就会画出一个子弹的三维图,同时把子弹的各种数据生成。初BC外
,也许子弹的六自由度的数据也会生成,比如magnes,aerodynamic jump,pitch moment
.....太多了。但是这些数据还是有很大的误差的。barnes就说对于他们的一款子弹用
预测的数据,弹道会偏低。
另一种就是多普勒雷达,由于这个雷达比较贵,因此大的弹药厂会用。多普勒雷达厂商
,比如weibel,以弹道为目的生产的
http://www.weibel.dk/pageView.aspx?ID=0&page... 阅读全帖
I**A
发帖数: 2345
37
来自主题: BuildingWeb版 - JavaScript 问题 (转载)
不好意思,你能不能再帮我看一下,我对界个javascript实在是太低手了,问题愚昧,请勿见笑。。
那个link里出来的XML数据主要部分是下面这部分,我就是要把这个日期和数据取出来(这个XML FILE格式有没有问题??)


20101108
3.405


20101109
3.433


20101110
3.546


20101111
3.548


20101112
3.607


code呢就是如下了,加上了bind(this)还是不行, 然后我那个attr我都试了,也没有数据到数组里去, 多谢多谢~~
var chartdates = new Array();
var chartdata = new Array()... 阅读全帖
g****z
发帖数: 1135
38
来自主题: BuildingWeb版 - 急问,httprequest error
干嘛自己写嘛,jquery不是有现成的ajax嘛,试试看。
$.ajax({type:'POST',url:url,datatype:'json',...success: succ_func });
s********e
发帖数: 893
39
来自主题: BuildingWeb版 - 搜索效率问题请教
谢谢楼上提供的信息。链接里的文章很有帮助。我事先建了个table,包括50mile内所
有的地址,结果有12Million的records。 搜索一个ID需要5秒钟。所以觉得还是要实时
算比较好。另外,刚看到Sqlserver 2008和oracle都有专门的spatial datatype存储
geography data,还有专门的function计算距离。所以这些都不需要自己另外做
function 或stored procedure 来算了。
w*****h
发帖数: 139
40
来自主题: Database版 - Does MS SQL 7 support SQL3 Datatype?
It does support some. But I don't know how much it supports, like array.
o**k
发帖数: 5
41
来自主题: Database版 - how to write this query, need help !!
In DB2 a table have a field called time ,
time is of timestamp datatype.
How to write a query to retrieve lateset
5 time entries?
for example table person have an age field,
create table person(
name varhar(20),
age timestamp
)
find the youngest 5 person.
Thank
h*k
发帖数: 127
42
来自主题: Database版 - question for webdb guru
anyone know the datatype for checkbox. it cant be LOV, cuz if i check more
than 1 items, it wont return a proper value.
Thanks
p*****e
发帖数: 58
43
来自主题: Database版 - 有关m# sql server text字段类型一问
what is your datatype of the text field?
varchar(257)?, char(257)? or text?
q***e
发帖数: 21
44
来自主题: Database版 - How to insert image to DB2 ?

The best way for you is to go to
http://www.redbooks.ibm.com
and search all db2 materials(input db2 to search), choose
associate platform and tools you use.
If you use java, you can also go to
http://java.sun.com/docs/books/tutorial/jdbc/jdbc2dot0/index
.html
and read "Using SQL3 Datatypes" for more detail.
b****e
发帖数: 1275
45
you can do this in any db. however, he has to define keywords for
every paper. and he'll only be able to search on these keywords.
the sql where clause can not do a full text match because you'll
have to store this in a memo or text datatype.
b****e
发帖数: 1275
46
来自主题: Database版 - long and CLOB.. any differences?
is there any difference between these two datatypes in oracle?
ibm websphere doesn't support long in CMP and suggested us to
convert to CLOB.. while weblogic says long support is part of
ejb 2.0 and that they support it.
so what's the difference? thanks
n**m
发帖数: 255
47
来自主题: Database版 - the most stupid question
varchar2 is the datatype of the column.
varchar is a built-in data type. I assumed varchar2 is User defined one.
(20) indicate the size
r**e
发帖数: 57
48
来自主题: Database版 - My SQL question: auto increment
有没有什么方法可以让auto increment datatype 前面有个
string seed, 比如:abc1, abc2, .... abc100?
Thanks a lot.
1 2 下页 末页 (共2页)