小编Pri*_*ner的帖子

SQL赋值变量和子查询

我有一个关于2 SQL的问题:

declare @i1 bit, @b1 bit
declare @i2 bit, @b2 bit
declare @t table (Seq int)
insert into @t values (1)

-- verify data
select case when (select count(1) from @t n2 where 1 = 2) > 0 then 1 else 0 end
-- result 0

select @i1 = 1, @b1 = case when @i1 = 1 or ((select count(1) from @t n2 where 1 = 2) > 0) then 1 else 0 end from @t n where n.Seq …
Run Code Online (Sandbox Code Playgroud)

sql t-sql sql-server

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

如何使用LDAP从Active Directory获取所有用户的详细信息

我需要使用LDAP从Active Directory获取所有用户的详细信息.以下代码确实提供Samaccountname了"管理员",但不是每个用户的详细信息,并且列表中没有找到邮件ID.请帮助.

string dominName = ConfigurationManager.AppSettings["DominName"].ToString();
string ldapPath = ConfigurationManager.AppSettings["ldapPath"].ToString();
if (!String.IsNullOrEmpty(dominName) && !String.IsNullOrEmpty(ldapPath))
{
    DirectoryEntry entry = new DirectoryEntry(ldapPath, txtUsername.Text.ToString().Trim(), txtPassword.Text.ToString().Trim());
    try
    {
        Object obj = entry.NativeObject;
        DirectorySearcher search = new DirectorySearcher(entry);
        search.Filter = "(&(objectClass=user)(objectCategory=person))";
        search.PropertiesToLoad.Add("samaccountname");
        search.PropertiesToLoad.Add("mail");
        search.PropertiesToLoad.Add("usergroup");
        search.PropertiesToLoad.Add("displayname");//first name

        foreach (System.DirectoryServices.SearchResult resEnt in search.FindAll())
        {    
            System.DirectoryServices.DirectoryEntry de = resEnt.GetDirectoryEntry();
            if (de.Properties["sAMAccountName"].Value != null && de.Properties["userAccountControl"].Value!=null)
            {
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("Name = " + de.Properties["sAMAccountName"].Value.ToString());
                sb.AppendLine("Email = " + de.Properties["Mail"].Value.ToString());
            }
        }
Run Code Online (Sandbox Code Playgroud)

找到解决方案

这是我的代码:

var …
Run Code Online (Sandbox Code Playgroud)

c# asp.net ldap

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

CSS 在标签字段中居中对齐

我正在尝试显示类似这样的内容:

样本结果 * 请以蓝线和黑线为边界

其中图像描述文本应该在剩余空间中水平居中,但是我不知道应该应用什么CSS。

这是我的小提琴:https://jsfiddle.net/65ky0zLg/

HTML:
<div>
  <img src="http://lh3.googleusercontent.com/mjejVTJKT4ABNKq2HGlkDs36f-QvzI2hKFER098vBIgiAoZ2H-SN5QPvFaZEVDZRxfujrS6pszZ_J-_di2F57w0IFE3KAciDwGAh-9RcCA=s660" style="width: 20%; padding: 2% 2% 0% 2%" alt/>
  <label class="lbl">Martin Luther King, Jr. Day 2015</label>
</div>

CSS:
.lbl {
  font-size: larger;
}
Run Code Online (Sandbox Code Playgroud)

html css

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

在Android中阅读Excel

目前我正在开发android开发.根据要求,应用程序应该能够读取Excel文件以进行数据输入.

正如其他人从这个主题开始,我已经使用Java Excel ApiApache POI,但两者都需要进行一些修改以满足我的要求:

JExcel API:
- 不支持XLSX

Apache POI:
- 支持XLS文件
- 要在Dalvik中支持XLSX,您需要克服64K和javax库,或使用端口版本(即来自Andrew Kondratev)
- 文件大小将增加2.4MB

但是我们还有其他选择在Android 4或更低版本中使用Excel文件吗?

excel android jexcelapi apache-poi

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

SQL 在“日期”类型的列中添加 2 小时

我在声明中有一列包含日期的列Select,我想在此 中的每一行添加 2 h Select

有什么建议吗?

sql oracle

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

标签 统计

sql ×2

android ×1

apache-poi ×1

asp.net ×1

c# ×1

css ×1

excel ×1

html ×1

jexcelapi ×1

ldap ×1

oracle ×1

sql-server ×1

t-sql ×1