小编War*_*avy的帖子

是否有一个可靠的python库用于获取BibTex条目并将其输出为特定格式?

我正在使用Python和Django开发一个网站.我想拿一个BibTex条目并以3种不同的格式输出它,MLA,APA和Chicago.是否有一个库已经这样做了,或者我将不得不手动进行字符串格式化?

python django bibtex

10
推荐指数
2
解决办法
4594
查看次数

你如何在Ubuntu的终端上运行一个计划程序?

我搜索过,我似乎无法找到这个非常基本的问题.我是mit-scheme的新手,基本上我想重新创建hello world,但不是通过提示进行,我希望有一个包含以下代码的scheme文件:

 (define hello-world
 (lambda ()
     (begin
        (write 'Hello-World)
        (newline)
        (hello-world))))
Run Code Online (Sandbox Code Playgroud)

问题是我错过了最简单的问题:方案文件的文件扩展名是什么?如何通过方案运行该文件?

我尝试过.ss和.scm,但每次尝试方案hello-world.scm时都说:

;Warning: Invalid keyword: "hello-world.scm"

;Warning: Unhandled command line options: ("hello-world.scm")
Run Code Online (Sandbox Code Playgroud)

ubuntu scheme

8
推荐指数
2
解决办法
8823
查看次数

如何为 C# 生成输出为 Azure DevOps Wiki 的 Markdown 的文档?

我一直在使用 DocFX 为 C# 生成代码文档,并且在大多数情况下发现它取得了很大的成功。这些文章很灵活,我真的很喜欢我可以使用 Markdown 来维护它们,同时让它们与 API 参考并存。我还花时间记录 Markdown 中的演练并构建 CI 管道。

我试图解决的问题是,我需要想办法让我的代码文档(xml 注释)输出为 markdown 而不是 html,以便它可以由 markdown wiki 解决方案托管,特别是 Azure DevOps(又名 TFS) . Azure DevOps Wiki 似乎也与来自 GitHub 的 gh-pages 非常相似,所以我对类似的解决方案感兴趣,我可能能够在 Azure DevOps 中工作。DocFX 没有解决这个问题,因为输出是 .html 而不是 markdown

Microsoft 的所有文档都侧重于手工编写文档。我对根据代码中的 xml 注释生成文档很感兴趣。

c# documentation markdown azure-devops docfx

8
推荐指数
1
解决办法
1864
查看次数

ImportError:没有模块名称'matplotlib'Python 3.3

我是python的新手(2天前开始),我已经到了我想用matplotlib进行程序的地步.我正在使用python 3.3,在按照安装matplotlib的说明后,我已经完成了以下步骤:

sudo apt-get install python-pip
sudo pip install matplotlib
Run Code Online (Sandbox Code Playgroud)

返回此导入错误:

ImportError: No module named 'matplotlib'
Run Code Online (Sandbox Code Playgroud)

经过一些研究,我试过这个:

sudo apt-get update
sudo apt-get build-dep python-matplot
Run Code Online (Sandbox Code Playgroud)

我仍然得到相同的导入错误.我在这里找到了这个页面:https://askubuntu.com/questions/427708/matplotlib-error-no-module-named-matplotlib-even-though-it-is-installed

这给我的印象是我安装了不正确的matplotlib版本,我需要v1.2或更高版本.有人可以向我解释我需要做些什么才能使用matplotlib并且不会在Python 3.3中出现此错误?

我目前正在使用Ubuntu 12.04.

谢谢.

python matplotlib python-3.x

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

如何使用C#在SQL表中查找用户名和密码

我目前在一个名为"users"的sql server上有一个表,分别包含以下列/ datatype:

username/nvarchar(max)
email/nvarchar(max)
password/nvarchar(max)
Run Code Online (Sandbox Code Playgroud)

我的桌子有一排:

[test][test@gmail.com][test]
Run Code Online (Sandbox Code Playgroud)

我使用以下代码搜索表.我取用户名(实际上就是电子邮件)并拆分它以便它成为测试.然后我尝试选择已测试的行作为用户名.一旦我创建了阅读器,我试图将表中的电子邮件与表中的用户名和密码进行比较,并使用密码:

  using (SqlConnection conn = new SqlConnection())
  {
        conn.ConnectionString ="connectionstring";
        conn.Open();
        //grab the username and password from the request
        string username = req.Form[0]; //test@gmail.com
        string password = req.Form[1]; //test

        if (!String.IsNullOrEmpty(username) && !String.IsNullOrEmpty(password))
        {
            //hash the password
            //lookup the password and username in the table
            SqlCommand command = new SqlCommand(String.Format("SELECT username, email, password FROM users WHERE username = '@{0}'", username.Split('@')[0]), conn);
            SqlDataReader reader = command.ExecuteReader();

            while(reader.Read())//THIS always evaluates to false
            {
                if …
Run Code Online (Sandbox Code Playgroud)

.net c# sql-server

0
推荐指数
1
解决办法
3106
查看次数