小编Gom*_*thi的帖子

GCC详细模式输出说明

我是linux的新手.任何人都可以向我解释我的hello world程序的以下详细模式输出吗?另外,做了什么文件crt1.o,crti.o,crtend.o,crtbegin.ocrtn.olclgcc做什么?还欢迎任何其他解释性链接.

$ gcc -v hello.c

Reading specs from /usr/lib/gcc-lib/i686/3.3.1/specs
Configured with: ../configure --prefix=/usr
Thread model: posix
gcc version 3.3.1
 /usr/lib/gcc-lib/i686/3.3.1/cc1 -quiet -v -D__GNUC__=3 
 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=1 
 hello.c -quiet -dumpbase hello.c -auxbase hello -Wall
 -version -o /tmp/cceCee26.s
GNU C version 3.3.1 (i686-pc-linux-gnu)
 compiled by GNU C version 3.3.1 (i686-pc-linux-gnu)
GGC heuristics: --param ggc-min-expand=51 
 --param ggc-min-heapsize=40036
ignoring nonexistent directory "/usr/i686/include"
#include "..." search starts here:
#include <...> search …
Run Code Online (Sandbox Code Playgroud)

linux gcc verbose

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

C程序找到当前文件名

我想用C程序显示我当前的C文件.我知道可执行文件的名称可以通过argv[0].但我想要文件名作为'hello.c'例子.可能吗?

c file

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

itext包中的错误

我下载itext-1.3并放入lib文件夹中jdk 1.6.0.并在系统变量中添加了lib文件夹作为CLASSPATH.

但是当我运行程序时,我收到错误:

包com.itextpdf.text不存在.

同样适用于所有其他包.我犯了什么错误?

import java.io.FileOutputStream;
import java.io.IOException;

import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.pdf.PdfWriter;

/**
 * First iText example: Hello World.
 */
public class HelloWorld {

    /** Path to the resulting PDF file. */
    public static final String RESULT
        = "E:/hello.pdf";

    /**
     * Creates a PDF file: hello.pdf
     * @param    args    no arguments needed
     */
    public static void main(String[] args)
        throws DocumentException, IOException {
        new HelloWorld().createPdf(RESULT);
    }

    /**
     * Creates a PDF document. …
Run Code Online (Sandbox Code Playgroud)

java swing itext

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

在另一个变量中插入变量

我有三个文本框ct1,ct2,ct3.我必须使用for循环1到3并检查文本框是否为空.那么,在for循环中,我该如何表示它?例如,

for(i=0;i<=3;i++)
{
    if(ct+i.getText()) // I know I'm wrong
     {
     }

}
Run Code Online (Sandbox Code Playgroud)

java variables swing

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

模块参数权限

我是内核编程的新手。当我浏览时module_param,我对权限值 0 感到困惑。有人解释说,它不会在 sysfs 中获得条目,而其他人S_IRUGO会获得条目。我无法理解这个概念。

perm 值 0 表示什么?我们什么时候需要 sysfs 条目?有什么必要呢?

请指导我。提前致谢。

kernel module kernel-module

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

更改JTable的背景颜色

我添加了一个表,但问题是,面板没有显示其背景颜色.我试过设置滚动窗格背景颜色等.但它不起作用.框架上有一个"验证"按钮,单击该按钮可在其下方显示一个表格.在单击之前,表格将显示的部分为灰色.我希望整个部分是象牙背景.请帮我诊断问题.

try
{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conn1=DriverManager.getConnection("jdbc:odbc:vasantham","","");
    Statement st1=conn1.createStatement();
    ResultSet rs1=st1.executeQuery("select * from try where DATEDIFF('d',NOW(),exdate) &lt; 61 order by tname");
    ResultSetMetaData md1=rs1.getMetaData();
    int cols1=md1.getColumnCount();
    model1=new DefaultTableModel();
    model1.addColumn("Purpose");
    model1.addColumn("Name");
    model1.addColumn("Composition");
    model1.addColumn("Expiry");
    model1.addColumn("Stock");
    model1.addColumn("Cost");
    model1.addColumn("Type");
    model1.addColumn("Supplier");
    model1.addColumn("Supplier Number");
    model1.addColumn("Rack");
    table1=new JTable(model1);
    Color ivory=new Color(255,255,208);
    table1.setOpaque(false);
    table1.setBackground(ivory);
    String[] tabledata1=new String[cols1];
    int i=0;
    while(rs1.next())
    {
        for(i=0;i&lt;cols1;i++)
        {
            if(i==3)
            {
                Date intr1=(rs1.getDate(i+1));
                tabledata1[i]=formatter1.format(intr1);
            }
            else
            tabledata1[i]=rs1.getObject(i+1).toString();
        }
        model1.addRow(tabledata1);
    }
    JScrollPane scroll1 = new JScrollPane(table1);
    scroll1.setBackground(new Color(255,255,208));
    scroll1.getViewport().setBackground(ivory);
    panel1.setLayout(new BorderLayout());
    panel1.setBackground(ivory);
    table1.getTableHeader().setBackground(ivory);
    panel1.add(scroll1,BorderLayout.CENTER);
    frame1.add(panel1,BorderLayout.CENTER);
    conn1.close();
}
Run Code Online (Sandbox Code Playgroud)

产量

java swing background jtable jscrollpane

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

标签 统计

java ×3

swing ×3

background ×1

c ×1

file ×1

gcc ×1

itext ×1

jscrollpane ×1

jtable ×1

kernel ×1

kernel-module ×1

linux ×1

module ×1

variables ×1

verbose ×1