小编tin*_*tes的帖子

html代码中的字体大小

  <html>
  <tr>
  <td style="padding-left: 5px;padding-bottom:3px; font size="35;""> <b>Datum:</b><br/>
                            November 2010 </td>
  </html>
Run Code Online (Sandbox Code Playgroud)

我的代码是否正确?我想增加第一行的字体.不知道我是否必须把2英寸放在这里.它似乎不起作用.

html font-size

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

素数c#

我是C#的新手.我想编写类似的东西,如果用户将在文本框中输入任何整数,则在列表框中显示素数.(这意味着,如果他们写10,它将显示0-10的素数,或20-20的素数等).

在编程之前,我应该先考虑什么?我知道互联网上有很多例子,但首先我想知道我需要什么?

谢谢你的提示;-)

===谢谢你们.所以你建议最好先在Console应用程序中做到这一点?我使用控制台应用程序做了一个"For Loop"的例子非常简单,但是当我尝试在Windows窗体应用程序中执行它时,我不确定如何实现它.我担心如果我继续在控制台中做示例,那么我将很难在Windows Form Apps中执行此操作.你怎么看?

======再次问好,

我的代码需要一些反馈:

        Console.WriteLine("Please enter your integer: ");
        long yourInteger;
        yourInteger = Int32.Parse(Console.ReadLine());

        //displaying the first prime number and comparing it to the given integer
        for (long i = 2; i <= yourInteger; i = i + 1)
        {
            //Controls i if its prime number or not
            if ((i % 2 != 0) || (i == 2))
            {
                Console.Write("{0} ", i);
            }

        }
Run Code Online (Sandbox Code Playgroud)

c# primes

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

如何使用字体颜色html

我想在这里使用字体颜色.但似乎不知道在哪里放代码:

 <html>
 <tr>
 <td style="padding-left: 5px;"> 11.15 - 12.00 </td>
 <td style="padding-left: 5px; padding-bottom:3px;"> <b> TEST </b><br/></td>
 </tr>
 </html>
Run Code Online (Sandbox Code Playgroud)

html colors

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

listview开放目录

我对C#很新.我的老板让我用listview作为文件浏览器编写了一些代码.我试了一下它似乎有效.此代码用于打开驱动器中的文件并将其显示在listView上.这很简单.我还做了一个额外的功能,可以清除listView中显示的项目.我想添加其他功能,我也可以打开目录,而不仅仅是文件.顺便说一句,这是我的代码示例:

    private void btnOpen_Click(object sender, EventArgs e)
    {
        string strSelectedPath;

        folderBrowserDialog1.ShowDialog();
        strSelectedPath = folderBrowserDialog1.SelectedPath;

        label1.Text = strSelectedPath;



        DirectoryInfo di = new DirectoryInfo(strSelectedPath);
        FileInfo[] files = di.GetFiles();

        foreach (FileInfo file in files)
        {
            listView1.Items.Add(file.Name);
        }
    }

    private void btnClear_Click(object sender, EventArgs e)
    {

        listView1.Items.Clear();
        label1.Text="";
    }
Run Code Online (Sandbox Code Playgroud)

你能告诉我怎么样吗?

c#

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

你在html中称之为灰线的是什么?

你在html中称之为"灰线"是什么,你可以像分隔符一样使用它?

谢谢

html line

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

DevExpress Microsoft Visual C#

有人熟悉Microsoft Visual C#中的DevExpress吗?

我的老板给了我学习的代码,这段代码有DevExpress 8.3的版本.我想在我的笔记本电脑中打开这个代码,该笔记本已经有一个版本的DevExpress 9.1这是一个查找文件的问题吗?非常感谢!

问候tintincute

.net c# devexpress

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

将字符串转换为整数

我的代码需要帮助.我想在我的文本框中只编写数字/整数,并希望在我的列表框中显示它.

我的代码是否按顺序排列?这似乎给出了一个错误.

    int yourInteger;
    string newItem;

    newItem = textBox1.Text.Trim();

    if (newItem == Convert.ToInt32(textBox1.Text))
    {
        listBox1.Items.Add(newItem);
    }
Run Code Online (Sandbox Code Playgroud)

====更新:

这就是我的代码现在的样子.我的问题是,listBox可以处理数据类型"long"吗?因为当我输入数字20,000,000时,我只得到一小时玻璃20分钟.但是当我用控制台尝试这个时,我得到了答案.所以我不确定哪种元素可以处理数据类型"long".

    string newItem;
    newItem = textBox1.Text.Trim();

    Int64 num = 0;
    if(Int64.TryParse(textBox1.Text, out num))
    {
        for (long i = 2; i <= num; i++)
        {
            //Controls if i is prime or not
            if ((i % 2 != 0) || (i == 2))
            {
                listBox1.Items.Add(i.ToString());
            }

        }
    }


    private void btnClear_Click(object sender, EventArgs e)
    {
        listBox1.Items.Clear();
    }
Run Code Online (Sandbox Code Playgroud)

.net c# string integer

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

如何执行jQuery代码

我有朋友提供的jQuery代码,我不知道如何使它工作.我被告知我可以将其保存为html,因为代码有一个引用作为外部但是当我这样做时它没有用.

这是代码:

<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
<title>tyu</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css"> 
#tintin
{
    position:relative;
color:white;
font-size:18pt;
font-style:bold;
font-family:Calibri;
width:800px;
height:500px;
}
#text 
{
    top:0px;
    position:absolute;
filter:alpha(opacity=100);
opacity:100;
left:600px;
}
</style>
<script type="text/javascript"> 

//var txt=['text 1','text 2', 'text 3', 'text 4', 'text 5', 'text 6', 'text 7', 'text 8', 'text 9', 'text 10'], init=0,i=0,k=0,speed=40,el;
//var loopCount=1000;
//var j=0;
//var padd = 50; //set this to an approriate increment
//function fade(){
//init==0?i++:i--;
//el.filters?el.style.filter='alpha(opacity='+i+')':el.style.opacity=i/100;
//el.firstChild.nodeValue=txt[k];
//if(i==100)init=1;
//if(i==0) {init=0;k++;j++;
//el.style.paddingLeft=50*k;
//} …
Run Code Online (Sandbox Code Playgroud)

jquery

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

在html中添加列

我正在尝试创建一个表.我想知道如何在每列之间进行缩进.我知道我必须使用cellspacing但它似乎不起作用.如果你看一下这里的代码:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>rolebee</title>

<style type="text/css">

#centerize{margin:0 auto;text-align:left; width:1200px;  border-top: #c00 solid 3px;}
#container { width: 1200px; margin: 0 0 0 20px; }

</style>

</head>



<body>

<center>

<img src="http://www.wikima4.com/assets/templates/wikima4/css/images/red.jpg" alt="wikima4 banner" width="1200" height="150 " />

<p></p>

</center>



<div id="centerize" align="center" >

<p>

<font size="3" face="calibri"   >

<!--<table border=0 cellpadding=20 width=100%> -->

    <br/>
<table border="1" width="100%">
    <tr>
        <td width=20% cellspacing="10">Table Cell - This is my text. This is my text. This is …
Run Code Online (Sandbox Code Playgroud)

html

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

使用开关计数元音

我试图设计一个程序来计算句子中的元音.

在我的代码中,我在foreach语句中使用了一个if/else if语句.我想使用switch语句转换这些代码行,但我不确定要去哪里.我需要添加新方法吗?我很感激你的帮助.

这是我到目前为止所尝试的:我检查过这个是非常错误的.在case 1例如需要有一个常数.我不确定我在这里使用什么常数.

foreach (char v in yourSentence)
{
    switch (v)
    {
    case 1: 
        (v==ch1); 
        counta++; 
        j++; 
        break;

    case 2: 
        (v==ch2); 
        counte++; 
        j++; 
        break;
    case 3: 
        (v==ch3); 
        counti++; 
        j++; 
        break;
    case 4: 
        (v==ch4); 
        counto++; 
        j++; 
        break;
    case 5: 
        (v==ch3); 
        counti++; 
        j++; 
        break;             
    }
}
Run Code Online (Sandbox Code Playgroud)

另一个问题:我试图改变listBox中显示文本的颜色.这可能有不同的颜色吗?我在这里尝试的是前5(listBox1.Items.Add)是紫罗兰.并且(listBox1.Items.Add)的总和是蓝色的.但它似乎没有改变.我在这里错过了什么吗?

private void btnCount_Click(object sender, EventArgs e)
{
    string yourSentence;
    yourSentence = textBoxVowels.Text.ToLower().Trim();

    char ch1 = 'a';
    char ch2 = 'e';
    char …
Run Code Online (Sandbox Code Playgroud)

c# switch-statement

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

标签 统计

c# ×5

html ×4

.net ×2

colors ×1

devexpress ×1

font-size ×1

integer ×1

jquery ×1

line ×1

primes ×1

string ×1

switch-statement ×1