由买买提看人间百态

topics

全部话题 - 话题: datareader
1 (共1页)
L*******r
发帖数: 1011
1
来自主题: DotNet版 - DataReader vs. DataSet
My words on this:
dataset way is more scalable, especially for busy service(a lot of
connections). But datareader is faster if not that many requests.
hehe, dataset just "looks faster" for busy web serive.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
adotnetarch031.asp
In all of the preceding tests, we saw that DataReader outperformed DataSet. As
mentioned earlier, the DataReader offers better performance because it avoids
the performance and memory overhead ass
k****i
发帖数: 1072
2
来自主题: DotNet版 - DataReader vs. DataSet
Personally I like dataset more than datareader.
As you said datareader holds the connection exclusivly.Though the connection
pooling is done by the framework in most of the cases.I still like to share
the connection in my program if possible and it's clearer.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
As
avoids
connection
it
it
a**y
发帖数: 335
3
来自主题: DotNet版 - DataReader vs. DataSet
From my experience, most of the time, DataReader could do the job fine except
sometimes, I need some complex calculation towards a big data set. Probably,
i could achieve the same goal with SQL, but that would make the database too
slow. In this case, dataset is used. We do some sacrifice some memory, but
we saved the database.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
DataSet.
the
data,
enough
the
y****t
发帖数: 10233
4
来自主题: DotNet版 - DataReader vs. DataSet
I think the key is when you need sort of "real time" data, you have to use
datareader.
and it always compare to dataadaptor instead of dataset.
BTW, is the post really "your words" :)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
As
avoids
connection
it
it
w*s
发帖数: 7227
5
【 以下文字转载自 Linux 讨论区 】
发信人: wds (大盘5000不是梦), 信区: Linux
标 题: pandas.DataReader() 的return type不是DataFrame ?
发信站: BBS 未名空间站 (Sat Feb 6 17:35:19 2016, 美东)
http://pandas.pydata.org/pandas-docs/stable/remote_data.html
return type不是DataFrame ?
尼玛哪里可以查到?
p**r
发帖数: 5853
6
来自主题: LosAngeles版 - 有php的高手么?
最愚蠢的,不涉及算法的方法就是,做个loop,减到0为止
数据库部分:
sql query: select quantity from table where item='Fish' order by date.
程序部分:
datareader=result of sql query
soldAmount=6;
while(soldAmount>0 && datareader.CanReadNext)
{
//获得每天的库存
int tempQuanity=int(datareader["Quantity"]);
//累减
soldAmount-=tempQuantity;
//update table by column key
}
语法是乱写的,但是你应该可以看懂,PHP很久不搞了。
不过这是最笨的方法,如果用算法,运行速度会更快。
s**h
发帖数: 477
7
先拜谢大牛的帮助
我的问题:
刚开始学用python做自动股票交易, 是跟着youtube 上一个视频学的, 但是遇到一个
error, 不知道怎么解决。求帮助
=========================================
import datetime as dt
import matplotlib.pyplot as plt
from matplotlib import style
import pandas as pd
import pandas_datareader.data as web
style.use('ggplot')
start = dt.datetime(2010, 1, 1)
end = dt.datetime(2016, 12, 31)
df = web.DataReader('AAPL', start, end)
print(df.head())
========================================
程序问题
C:UsersXXXAppDataLocalContinuumAnaconda3python.exe... 阅读全帖
i**p
发帖数: 902
8
来自主题: DotNet版 - OleDbDataReader
still has error on eventsXMLDoc.WriteAttributeString("id", dataReader["
categoryID"]);
CS1502: The best overloaded method match for 'System.Xml.XmlWriter.
WriteAttributeString(string, string)' has some invalid arguments
Here is the source code.
System.Data.OleDb.OleDbDataReader dataReader =
dbCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection);
System.Xml.XmlTextWriter eventsXMLDoc = new
System.Xml.XmlTextWriter(Response.OutputStream, Encoding.UTF8);
// generate XM
E******A
发帖数: 53
9
来自主题: DotNet版 - OleDbDataReader
int id =(int)(dataReader.IsDBNull() ? 0 : dataReader.GetInt32(i));
//i 代表 categoryID 在SQL查询语句中的顺序
eventsXMLDoc.WriteAttributeString("id", id.ToString());
S***k
发帖数: 370
10
来自主题: DotNet版 - 真难搞:CLR stack overflow
If the return recodes set is too large, outofmemory exception may be thrown
if using dataadapter. DataReader may be helpful to such case.
If DataReader even no help, you may probably have to modify the stored
procedure.
x******a
发帖数: 6336
11
来自主题: Programming版 - python pandas一个问题
其实问题是为什么goog在yahoo上只有24个数据?
from pandas.io.data import DataReader
from datetime import datetime
goog=DataReader("GOOG", 'yahoo', datetime(2000,1,1), datetime(2014, 4,30))
In [52]:
len(goog['Adj Close'])
Out[52]:
24
w*s
发帖数: 7227
12
Ok i found this code online, works fine except i want to see date in the
xlabel.
import numpy as np
import pandas
import matplotlib.pyplot as plt
from matplotlib.finance import candlestick, candlestick2
import matplotlib.dates as mdates
from pandas.io.data import DataReader
import datetime
# get daily stock price data from yahoo finance for S&P500
start = datetime.datetime(2015, 11, 1)
end = datetime.datetime(2016, 2, 11)
SP = DataReader("spy", "yahoo", start, end)
SP.reset_index(inplace=True)... 阅读全帖
p********l
发帖数: 279
13
来自主题: Database版 - sql server 面试题 (7)
1. sp_helplogins, sp_dropalias, sp_droplogin, sp_dropuser
2. Actually they already can view the source as datareader.
w**2
发帖数: 724
14
请问@6是什么意思?
我用ssms打开database看了,一切正常。
求救,大谢!
Unhandled Exception: System.Data.Entity.Infrastructure.DbUpdateException: An
error occurred while up
dating the entries. See the inner exception for details. ---> System.Data.
UpdateException: An error
occurred while updating the entries. See the inner exception for details. --
-> System.Data.SqlClient
.SqlException: The incoming tabular data stream (TDS) remote procedure call
(RPC) protocol stream is
incorrect. Parameter 9 ("@6"): The supplied value is... 阅读全帖
L*******r
发帖数: 1011
15
来自主题: DotNet版 - DataReader vs. DataSet

except
Probably,
~~~~~~~~~~~~~~~~~~~?
saved connections ba. :)
connection
share
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
optimized
while
not
k****i
发帖数: 1072
16
来自主题: DotNet版 - DataReader vs. DataSet

too
but
I think he was talking about using the in-memory dataset saved huge
server-side oepration at the back-end.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
the
off
the
L*******r
发帖数: 1011
17
来自主题: DotNet版 - DataReader vs. DataSet

So the point here is using the "cache" in dataset to do computing, am I right?
a**y
发帖数: 335
18
来自主题: DotNet版 - DataReader vs. DataSet
I mean, we saved a lot of database operations.
L*******r
发帖数: 1011
19
来自主题: DotNet版 - DataReader vs. DataSet
Got you. I remembered some examples. SQL is not good at some sort of
calculation .
Thanks. :)

right?
st
发帖数: 1685
20
来自主题: DotNet版 - DataReader vs. DataSet
nothing is good if it's over used. hehe. I always believe in something in
between. the previous manager likes "cool" M$ stuff, so they wrote sql proc
over 3k lines, which became a disaster to maintain, debug, optimize later.
also M$ sql server replication latency is a know issue, it can hardly be
determined when replication will be done and it causes heavy network traffic
k****i
发帖数: 1072
21
来自主题: DotNet版 - DataReader vs. DataSet
Really?I mean the replication latency problem.I did the same thing in Sybase
replication server b4 and they worked well.Microsoft sql server is similar(if
not exact the same) to sybase.If it has such big latency problem,does it mean
that it's not suitbale for real time system?
btw,who can feed me the relationship(or history) between sybase sql server and
microsoft sql server?I am 2 lazy to do the research lah.
st
发帖数: 1685
22
来自主题: DotNet版 - DataReader vs. DataSet

I would suspect so, due to this problem, we use our own middleware for
real time and delayed quote delivery.
c**e
发帖数: 2558
23
来自主题: DotNet版 - OleDbDataReader
dataReader["categoryID"] returns an object and not a string
you need to cast it to string

"]
i**p
发帖数: 902
24
来自主题: DotNet版 - OleDbDataReader
dataReader["categoryID"].ToString() ?
But when I use this in VB, it works without the cast.
c**e
发帖数: 2558
25
来自主题: DotNet版 - OleDbDataReader
(string)dataReader["categoryID"]
i**p
发帖数: 902
26
来自主题: DotNet版 - OleDbDataReader
you are not cute this time.
[InvalidCastException: Unable to cast object of type 'System.Int32' to type
'System.String'.]
dataReader["categoryID"].ToString() works.
k***e
发帖数: 7933
27
来自主题: DotNet版 - OleDbDataReader
you need to know the type of data in your dataReader!

type
w*s
发帖数: 7227
28
http://pandas.pydata.org/pandas-docs/stable/remote_data.html
return type不是DataFrame ?
尼玛哪里可以查到?
w*s
发帖数: 7227
29
x = pd.DataReader("xom", "yahoo", start, end)['Low']
print x.idxmin()
怎么返回int ?
谢谢各位!
l*******m
发帖数: 1096
30
pd.DataReader("xom", "yahoo", start, end).reset_index()['Low']
w*s
发帖数: 7227
31
来自主题: Programming版 - Pandas 的index真他妈的奇特
rawx = pd.DataReader("agio", "yahoo", start, end)['Low']
print "-----00------"
print rawx[0:2]
print rawx[0:2].index
print rawx[0:2].index.values
出来结果
-----00------
Date
2015-12-01 62.330002
2015-12-02 63.730000
Name: Low, dtype: float64
DatetimeIndex(['2015-12-01', '2015-12-02'], dtype='datetime64[ns]', name=u'
Date', freq=None)
['2015-11-30T19:00:00.000000000-0500' '2015-12-01T19:00:00.000000000-0500']
最后2行为啥时间不一样?
w*s
发帖数: 7227
32
来自主题: Programming版 - 无比悲惨的一天
以前电脑太慢,于是在新电脑上装environment: vs 2015, ms sql 2014.
然后发现EntityFramework全升级了,以前程序通通完蛋,折腾几次以后烦了,扔掉换
method 2: python的程序。
然后安装python后,发现pandas换成什么它奶奶的pandas-datareader, 以前的程序也
完蛋了。
尼玛的我整天忙着升级,根本没时间真正去写程序。
r***e
发帖数: 127
33
web.DataReader('AAPL', start, end)里缺 data source?
A*****n
发帖数: 243
34
应该是这里提到的问题,Yahoo改了URL。
https://github.com/pydata/pandas-datareader/issues/315
t*m
发帖数: 7
35
来自主题: Computation版 - 新手请教textread的问题
有一个85900*43的数据dat
用matlab的textread直接读读不出来
说是
??? Trouble reading number from file (row 1, field 1) ==> MATLAB 5.0 MAT-
file, Platform: PCWIN, Created
Error in ==> textread at 177
[varargout{1:nlhs}]=dataread('file',varargin{:});
但是在matlab里面用鼠标双击可以打开,为什么?
谢谢
x******e
发帖数: 42
36
現有500 excel files and these file names are stored in another file called
file.dat.
How to quickly import these files (500 excel files) and stored as SAS files
respectly after transposing them?
I wrote the code for a single file, but have to run the macro 500 times with
different numbers. It will be tedious.......... Any other convenient way
by taking advantage of the file.dat?
3xs!!!
%macro dataread(number);
PROC IMPORT OUT= file&number
DATAFILE= "C\chart_data\CR&number..xls"
DBMS
1 (共1页)