由买买提看人间百态

topics

全部话题 - 话题: delimited
首页 上页 1 2 3 4 5 6 7 下页 末页 (共7页)
l**d
发帖数: 110
1
来自主题: BuildingWeb版 - 请教高手
在学校的时候作业里就有这个问题,当时是用cgi写的小code,注意存成tab/comma
delimited text file就行了,扩展名写成cvs,操作系统会自动call excel.【 在
yayamabel (Boogiewoogie) 的大作中提到: 】

t*******d
发帖数: 1530
2
来自主题: BuildingWeb版 - 请教网站高手
如果你从来没用过数据库,那最简单的办法就是用script把文本框收集的数据写到一个
文本文件,格式用comma delimited CVS, 用MS office EXCEL 就可以打开这个CVS.
script 可以是ASP,PHP... 光是HTML是不够的.
当然最好是用数据库. ASP and ACCESS together should be enough for your case.
l*********a
发帖数: 42
3
import org.apache.mahout.cf.taste.common.TasteException;
import org.apache.mahout.cf.taste.eval.DataModelBuilder;
import org.apache.mahout.cf.taste.eval.RecommenderBuilder;
import org.apache.mahout.cf.taste.eval.RecommenderEvaluator;
import org.apache.mahout.cf.taste.impl.common.FastByIDMap;
import org.apache.mahout.cf.taste.impl.eval.
AverageAbsoluteDifferenceRecommenderEvaluator;
import org.apache.mahout.cf.taste.impl.model.GenericBooleanPrefDataModel;
import org.apache.mahout.cf.taste.impl.mo... 阅读全帖
n*p
发帖数: 298
4
来自主题: CS版 - 一个程序的小问题
我是在用fread读一个文本文件到buffer里,
然后用strtok(file_buffer,DELIMITERS)来parse,
这个文本文件只有10个字符,两个单词
可parse之后总是会多几个怪字符怎么办?
好像strtok没看到buffer(也就是file)的end
s*****n
发帖数: 839
5
来自主题: CS版 - 用Python读csv文件header?
本来我的程序能顺利运行的,后来电脑重装,就装了Python3.2,然后下面的程序就开始
报错了。一开始是找不到next() function, 这个问题已解决。后来是说没有把文件读
成text.我就搞不明白该怎么改了。
程序在这里:
>>> import csv
>>> filename="C:/QWI_2011Q3.csv"
>>> reader=csv.reader(open(filename,'rb'),delimiter=",")
>>> reader.next()
I changed reader.next() to reader.__next__()
l********a
发帖数: 1154
6
来自主题: CS版 - 用Python读csv文件header?
py3k和py2.x的文档来看就一个差别:
py3k:
"...If csvfile is a file object, it should be opened with newline=''.[1]"
[1] If newline='' is not specified, newlines embedded inside quoted fields
will not be interpreted correctly, and on platforms that use \r\n linendings
on write an extra \r will be added. It should always be safe to specify
newline='', since the csv module does its own (universal) newline handling.
py2.x:
"...If csvfile is a file object, it must be opened with the ‘b’ flag on
platforms where tha... 阅读全帖
s*****n
发帖数: 839
7
来自主题: CS版 - Python: index out of rang error
我改好了,现在正常了。 贴出来分享:
import csv
import os
##this path is the location where raw data are stored
path = "C:/Users/Documents/Project/Python code/practice1/csv"
dirList=os.listdir(path)
##this fname is the output file name
fname = "C:/Users/Documents/Project/Python code/practice1/Combined file/
combined.csv"
nfile = open(fname,'w', newline='')
writer = csv.writer(nfile)
start = 0
for fn in dirList:
##this fullfn is the path for raw data plus file name
fullfn = "C:/Users/Documents/Project/Pyth... 阅读全帖
o**y
发帖数: 1466
8
来自主题: Database版 - 哪个软件可以支持2500个FIELDS?
我有一个数据库(CENSUS〕要在网上发布,它的字段数超过2500个,现在我只能用TAB
DELIMITED 格式存储和发布,维护起来非常困难。用ODBC在网上发布时,ODBC的TEXT
DRIVER也不能支持这么大的数据库,想问一下各位,是否有哪个软件可以支持2500个字段
的数据库?这个软件最好还能提供ODBC driver, 并且在WINDOWS或者WINDOWS
NT下运行。谢谢各位!
f********u
发帖数: 572
9
从access export到text file, (space delimited), 结果数据从 0.284 变成了 0.2。
怎么办呢?谢谢
n****c
发帖数: 13
10
access有直接从Excel输入数据的功能,但是我不提倡用。因为这个方法老丢数据。比
较可靠的办法是,把Excel存为tab delimited文本文件(text file),然后用数据输入的
办法输入到Access.
m*****y
发帖数: 120
11
来自主题: Database版 - mysql: how to format output?
Does anyone know how to format the output from mysql?
I issue a query (such as select A, B, from table C), and redirect the
results to a file. But I want to contact the format, such as whether to use
"|" as default delimiter to columns, or use "-" in the output header and
tails.
Thanks.
M*****r
发帖数: 1536
12
来自主题: Database版 - excel 数据中间有‘|’
what is the source data format (before loading into Excel)?
Anyway, one way is:
1. export to txt format
2. re-import into excel, with the "|" as delimiter, so each number will take
one cell
BTW, this doesn't seem to be related to database...
j*****n
发帖数: 1781
13
来自主题: Database版 - small problem about DAO
不好整,先解决 table1 再说其他:
In States column of table1, the states are delimited by space, so you may
have to come out a string process to read characters one by one, from begin
to the end. put each state as a element of an array.
M***D
发帖数: 478
14
来自主题: Database版 - 批量导入文本文件到数据库?
oracle client
how to batch import text file such as csv or tab-delimited to
an oracle database?
which tools to use?
thank you?
j*****n
发帖数: 1781
15
来自主题: Database版 - SSIS import and export wizard 搞不定了
Here is a dummy solution....
use SSIS to export Oracle data into a text file (Delimited);
use SSIS to import this text file into your destination table. Better
predefine your destination table first, otherwise the data type may differ
when you create it while you import.
Another solution is that use data conversion component, which could do some
type transformations but is limited.
Sure, changing collations is always a pain in the S.
Let me know which one worked well for you.
g********e
发帖数: 9
16
客户需要我们每天9点送一个文件.写了一个很简单的store procedure.问题是怎样可以
每天早上自动运行这个store procedure,然后把结果存在一个delimited形式的文件里,
再把这个文件放到客户的ftp site?
用SQLCMD吗?怎么用?
请大牛指点.谢谢
i****a
发帖数: 36252
17
"怎样在固定时间run stores procedure"
sql agent job
"然后把结果存在一个delimited形式的文件里"
write that into your stored proc
再把这个文件放到客户的ftp site
one of the job steps, can use dos command

里,
v****s
发帖数: 1112
18
来自主题: Database版 - mysql index优化求助 (转载)
谢谢各位!这是create table statement, 请帮忙看看如何提高select 的速度。
我只用这个语句:
select * from shortest where ((p1=x and p2=y) or (p1=y and p2=y))
delimiter $$
CREATE TABLE `shortest` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`p1` varchar(45) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT
'',
`p2` varchar(45) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT
'',
`dist` varchar(45) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL
DEFAULT '',
PRIMARY KEY (`id`),
KEY `p1p2` (`p1`,`p... 阅读全帖
v****s
发帖数: 1112
19
来自主题: Database版 - mysql index优化求助 (转载)
I've modified the index stuff today, here is the new one, which takes 3 sec
for count(*) ...
delimiter $$
CREATE TABLE `shortest` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`p1` varchar(45) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT
'',
`p2` varchar(45) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT
'',
`dist` varchar(45) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL
DEFAULT '',
PRIMARY KEY (`id`),
KEY `p1` (`p1`) USING BTREE,
KEY `p2` (`p2`) USING ... 阅读全帖
g***l
发帖数: 18555
20
来自主题: Database版 - I HATE Micro$oft
尽量不用DOUBLE QUOTE了,一般都用PIPE DELIMITED,SSIS是重写的完全放弃了DTS,
DTS已经被彻底淘汰了。今天2005 EXPORT EXCEL,长STRING死活就是EXPORT不出来,最
后用了QUERY RESULT SAVE AS TEXT,然后再用EXCEL打开,是有些烂字符。
i****a
发帖数: 36252
21
来自主题: Database版 - I HATE Micro$oft
vendor file, 沒有辦法啊
excel imports it correctly...
I've tested with LogParser, it reads it correctly too. gonna use LogParser
to convert it into tab delimited or something.
i****a
发帖数: 36252
22
来自主题: Database版 - 誰來解釋一下這是什麼原理
我只會寫一個 funcation,並使用 cross apply call the funcation. 此 query 好象
很利害, 不需要 function.
http://mangalpardeshi.blogspot.com/2009/03/how-to-split-comma-d
Create Sample Data :
-- Create Table for Sample Data
CREATE TABLE Test
(
ID INT,
AllNames VARCHAR(100)
)
GO
-- Load Sample Data
INSERT INTO test SELECT
1, 'A,B,C' UNION ALL SELECT
2, 'A,B' UNION ALL SELECT
3, 'X,Y,Z'
GO
-- Verify the Sample Data
SELECT Id, AllNames
FROM Test
And here is the query for How to split a comma delimited string :
;WITH Cte... 阅读全帖
g***l
发帖数: 18555
23
EXCEL文件FORMAT是最烂的,宁可用CSV或者TAB DELIMITED TEXT FILE,也不用EXCEL
H*******g
发帖数: 6997
w********9
发帖数: 461
25
来自主题: Database版 - 包子重酬,帮作2道题
嗯,好吧,这个txt file是个fixed width (811 byte) vertical bar delimited file,
要求用form to specify the input and output and a button to run the
conversion
B*****g
发帖数: 34098
26
来自主题: Database版 - 包子重酬,帮作2道题
第一个问题:
step 1:
从file里读line
http://www.pptfaq.com/FAQ00913_Use_VBA_to_read_text_from_a_file
step 2:
each line replace "|" (called pipe delimited) with tab
step 3.
each line write to a new file
http://www.pptfaq.com/FAQ00514_General-purpose_routine_for_writ

file,
gy
发帖数: 620
27
来自主题: Database版 - 求救:这个QUERY怎么写in SQL SERVER
"不知道有少个逗号" is what I meant too expensive to use a loop.
Use a delimiter function without loop.....
s**********o
发帖数: 14359
28
来自主题: Database版 - 问个数据migration的问题
EXCEL对RECORD数有限制,最好是直接输出DOUBLE QUOTED and PIPE DELIMITED的CSV
FILE
D*****r
发帖数: 6791
29
来自主题: Database版 - 问个数据migration的问题
多谢。我研究一下。
好像Excel2007可以到1million行左右,老版65536。 如果太多,我可能的确得用csv,
多谢提到“DOUBLE QUOTED and PIPE DELIMITED”,我研究一下。
我太土,做事很慢……
s**********o
发帖数: 14359
30
for xml path不是转换成XML FORMAT了么,然后再从XML读出来,COMMA DELIMITED,
到底要搞个啥结果?
B*****g
发帖数: 34098
31
来自主题: Database版 - 一个SQL写法性能的请教
create table t(id)
把id1-idxxxx都存进去
然后join student 和 t
for oracle, google "Split comma delimited string"
B*****g
发帖数: 34098
32
来自主题: Database版 - 一个SQL写法性能的请教
oracle sql 能把 delimited string直接转成table

做法
p*********d
发帖数: 136
33
来自主题: Database版 - 一个SQL写法性能的请教

How to do this, delimited string直接转成table in oracle sql?
Also where is the "1000" limitation specified?
l********n
发帖数: 200
34
来自主题: Database版 - 一个SQL写法性能的请教
请问MSSQL能否把delimited string直接转成table?
P********R
发帖数: 1691
35
来自主题: Database版 - 求教:
SELECT Partid, Description, Price
FROM INVENTORY
WHERE  Price = (SELECT MAX (Price) FROM INVENTORY);
出错,错误码是:
ORA-00911: invalid character
00911. 00000 - "invalid character"
*Cause: identifiers may not start with any ASCII character other than
letters and numbers. $#_ are also allowed after the first
character. Identifiers enclosed by doublequotes may contain
any character other than a doublequote. Alternative quotes
(q'#...#'... 阅读全帖
P********R
发帖数: 1691
36
来自主题: Database版 - 请教:PL/SQL
下面这个哪儿不对
DECLARE
vPartid NUMBER (4);
vDescription VARCHAR2 (265);
vPrice NUMBER (7, 2);
BEGIN
SELECT Partid, Description, Price
INTO vPartid, vDescription, vPrice
FROM INVENTORY
WHERE Price = (SELECT MAX (price) FROM INVENTORY);
   DBMS_OUTPUT.PUT_LINE ('Part Number ' || vPartid ||
'described as ' || vDescription ||
'is the hightest priced item in inventroy at ' ||
TO_CHAR(vPrice,'$9999.99')  );
... 阅读全帖
s***o
发帖数: 2191
37
Can you just "Split" the string with "\n" or whatever delimiter you specify,
then process the resulting strings as separate lines?
There is also a CarriageReturn class that may be useful:
http://msdn.microsoft.com/en-us/library/documentformat.openxml.
c*********e
发帖数: 16335
38
把一行string用#为delimiter分开为一個array ar,如果ar[0].trim().equals("") &&
!ar[1].trim().
equals(""),就是comment line
B*****g
发帖数: 34098
39
来自主题: Java版 - 有人用过Spring吗?
咱们现在用的ETL都是订好了map,比如说delimited file,第一个存到table A column
a, 第二个存到。。。。。所有文件都要按这个格式送。
现在要求这些map关系都存在db里,例如客户甲说,我要送fixed length file,1-8个c
har存到table A column a中。。。,客户乙说我要送excel。。。。客户可以自行控制
,随时更改。
B*****g
发帖数: 34098
40
来自主题: Java版 - 有人用过Spring吗?
we have ETL not informatica. My requirement is not typical.
For ETL you have to know the source format before creating a map.
For exp, if client send delimited file with 7 fields, then we create a map
to match this 7 fields to target. If client want send 8 fields or to wants
to send Fixed length file, we have to change the map. Now we want to have a
universal map can handle any format source based one the format information
in database.
c*****t
发帖数: 1879
41
最简单的办法我已经说了,你只要弄几个 class,对应 runlength scanning,
delimit scanning 等(这两个你该会吧,不会就没辙了)。然后就用 Spring
的 xml 做 record format 弄一 container,里面就是这几个 class object
和具体的 setting (比如 runlength 的长度等)。这样当用户给你个 xml,
你通过 Spring 读进该 xml,得到的是一个 list 的 scan action 。然后你
loop 这个 list 里的 action 不停的 parse record 就行了。
其它通过 Xml schema 设计的道理一样。自己 parse xml 说实在也很容易。
f**********3
发帖数: 295
42
想用regular expression做leetcode的simplify path
想把比如s="a/b/c//d"
分成a b c d
所以想用"/"或者"//"做delimiter
试过s.split("/|//"),分成了5分... 中间一个空在//中间
请问为什么这么不行? 应该怎么写?
j******a
发帖数: 1599
43
怎么弄?
就是个普通的文本文件,不一定有delimit
vi里好像不行的说?
B*********s
发帖数: 292
44
如果没有delimit,你如何知道第几列呢?
发个样本上来看看.
l*********s
发帖数: 5409
45
来自主题: Linux版 - python 一问
why not to use regular expression to specify the delimiter
t**********s
发帖数: 930
46
The fortune program on most *nix boxes displays a random fortune. Fortunes
are kept in several files in a particular directory (usually /user/share/
fortune). Each file contains several (many) fortunes, of various length.
Each fortune in a file is separated by a line w/some delimiter character,
typically '%'
When the program is run, a random fortune is chosen, and displayed on the
screen. This should be done quickly. You are to devise a scheme whereby the
time required to choose a fortune isn't
e*******e
发帖数: 987
47
我现在要给客户写一个小程序:
An application that would use tab delimited tab file that contains the
information to be emailed example: to, from, subject, text, attachement and
time to send out email.
我的问题是如何实现这个“time to send out email“,就是说send email的时间是不
定的,可能头十个当天上午10时送出,其他的11时送出。我的想法是spin a java
thread, and put the thread into sleep for five minitues and then wake up to
check if it's time to send the next email. 这样这个程序就要一直在客户的机子
上run着,直到最后一封邮件送出。
这是不是最好的方法?
y***i
发帖数: 34
48
anyone had this problem before?
I tried to read "," delimited CSV file in EXCEL 2007 using VBA, but
Workbooks.OpenText Filename:=curFilepath + "\Settlement.csv", DataType:=
xlDelimited, comma:=True
it converted "Jan-09" to Jan 09, 2008. Actually, it should be Jan-2009.
Microsoft said it is a problem in EXCEL 2002.users have to change register
file.
Any expert knows how to fix it in code, not in register file?
Thanks a lot!
i******r
发帖数: 323
49
来自主题: Programming版 - 问一个python的string split问题
重新写一下问题吧:
默认的split,可以把split出来多余的空字串去掉
>>> 'a\n\nb'.split()
['a', 'b']
但是我手工设定了delimiter之后,就会有多余的空字串了
>>> 'a\n\nb'.split('\n')
['a', '', 'b']
>>>
这个咋回事,谁给我解解惑?
r****t
发帖数: 10904
50
来自主题: Programming版 - 问一个python的string split问题
In [12]: "a b".split(' ')
Out[12]: ['a', 'b']
我这里是默认的效果,你那个很奇怪。

delimiter
首页 上页 1 2 3 4 5 6 7 下页 末页 (共7页)