我正在使用Ubuntu 10.04,并研究内核对象的编程.
我遇到了一些相当复杂的结构,我很难阅读,所以我想我会尝试找一些可以帮助我想象它们的工具.
到目前为止我唯一能找到的是VCG,它有一个C Struct Visualization Example,如下所示:

这看起来像我想要使用的东西.
第一件事是,为Ubuntu打包的最后一个VCG是耐用的vcg(1.30debian-6) - 但.deb包可以在没有问题的情况下下载并安装在Ubuntu Lucid中.
但是,看起来这个包只是一个VCG 查看器(类似于vcgviewer,我猜).该vcgviewer页笔记:
To generate compiler graph data with newest gcc compilers use:
gcc -g -da -dv -fdump-tree-original-raw -fdump-tree-all-all
Run Code Online (Sandbox Code Playgroud)
因此,显然我必须gcc在编译时使用这些开关,以从C源生成.vcg图形文件.
然而,问题是我正在构建一个只引用Linux头的内核模块 - 因为我尽量避免重新编译整个内核.看来,只要我尝试-fdump-tree-...在该上下文(内核模块)中使用开关,gcc就想开始编译内核的其余部分!(并且在.vcg图的编译和生成中显然都失败了 - 因为我没有内核源代码,只有头文件)
所以我的问题是 - 是否有一个工具,可以生成.vcg或.dot结构图 - 只需使用纯文本头文件作为输入?(它不必解析所有依赖项 - 只是在同一目录中的头文件中)
编辑:对我来说,后端特别是.vcg或.dot对我来说实际上并不重要,我提到它们只是因为到目前为止我找到了它们; 任何类型的软件,允许类似的结构可视化,无论后端,欢迎:)
PS:请注意,如果您不想使用VCG查看器查看.vcg图表,则可以将.vcg格式转换为.dot格式,graphviz而是使用可视化.什么工作对我来说是使用图形易- search.cpan.org的perl-这第一次拿到打包在Ubuntu与小牛版,作为libgraph易-perl的(然而,的.deb文件可以-再-下载并安装不Lucid的问题).libgraph-easy-perl …
我有一个结构,有一个项目列表和一些关于结构的变量
我想检查列表中的枚举是否具有特定值.
喜欢
struct.list.havevalue == 5;
我如何计算结构项目列表中枚举中具有特定值的所有人
我有一个应用程序(服务器应用程序)需要大量的日志记录实现,并且不应该通过启用日志记录来影响性能.
应用程序具有执行工作的工作线程的线程池.本来我打算只登录这些线程池线程,但是我需要几乎锁定整个线程,所以我的'多线程'应用程序就是这样.
我一直在寻找更好的方法来记录多个线程,我发现使用队列或环形缓冲区可能是一个想法.
任何人都可以建议(可能来自经验)为多线程应用程序实现有效日志记录(主要是文件)的任何好方法,这些应用程序也应保持一定的性能?
我想使用Boost Logging Library.
我想找到可以假设名为COPIA的表中包含的名为CLOB_COLUMN(类型为CLOB)的列的不同CLOB值.
我选择了一个PROCEDURAL方法来解决这个问题,但我更愿意给出一个简单的SELECT,如下所示:SELECT DISTINCT CLOB_COLUMN FROM TABLE避免错误"ORA-00932:不一致的数据类型:预期 - 得到了CLOB"
我怎样才能做到这一点?
提前谢谢您的友好合作.这是我想到的程序方式:
-- Find the distinct CLOB values that can assume the column called CLOB_COLUMN (of type CLOB)
-- contained in the table called COPIA
-- Before the execution of the following PL/SQL script, the CLOB values (including duplicates)
-- are contained in the source table, called S1
-- At the end of the excecution of the PL/SQL script, the distinct values of the column called CLOB_COLUMN
-- can be find in …Run Code Online (Sandbox Code Playgroud) List listOne = new LinkedList<Shxx>();
List<Shxx> listTwo = new LinkedList<Shxx>();
List listThree = new LinkedList();
List<Shxx> listFour = new LinkedList();
Run Code Online (Sandbox Code Playgroud) 有人知道如何从现有的XML模式(XSD文件)生成JSON模式吗?有没有可用的工具?
我在Visual Studio中构建了一个程序.该程序创建一个日志文件,并在程序运行时写入.因此,我构建了一个安装程序(setup-project),它应该为我的程序文件夹设置写权限,无论哪个用户使用该程序.目前它看起来像这样:
// ...
}
InitializeComponent();
string folder = Directory.GetCurrentDirectory();
DirectorySecurity ds = Directory.GetAccessControl(folder);
ds.AddAccessRule(new FileSystemAccessRule("Everyone", //Everyone is important
//because rights for all users!
FileSystemRights.Read | FileSystemRights.Write, AccessControlType.Allow));
}
// ...
Run Code Online (Sandbox Code Playgroud)
在最后两行中,我得到了一个System.SystemException:"Die Vertrauensstellung zwischenderprimärenDomäneunddervertrauenswürdigenDomänekonntenicht hergestellt werden."
[翻译:"无法建立主域和可信域之间的信任关系."]
堆栈跟踪如下所示:
bei System.Security.Principal.NTAccount.TranslateToSids(IdentityReferenceCollection sourceAccounts, Boolean& someFailed)
bei System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean& someFailed)
bei System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess)
bei System.Security.Principal.NTAccount.Translate(Type targetType)
bei System.Security.AccessControl.CommonObjectSecurity.ModifyAccess(AccessControlModification modification, AccessRule rule, Boolean& modified)
bei System.Security.AccessControl.CommonObjectSecurity.AddAccessRule(AccessRule rule)
bei System.Security.AccessControl.FileSystemSecurity.AddAccessRule(FileSystemAccessRule rule)
Run Code Online (Sandbox Code Playgroud)
你知道我能做什么吗?谢谢
我成功地获得了一个显示2个坐标之间路径的谷歌静态地图.
问题是绘制的路径只是两点之间的直线.
我读到这是为了能够在静态谷歌地图上绘制2点之间的"路线",就像在道路和城市地理而不是直线之后,我需要为路径添加所有坐标/十字路口.
有谁知道解决这个问题的简单解决方案?
干草,我有这样的标记
<div id="some-id">
<h2><a href="#">Title</a></h2>
</div>
Run Code Online (Sandbox Code Playgroud)
和一些像这样的jQuery
$(this).parent().parent().attr("id")
Run Code Online (Sandbox Code Playgroud)
$(this)指的是'h2'中的'a'标签
是否有一种更简单的方法来选择父div而不使用parent()两次.我试过了
$(this).parent("div").attr("id")
Run Code Online (Sandbox Code Playgroud)
但它不起作用.
谢谢
我有两个python应用程序.我需要在它们之间发送命令和数据(在两个进程之间).最好的方法是什么?
一个程序是一个守护程序,它应该接受来自另一个GUI应用程序的命令和参数.
如何使守护进程监控来自GUI的命令,同时使其成为工作?我更喜欢解决方案是跨平台.
ps我使用pyqt4和python.