小编Ada*_*dam的帖子

绘图泥图

我正在试图绘制一些泥地图.我使用python和graphviz得到类似的东西:

http://img23.imageshack.us/img23/5222/arrasz.png

正如您所看到的,我们有一些位置并且进入N/S/W/E/Up/Down我们将前往其他位置.

用graphviz绘制这张地图是否有可能将北方位置设置为南方,而位于西方位置右侧的东方位置?

我的意思是这样的:

some        --- E --->   some
location   <--- W ---    location 2
                            .
                           / \   |
                            |    |

                            N    S

                            |    |
                                \ /   
                                 `
                          some location 3
Run Code Online (Sandbox Code Playgroud)

或者也许有一些比graphviz更好的自动绘制工具?

python visualization graph graphviz mud

4
推荐指数
1
解决办法
1582
查看次数

Git 删除提交者信息

我在 github.com 上开始了一些项目。我正在两台机器上工作。我做了这样的事情:

  1. 在github上创建项目,
  2. 在 Machine1 上从 github 克隆项目,
  3. 在 Machine1 上做了一些提交,
  4. 在 Machine2 上创建了存储库,
  5. 将更改从 Machine1 推送到 Machine2 和 github。

第二天我在 Machine2 上工作。我在那里有不同的配置,所以我正在使用“--author=something”参数进行提交。完成工作后,我将更改推送到 Machine1。

我将我的更改从 Machine1 推送到 github。我可以看到在 Machine1 上完成的提交在历史记录中提交了正确的 Author 和来自 Machine1 的提交者提交。我不想公开这个提交者提交的文件。我怎样才能删除它?

暂时我在 Machine1 上做了:

git reset --hard <commit before changes on Machine1>
git push -f github master
Run Code Online (Sandbox Code Playgroud)

但看起来获取提交者信息仍然是可能的。如何永久删除它。

此致,

亚当

git version-control

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

带链接器和DLL的MSVC++ 2008问题

我正在写一些使用xmlrpc-c项目的dll(http://xmlrpc-c.sourceforge.net/).我使用MSVC++ 2008下载并编译了xmlrpc-c.设置:

xmlrpc-c建筑设置

现在我正在尝试构建我的DLL并将其与xmlrpc-c链接.我正在使用设置: dll建筑设置

我收到链接器错误:

------ Build started: Project: [...], Configuration: Debug Win32 ------
Linking...
msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in xmlrpccppD.lib(value.obj)
msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in xmlrpccppD.lib(value.obj)
msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in xmlrpccppD.lib(value.obj)
msvcprtd.lib(MSVCP90D.dll) : …
Run Code Online (Sandbox Code Playgroud)

c c++ dll linker visual-c++

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

此问题的智能语法

我有清单清单.让我们这样想一想:

somelist = [ 
               [1, 2, 3],
               [4, 8, 2],
               [7, 8, 4, 8, 2],
           ]
Run Code Online (Sandbox Code Playgroud)

这里我的列表包含3个列表.有列表,len(list) == 3我想做这样的事情:

list1 = somelist[0]
list2 = somelist[1]
list3 = somelist[2]

for l1 in list1:
    for l2 in list2:
        for l3 in list3:
            function(something=[l1, l2, l3])
Run Code Online (Sandbox Code Playgroud)

但我的名单可以2 <= len(somelist) <= 10.所以,如果我的名单必须len(somelist) == 4这样做:

list1 = somelist[0]
list2 = somelist[1]
list3 = somelist[2]
list4 = somelist[3]

for l1 in list1:
    for l2 in list2:
        for l3 in list3: …
Run Code Online (Sandbox Code Playgroud)

python

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

标签 统计

python ×2

c ×1

c++ ×1

dll ×1

git ×1

graph ×1

graphviz ×1

linker ×1

mud ×1

version-control ×1

visual-c++ ×1

visualization ×1