问题列表 - 第22431页

是否有CPAN的Python版本?

所以我已经使用Perl好几年了,我开始涉足Python了.是否有一种CPAN但是对于Python?在Python中管理模块的常规方法是什么?任何方向将不胜感激.FWIW我使用Linux,因此仅限Windows的解决方案对我来说并不实用.

python

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

将对象插入集合中

我想在这样的集合中插入一个向量:

set<vector<prmEdge> > cammini;
vector<prmEdge> vecEdge;
cammini.insert(vecEdge);
Run Code Online (Sandbox Code Playgroud)

我有这样的编译错误:

prmPlanner.cpp:1285:   instantiated from here
/usr/include/c++/4.2/bits/stl_algobase.h:853: error: no match for ‘operator<’ in ‘__first1.__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator* [with _Iterator = const prmEdge*, _Container = std::vector<prmEdge, std::allocator<prmEdge> >]() < __first2.__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator* [with _Iterator = const prmEdge*, _Container = std::vector<prmEdge, std::allocator<prmEdge> >]()’
/usr/include/c++/4.2/bits/stl_algobase.h:855: error: no match for ‘operator<’ in ‘__first2.__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator* [with _Iterator = const prmEdge*, _Container = std::vector<prmEdge, std::allocator<prmEdge> >]() < __first1.__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator* [with _Iterator = const prmEdge*, _Container = std::vector<prmEdge, std::allocator<prmEdge> >]()’
make[1]: *** [prmPlanner.o] Errore …
Run Code Online (Sandbox Code Playgroud)

c++

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

是否可以搜索dbml图?

这对几个表来说不是问题,但是当我在dbml图上有大量表时,我必须进行平移和缩放才能找到我要查找的表.有没有办法搜索dbml图,以便它自动转到我搜索的表?

linq-to-sql visual-studio

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

如何在PHP中读取Excel数据(office 2007 xlsx)?

如何在PHP中读取Excel数据(office 2007 xlsx)?这有什么图书馆吗?

php

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

确定C++数组的正确大小

我需要能够根据文件中的字节数设置数组的大小.

例如,我想这样做:

// Obtain the file size.
    fseek (fp, 0, SEEK_END);
    size_t file_size = ftell(fp);
    rewind(fp);

// Create the buffer to hold the file contents.
    char buff[file_size];
Run Code Online (Sandbox Code Playgroud)

但是,我得到一个编译时错误,说缓冲区的大小必须是常量.

我怎么能做到这一点?

c++

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

是否有任何生产质量的JSF 2实现?

是否有任何生产质量的JSF 2实现?如果是这样,他们是什么?

java jsf jsf-2

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

ubuntu webkit安装

我是ubuntu的新手,我想安装webkit 1.0作为开发版,但我不知道我该怎么办?

ubuntu webkit

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

C#string []到int []

有没有办法将字符串数组转换为int数组就像在C#中将字符串解析为int一样简单.

int a = int.Parse(”123”);
int[] a = int.Parse(”123,456”.Split(’,’)); // this don't work.
Run Code Online (Sandbox Code Playgroud)

我尝试使用int类的扩展方法自己添加这个功能,但它们不会变成静态的.

关于如何做到这一点快速而美观的任何想法?

c# arrays string int parsing

7
推荐指数
3
解决办法
2637
查看次数

无法打开目录,或者我的(Perl)代码出了什么问题?

我有一个文件名logspath.txt,它包含在机器上的logs目录路径中.每行一个目录.虽然该目录存在,但Perl说它没有.

#!/usr/bin/perl -w

open FILE,"logspath.txt" or die $!;
while (<FILE>){
   print $_;
   opendir ($DIR,chomp($_)) or die $!;
Run Code Online (Sandbox Code Playgroud)

当我运行脚本时,我得到:

/home/amosa/
No such file or directory at archive.pl line 6, <FILE> line 1.
Run Code Online (Sandbox Code Playgroud)

列出目录:

~$ ls -l /home/amosa/
total 6
drwxr-xr-x  11 amosa    prodapp     1024 Mar  2 12:49 deploy
drwxr-xr-x   2 amosa    prodapp      512 Mar  2 12:39 lib
-rw-r--r--   1 amosa    prodapp      787 Mar  2 11:02 s
Run Code Online (Sandbox Code Playgroud)

有什么建议?

perl opendir

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

如何从Python中删除字符串末尾的空格?

我需要删除字符串中单词后面的空格.这可以在一行代码中完成吗?

例:

string = "    xyz     "

desired result : "    xyz" 
Run Code Online (Sandbox Code Playgroud)

python

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

标签 统计

c++ ×2

python ×2

arrays ×1

c# ×1

int ×1

java ×1

jsf ×1

jsf-2 ×1

linq-to-sql ×1

opendir ×1

parsing ×1

perl ×1

php ×1

string ×1

ubuntu ×1

visual-studio ×1

webkit ×1