r******r 发帖数: 700 | 1 原来的 code:
for(FileDefinition file : FileDefinitions){
if( filePath.contains("Generic")){
HashSet entries = file.loadGenericLexicon();
}else if( filePath.contains("NNP")){
HashSet entries = file.loadNNPLexicon();
}else if( filePath.contains("TPO")){
HashSet entries = file.loadTPOLexicon();
}
}
class FileDefinition{
...
public HashSet loadGenericLexicon(){
HashSet features = new HashSet();
// reach each line ... 阅读全帖 |
|
A*******n 发帖数: 625 | 2 this question is weird for me, Code is below:
string FilePath = ConfigurationManager.AppSettings["PPLDownloadFilePath"];
if (Directory.Exists(FilePath))
{
string[] files = Directory.GetFiles(@FilePath,"*.*");
count.Text = files.Length.ToString() + " PPL file(s) in " + FilePath;
}
we deploy the website to the server, everything is working on my local when
I open the IE to check how many files on the folder, but it is not working
on my boss computer(always find 0 file). we use same user na... 阅读全帖 |
|
t********k 发帖数: 808 | 3 用下面的代码,是一个JSP页面,假设文件名是down.jsp
System.out.println(filePath);
SmartUpload smartUpload = new SmartUpload();
smartUpload.initialize(pageContext);
smartUpload.setContentDisposition(null);
smartUpload.downloadFile(filePath);
filePath就是文件存放的位置和文件名
如果这个文件内容是空的,那么会下载down.jsp这个文件
当然内容是空的
在后台显示的filePath值是对的
还有谁碰到过这问题?
还有就是,如果你在IE里能直接打开一类文件,比如TXT
那下载此类文件会抛出异常
文件是存在的
在其它机器上不能在IE直接打开此类文件的是能下载的 |
|
d********g 发帖数: 10550 | 4 那代码里除了风格,别的常识错误太多了
第一file是内置函数,string是内置库。是可以强制赋值成别的对象,但是这种用法你
不捉急吗?那个组本来是做硬件的,Python用来写API,要不是我看到了顺手把关一下
,这种质量的code ship之后产品就卖出来了,还得WSN去折腾报告bug
第二个不用T/F而用0/1,这太明显的C霸王硬上弓了,捉急呀
第三字符串直接循环相加,虽然有些实现比如CPython是有优化的,但不是所有。这要
是循环十万遍,那可是要生成十万零一个字符串对象的(不说垃圾收集)
第四path join不用os.path.join(),直接字符串相加,这……就算100%肯定是在Linux
上运行,也不能这么山寨吧。我太为他捉急了
第五写Python的确实看不惯啰啰嗦嗦的写法。filepath那个就算这种错误的字符串操作
,也可以简化成这样:
filepath = '{0}/{1}{2}'.format(path, ascii_fname, '*' if nonascii else '')
或者:
filepath = '{0}/{1}{2}'.format(path, ... 阅读全帖 |
|
a******g 发帖数: 13519 | 5 程序如下,非常简单,好可惜呀。
public static void CountWordsFromTextFile(string filePath)
{
//string path = @"D:\test.txt";
string path = filePath;
char[] separator = new char[] { ' ', '\r', '\n', ''', '-', '"',
'.', ',', '(', ')' };
string[] words = System.IO.File.ReadAllText(path).Split(
separator, StringSplitOptions.RemoveEmptyEntries);
Dictionary dict = new Dictionary();
foreach (string word in words)
... 阅读全帖 |
|
y****i 发帖数: 12114 | 6 步骤:
1、用户输入文件名和路径;
2、程序检查是否已有该文件存在,
2 .1、如果存在,要求用户输入新文件名和路径,回到2;
2.2 、如果新文件名不存在,则生成该文件,运行下一段程序。
我的代码如下。我知道按照我的代码,只要输入新文件名,那个新文件立刻就存在了,
然后就又得输入新文件名,然后文件又存在了,进入死循环了。
该怎么写才能实现上述步骤?
谢谢指点。
Scanner keyboard=new Scanner(System.in);
//get file name
System.out.println("Please enter file name:");
String fileName=keyboard.nextLine();
//get file path
System.out.println("Please enter path:");
String filePath=keyboard.nextLine();
//creat... 阅读全帖 |
|
d********g 发帖数: 10550 | 7 下面这个捉急的片段,看有多少是用C风格/思路来写Python的,另外还有无法忍受的错
误/不推荐做法:
def strip_non_ascii(self, string):
''' Returns the string without non ASCII characters'''
s = ""
nonascii = 0
for c in string:
if ord(c) < 128:
s += c
else:
nonascii = 1
return (s, nonascii)
for fname in files:
(file, nonascii) = self.strip_non_ascii(fname)
if file == 'something':
continue
if nonascii == 1:
filepath = path + '/' + file + '*'
else:
... 阅读全帖 |
|
t***q 发帖数: 418 | 8 My friend's code in R:
da1=read.csv(paste(filepath,"file1.csv",sep=""))
da2=read.csv(paste(filepath,"file2.csv",sep=""))
da1 <- t(da1)
da1 <- as.vector(da1)
da2 <- t(da2)
da2 <- as.vector(da2)
info <- matrix(NA,nrow=length(da1),ncol=40)
position <- 1:length(da2)
for(i in 1:length(da1))
{
a=levenshteinSim(da1[i],da2)
pos=position[a==max(a)]
temp=c(i,pos,max(a),da1[i],da2[pos])
info[i,1:length(temp)] <- temp
if(i %% 500 ==0)
cat("#")
} |
|
|
|
z*****y 发帖数: 429 | 11 【 以下文字转载自 GreatPit 讨论区 】
发信人: mayaren (RumorsCatcher), 信区: GreatPit
标 题: 盛大的麻烦开始了吗???
发信站: BBS 未名空间站 (Fri Jul 9 15:37:13 2010, 美东)
Mr. Jun Tang put Shanda in BIG TROUBLE now.
Refer to the attached image.
It is copied from the Registration Statement of Shanda Interactive
Entertainment Ltd when the did IPO at Nasdaq. The link is here:
http://ipo.nasdaq.com/ViewFiling_frames.asp?filename=0001145549-04-000388.txt&filepath=\2004\04\02\
盛大的麻烦开始了吗??? |
|
|
|
M********r 发帖数: 278 | 14 http://www.qaib.com/public/downloadfile.aspx?filePath=freelook&
this report has been cited very often recently. The key finding is that
verage investor in all U.S. stock funds earned 3.7% annually over the past
30 years—a period in which the S&P 500 stock index returned 11.1% annually.
How so? "the biggest factor is that investors chase returns—jumping aboard
after a streak of hot performance and diving over the gunwales after it goes
bad. Because of that buy-high, sell-low behavior, investors i... 阅读全帖 |
|
a*s 发帖数: 1220 | 15 有人查了一下,唐某还是没有敢在美国造假,不过造了个假日本博士。
NASDAQ 文件:
http://ipo.nasdaq.com/ViewFiling_frames.asp?filename=0001145549-04-000388.tx
t&filepath=\2004\04\02\
JUN TANG has served as our president since February 2004. Prior to joining
us, Mr. Tang served as the president of Microsoft China Co., Ltd. from March
2002 to January 2004 and the general manager of Microsoft Asia product
support and service and Microsoft Global Technical Engineering Center from
January 1998 to March 2002. Mr. Tang holds a doctorate deg |
|
w**r 发帖数: 134 | 16 两个博士学位,真是会捣浆糊
a doctorate degree in electrical engineering from University of Pacific
Western,
a doctorate degree in electronics from Nagoya University, Japan, a master's
degree in electronics from Nagoya University
a bachelor's degree in physics from Beijing University of Posts and
Telecommunications
http://ipo.nasdaq.com/ViewFiling_frames.asp?filename=0001145549-04-000388.txt&filepath=\2004\04\02\
JUN TANG has served as our president since February 2004. Prior to joining
us, Mr. Tang served as |
|
c*********g 发帖数: 154 | 17 【 以下文字转载自 Movie 讨论区 】
发信人: LIEDV (LIEDV), 信区: Movie
标 题: 原创DV《不如归去》正式上线(内附下载方式)
发信站: BBS 未名空间站 (Sun Feb 20 18:56:13 2011, 美东)
L.I.E. Studio原创DV《不如归去》正式上线。炒作了这么久,这把玩真的啦!既然出
货了,我们也就不多废话了。好不好,要您说了算。
现阶段我们提供ftp与BT两种下载方式,下载版本为480p中英双语字幕版,单文件632M
,片长100分钟。
FTP下载地址与用户名、密码如下:
ftp://ftp.sunonus.net
username: D*************[email protected]
password: DreamsInBetween
在同一ftp服务器上,同时提供了《不如归去》BT种子。(很遗憾MITBBS的发帖规定附
件里不能直接发BT种子文件)。
在同一ftp服务器上,同时提供“石溪三部曲”前两部DV《芳邻》(2004)和《非线性
回归》(2007)的全片下载。
另外,一下网盘地址也提供BT种子打包下载。
"ht... 阅读全帖 |
|
|
b**********u 发帖数: 2817 | 19 贴个照片都不行,现在出现这样的问题:
Unable to initialize. Please verify that all filepaths and license strings
are valid. |
|
b*******s 发帖数: 26 | 20 给公公婆婆填160表,上传照片时总是出现如下错误。换了浏览器和计算机都是一样。
有人遇到过相同的问题吗?
"Unable to initialize. Please verify that all filepaths and license strings
are valid." |
|
o*******0 发帖数: 699 | 21 改的size小于要求的,可是一直出现“Unable to initialize. Please verify that
all filepaths and license strings are valid.”怎么办啊 |
|
|
y********n 发帖数: 62 | 23 DS160 不能上传照片, 总是出错。。
Unable to initialize. Please verify that all filepaths and license strings
are valid.
用过各种办法,改变照片名字,路径,都不行,大家遇到过这样问题么?怎么办? |
|
|
z******0 发帖数: 302 | 25 【 以下文字转载自 Movie 讨论区 】
发信人: LIEDV (LIEDV), 信区: Movie
标 题: 原创DV《不如归去》正式上线(内附下载方式)
发信站: BBS 未名空间站 (Sun Feb 20 18:56:13 2011, 美东)
L.I.E. Studio原创DV《不如归去》正式上线。炒作了这么久,这把玩真的啦!既然出
货了,我们也就不多废话了。好不好,要您说了算。
现阶段我们提供ftp与BT两种下载方式,下载版本为480p中英双语字幕版,单文件632M
,片长100分钟。
FTP下载地址与用户名、密码如下:
ftp://ftp.sunonus.net
username: D*************[email protected]
password: DreamsInBetween
在同一ftp服务器上,同时提供了《不如归去》BT种子。(很遗憾MITBBS的发帖规定附
件里不能直接发BT种子文件)。
在同一ftp服务器上,同时提供“石溪三部曲”前两部DV《芳邻》(2004)和《非线性
回归》(2007)的全片下载。
另外,一下网盘地址也提供BT种子打包下载。
"ht... 阅读全帖 |
|
|
|
|
|
|
|
|
m*****n 发帖数: 5245 | 33
他自己已经承认了,就是这所学校。
http://ipo.nasdaq.com/ViewFiling_frames.asp?filename=0001145549-04-000388.txt&filepath=\2004\04\02\
JUN TANG has served as our president since February 2004. Prior to joining
us, Mr. Tang served as the president of Microsoft China Co., Ltd. from March
2002 to January 2004 and the general manager of Microsoft Asia product
support and service and Microsoft Global Technical Engineering Center from
January 1998 to March 2002. Mr. Tang holds a doctorate degree in electrical
engineer |
|
a*****9 发帖数: 790 | 34 【 以下文字转载自 LeisureTime 讨论区 】
发信人: musicbug (早睡早起), 信区: LeisureTime
标 题: Re: 先睹为快-不如归去首映观后感(轻微剧透)
发信站: BBS 未名空间站 (Mon Feb 21 22:53:34 2011, 美东)
发信人: LIEDV (LIEDV), 信区: Movie
标 题: 原创DV《不如归去》(更新下载)
发信站: BBS 未名空间站 (Sun Feb 20 18:56:13 2011, 美东)
L.I.E. Studio原创DV《不如归去》正式上线。炒作了这么久,这把玩真的啦!既然出
货了,我们也就不多废话了。好不好,要您说了算。
现阶段我们提供在线观看、网盘、ftp跟BT下载方式,下载版本为480p中英双语字幕版
,单文件632M,片长100分钟。
《不如归去》在线观看(清晰度较低)
优酷
http://v.youku.com/v_show/id_XMjQ1NDM2MjI4.html
56
http://www.56.com/u13/v_NTg0Nzg5MDY.html
土豆
http://www.... 阅读全帖 |
|
s*****w 发帖数: 1527 | 35 The target designer version is 2.0.1500.0,
believe it's "windows standard 2009".
want to register 1.ocx, 2.dll for an application,
so need to add them as "FBA DLL" resources for this component.
The problem is, i can add the "2.dll" resource.
When i try to add "1.ocx", it keeps on saying
"A resource with identical properties of FBA DLL/Com registration
already exists".
For these 2 FBA, both use "...\regsvr32.exe" as FilePath.
The only thing different is the arguments, (one takes 2.dll, the other
... 阅读全帖 |
|
|
c********e 发帖数: 42175 | 37 【 以下文字转载自 Joke 讨论区 】
发信人: churchance (无时佛梵), 信区: Joke
标 题: 如果有没看原创新片《不如归去》的不要错过!!
发信站: BBS 未名空间站 (Wed Feb 23 02:44:41 2011, 美东)
发信人: LIEDV (LIEDV), 信区: Movie
标 题: 《不如归去》(下载更新)
发信站: BBS 未名空间站 (Sun Feb 20 18:56:13 2011, 美东)
L.I.E. Studio原创DV《不如归去》正式上线。炒作了这么久,这把玩真的啦!既然出
货了,我们也就不多废话了。好不好,要您说了算。
现阶段我们提供在线观看、网盘、ftp跟BT下载方式,下载版本为480p中英双语字幕版,单文件632M,片长100分钟。
《不如归去》在线观看
youtube
http://www.youtube.com/watch?v=MN2WrA8TGjE
建议选择480p设置以达到最好效果。同时请注意本片含外挂中英双语字幕,可以通过窗口右下角标识“CC”的按钮打开或者关闭。
成功登上新浪博客头版,和原创大片头条:
htt... 阅读全帖 |
|
|
|
|
|
|
|
|
|
|
|
|
|