小编Hal*_*acı的帖子

anaconda .conda 文件夹从 /home/usrxy 移动到其他位置

我有一个安装了 Anaconda3 的 RHEL 服务器。系统中的每个用户在/home/文件夹中获得 2 GiG 空间,在安装的驱动器中获得另一个大文件夹。当用户尝试使用conda create -n my_env它创建 conda 环境时,它会填充文件.conda夹中的所有 .tar 文件并且安装中断。有没有办法为.conda文件夹指定自定义位置。

最好的贾根

python anaconda conda

6
推荐指数
3
解决办法
7820
查看次数

C#:使用StreamReader从txt文件中读取行,但Peek()返回-1,即使还有很多行

我使用StreamReader的Peek()方法来检查是否需要处理更多行.我的文件中有超过1000行,但Peek()在到达#750行时突然返回-1.我查了一下,但#750和#751之间似乎没有区别.即使我删除了#750和751行,它仍会在其他行中分解.

以下是我的代码供您参考:

try
{
    String ftpserver = ftp + filename;
    reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(ftpserver));
    reqFTP.UsePassive = false;
    reqFTP.UseBinary = true;
    reqFTP.Proxy = null;
    reqFTP.Credentials = new NetworkCredential(username, password);

    reqFTP.Method = WebRequestMethods.Ftp.DownloadFile;
    response = (FtpWebResponse)reqFTP.GetResponse();
    stream = response.GetResponseStream();
    reader = new StreamReader(stream, ConfigHelper.MyEncoding);
    while (reader.Peek() > -1)
    {
        string x = reader.ReadLine();
        if (x != null)
        {
          //.......
         }
    }
}
catch (Exception ex)
{
}
finally
{
    if (reader != null)
        reader.Close();
    if (response != null)
        response.Close();
}
Run Code Online (Sandbox Code Playgroud)

我试过了while …

c# peek

3
推荐指数
2
解决办法
2万
查看次数

标签 统计

anaconda ×1

c# ×1

conda ×1

peek ×1

python ×1