小编apo*_*ene的帖子

从 Excel 文件批量导入数据以在 C# 中以编程方式访问

鉴于 Excel 和 Access 在某种程度上兼容,有没有办法以编程方式将数据从 Excel 文件导入 Access 数据库,而无需逐条读取文件和插入数据?

database excel ms-access

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

使用re.sub与组

re.sub("([^\\[\s\\]]+)([\\]\s]*)( [>|=|<] )",replace(r'\1')+r'\2'+r'\3',s) 
Run Code Online (Sandbox Code Playgroud)

这不会传递第一个组来替换函数,而是r'\1'作为字符串传递.

请说明出了什么问题.

python regex

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

如何让我的<div>伸展到整个屏幕宽度?我试过宽度100%

我想要把<div>它的宽度拉伸到整个屏幕.现在我在CSS中有这个:

#spacer3 {

width:100%;
height:300px;

}
Run Code Online (Sandbox Code Playgroud)

所以我相信它有效.但是在我的网站上,div并没有全程延伸,每侧约为5px.有帮助吗?

这是一个链接到网站的一个例子 我遇到问题的div有一个黑色(ish)背景,并有一个图像.

感谢您提前帮助!

html css fullscreen width

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

纠正MySQL语法以返回多行

我想查询数据库并从多行中提取检索信息,但我不确定MySQL语法.像这样的东西;

SELECT LastName FROM Users WHERE ID = 1 AND ID = 2 AND ID = 3
Run Code Online (Sandbox Code Playgroud)

所以我想收回来

Smith,Doe和Doe

Users
ID    FirstName    LastName    
1     John         Smith
2     Joe          Doe
3     Jane         Doe
More data etc etc
Run Code Online (Sandbox Code Playgroud)

php mysql sql

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

方法}预期

得到以下代码给出'} expected'的第一个错误

只是想获取并打印学生数据.不确定我是否需要使这些方法像返回类型或其他东西.欢迎任何建议,谢谢.

namespace studentInfo
{
    class Program
    {
        static void Main(string[] args)
        {
            getUserInformation();
            printStudentDetails(string firstName, string lastName, string birthday);
        }

        static void getUserInformation()
        {
            Console.WriteLine("Enter the student's first name: ");
            string firstName = Console.ReadLine();
            Console.WriteLine("Enter the student's last name");
            string lastName = Console.ReadLine();
            Console.WriteLine("Enter your bithdate");
            //DateTime birthdate = Convert.ToDateTime(Console.ReadLine());
            string birthday = Console.ReadLine();

        }

        static void printStudentDetails(string firstName, string lastName, string birthday)
        {
            Console.WriteLine("{0} {1} was born on: {2}", firstName, lastName, birthday);
            Console.ReadLine();
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

c# methods

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

编译器在c#中打印奇怪的值

我在C#中使用方法。我返回了一些东西,但是编译器没有打印我期望的东西。它正在打印(system.string [])。我不知道为什么请帮忙。

class Program
{
    static void Main(string[] args)
    {
        string[] sub = subjects();
        Console.WriteLine(sub);
    }
    public static string[] subjects()
    {
        Console.WriteLine("Please Enter How many Subject Do you Want to input");
        int limit = System.Convert.ToInt32(Console.ReadLine());
        string[] Subjects = new string[limit];
        for (int i = 0; i < limit; i++)
        {
            Console.WriteLine("Please Enter Subject Name " + i);
            Subjects[i] = Console.ReadLine();
        }
        return Subjects;

    }
}
Run Code Online (Sandbox Code Playgroud)

c#

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

List &lt;Dictionary&gt; foreach获得价值

List<Dictionary<string, object>> data = new List<Dictionary<string, object>>();
Dictionary<string, Object> objs = new Dictionary<string, object>();
for (int i = 1; i <= onlineolanlar.Count; i++)
{
    objs.Add(i.ToString(), new userLevel() { UserID = userID.ToString(), Presence = UserLevelBul.ToString() });
}
foreach (var item5 in objs.Values)
{
    //How can I access item5 properties here??
}
Run Code Online (Sandbox Code Playgroud)

大家好,

我如何达到该foreach循环的值?

item5应该具有属性 useriduserlevelbul但我无法到达它们。

c# asp.net dictionary

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

标签 统计

c# ×3

asp.net ×1

css ×1

database ×1

dictionary ×1

excel ×1

fullscreen ×1

html ×1

methods ×1

ms-access ×1

mysql ×1

php ×1

python ×1

regex ×1

sql ×1

width ×1